Skip to content

Commit

Permalink
ItemView: Display scheme's license at all times (if available)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Jul 1, 2024
1 parent 8f2e30d commit e3b9df9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"vocabularyType": "Vokabulartyp",
"vocSearch": "Suche nach Vokabular",
"conceptSearch": "Suche nach Konzept",
"license": "Lizenz",
"searchInVocabulary": "in {voc} suchen"
},
"en": {
Expand All @@ -19,6 +20,7 @@
"vocabularyType": "Vocabulary Type",
"vocSearch": "Searching for vocabulary",
"conceptSearch": "Searching for concept",
"license": "License",
"searchInVocabulary": "search in {voc}"
}
}
15 changes: 14 additions & 1 deletion src/client/views/ItemView.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import config from "@/config.js"
import * as jskos from "jskos-tools"
import { AutoLink } from "jskos-vue"
import { AutoLink, LicenseInfo } from "jskos-vue"
import { schemes, registry, loadTop, loadNarrower, loadConcept, loadAncestors, getConceptByUri } from "@/store.js"
import { computed, ref, watch } from "vue"
import { useRoute, useRouter } from "vue-router"
Expand Down Expand Up @@ -106,6 +106,12 @@ const topConcepts = computed(() => {
<router-link :to="getRouterUrl({ scheme })">
{{ jskos.prefLabel(scheme) }}
</router-link>
<div
v-if="scheme?.license?.length"
id="licenseInfo">
{{ $t("license") }}:
<license-info :item="scheme" />
</div>
</h2>
<item-suggest
v-if="scheme"
Expand Down Expand Up @@ -257,6 +263,13 @@ const topConcepts = computed(() => {
overflow-y: auto;
}
}
#licenseInfo {
position: absolute;
top: 0;
right: 0;
font-weight: normal;
font-size: 18px;
}
.loading {
position: absolute;
top: 0;
Expand Down

0 comments on commit e3b9df9

Please sign in to comment.