mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-28 23:42:58 -04:00
[pl][names] publish
This commit is contained in:
parent
3292857f61
commit
b856ed3ba4
@ -200,15 +200,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
if (this.config.names && this.config.names.enabled && this.config.names.published) {
|
||||
links.push({
|
||||
link: '/' + this.config.names.route,
|
||||
icon: 'signature',
|
||||
text: this.$t('names.header'),
|
||||
textLong: this.$t('names.headerLong'),
|
||||
});
|
||||
}
|
||||
|
||||
if (this.config.faq.enabled && !this.config.links.split) {
|
||||
links.push({
|
||||
link: '/' + this.config.faq.route,
|
||||
@ -248,6 +239,7 @@
|
||||
this.config.calendar && this.config.calendar.enabled ? '/' + this.config.calendar.route : '',
|
||||
this.config.census && this.config.census.enabled ? '/' + this.config.census.route : '',
|
||||
this.config.inclusive && this.config.inclusive.enabled ? '/' + this.config.inclusive.route : '',
|
||||
this.config.names && this.config.names.enabled && this.config.names.published ? '/' + this.config.names.route : '',
|
||||
this.config.people && this.config.people.enabled ? '/' + this.config.people.route : '',
|
||||
'/' + this.config.contact.team.route,
|
||||
];
|
||||
|
@ -249,7 +249,7 @@ terminology:
|
||||
|
||||
names:
|
||||
enabled: true
|
||||
published: false
|
||||
published: true
|
||||
route: 'imiona'
|
||||
legally: true
|
||||
count: true
|
||||
|
@ -13,6 +13,13 @@
|
||||
<NamesLinks/>
|
||||
</section>
|
||||
|
||||
<section v-if="$isGranted('names')" class="px-3">
|
||||
<div class="alert alert-info">
|
||||
<strong>{{ namesCountApproved() }}</strong> <T>nouns.approved</T>,
|
||||
<strong>{{ namesCountPending() }}</strong> <T>nouns.pending</T>.
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="sticky-top">
|
||||
<div class="input-group mb-3 bg-white">
|
||||
<span class="input-group-text">
|
||||
@ -182,6 +189,14 @@
|
||||
delete this.names[name.id];
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
// those must be methods, not computed, because when modified, they don't get updated in the view for some reason
|
||||
namesCountApproved() {
|
||||
return Object.values(this.names).filter(n => n.approved).length;
|
||||
},
|
||||
namesCountPending() {
|
||||
return Object.values(this.names).filter(n => !n.approved).length;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
filter() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user