Skip to content

Commit

Permalink
AutoLink URI in ItemName
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtich committed Nov 17, 2023
1 parent 64f7c42 commit 1ad075b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/ItemName.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
<!-- Text for prefLabel -->
<span v-if="showText || !notation">{{ prefLabel }}</span>
<!-- Fallback to URI for concepts if no other data exists -->
<span v-if="!isScheme && !notation && !prefLabel">{{ _item?.uri }}</span>
<auto-link
v-if="!isScheme && !notation && !prefLabel && _item?.uri"
:link="_item?.uri" />
</div>
<!-- Show icon for schemes without concepts or concepts where no data could be loaded -->
<div
Expand All @@ -59,13 +61,14 @@
import _ from "lodash"
import dragandrop from "@/mixins/dragandrop.js"
import { getItem } from "@/items"

import AutoLink from "./AutoLink.vue"
/**
* Component that displays an item's notation (if defined) and prefLabel.
*/
export default {
name: "ItemName",
components: { AutoLink },
mixins: [dragandrop],
props: {
/**
Expand Down

0 comments on commit 1ad075b

Please sign in to comment.