[terms] hide terms in versions where they should be unpublished
This commit is contained in:
parent
52c8bac795
commit
173d877e47
|
@ -29,12 +29,12 @@
|
|||
},
|
||||
computed: {
|
||||
link() {
|
||||
if (!this.config.nouns.terms.enabled) {
|
||||
if (!this.config.nouns.terms.enabled || !(this.config.nouns.terms.published || this.$isGranted('terms'))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (let term of this.terms || []) {
|
||||
if (term.key.toLowerCase().includes(this.alt.toLowerCase())) {
|
||||
if (term.key && term.key.toLowerCase().includes(this.alt.toLowerCase())) {
|
||||
return term.key;
|
||||
}
|
||||
if (term.term.toLowerCase().includes(this.name.toLowerCase())) {
|
||||
|
|
|
@ -91,6 +91,7 @@ nouns:
|
|||
route: 'inkluzywny'
|
||||
terms:
|
||||
enabled: true
|
||||
published: true
|
||||
categories:
|
||||
- 'orientacja seksualna'
|
||||
- 'orientacja romantyczna'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<div v-if="config.nouns.terms.published || $isGranted('terms')">
|
||||
<NounsNav/>
|
||||
|
||||
<h2>
|
||||
|
@ -14,6 +14,7 @@
|
|||
|
||||
<TermsDictionary load ref="termsdictionary"/>
|
||||
</div>
|
||||
<NotFound v-else/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
Reference in New Issue