Skip to content

Commit 917e882

Browse files
Bug fixing; show all links in MappingDetail when only one concept is selected (#743)
1 parent f90213a commit 917e882

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/components/MappingEditor.vue

+1-3
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,6 @@ export default {
472472
},
473473
items() {
474474
return this.$store.getters["mapping/getConcepts"](false).map(getItem)
475-
// return getItem(this.selected.concept[true]) // Correct!
476475
},
477476
},
478477
watch: {
@@ -508,7 +507,6 @@ export default {
508507
},
509508
searchLinkInfo(newValue, oldValue) {
510509
if (!_.isEqual(newValue, oldValue)) {
511-
this.items = []
512510
this.updateSearchLinks(newValue)
513511
}
514512
},
@@ -525,7 +523,7 @@ export default {
525523
this.searchLinks = await this.$store.dispatch("getSearchLinks", {
526524
scheme: getItem(this.selected.scheme[false]),
527525
info: searchLinkInfo,
528-
multipleConcepts: true,
526+
multipleConcepts: this.items && this.items.length > 1,
529527
})
530528
},
531529
refreshAnnotations(data) {

src/store/actions.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,9 @@ export default {
373373
}
374374

375375
// Add custom WebDewey links for DDC
376-
if (jskos.compare(scheme, { uri: "http://bartoc.org/en/node/241" }) && !multipleConcepts) {
376+
if (jskos.compare(scheme, { uri: "http://bartoc.org/en/node/241" }) && infoArray.length > 0) {
377377
let recordIdPrefix = "ddc"
378-
let notation = info.notation
378+
let notation = infoArray[0].notation
379379
// Adjust notation
380380
// 1. Determine postfix
381381
let postfix
@@ -399,15 +399,15 @@ export default {
399399
label: jskos.prefLabel({ prefLabel: {
400400
en: "WebDewey English (requires login)",
401401
de: "WebDewey Englisch (benötigt Login)",
402-
}}, { language: info.locale }),
402+
}}, { language: infoArray[0].locale }),
403403
})
404404
// German
405405
searchLinks.push({
406406
url: `https://deweyde.pansoft.de/webdewey/index_11.html?recordId=${recordIdPrefix}%3a${notation}`,
407407
label: jskos.prefLabel({ prefLabel: {
408408
en: "WebDewey German (requires login)",
409409
de: "WebDewey Deutsch (benötigt Login)",
410-
}}, { language: info.locale }),
410+
}}, { language: infoArray[0].locale }),
411411
})
412412
}
413413
// Filter out duplicate URLs (e.g. Wikipedia)

0 commit comments

Comments
 (0)