From aa1876f94c71d252d427f298e9b37c87f2fe4127 Mon Sep 17 00:00:00 2001 From: nztqa Date: Thu, 28 Sep 2017 16:57:04 +0900 Subject: Add message from service administrator --- .eslintrc.json | 3 +- client/components/main/header.jade | 7 +++++ client/components/main/header.js | 14 +++++++++ client/components/main/header.styl | 1 + client/components/settings/settingBody.jade | 20 +++++++++++++ client/components/settings/settingBody.js | 45 +++++++++++++++++++++++++++++ client/components/settings/settingBody.styl | 7 +++-- i18n/en.i18n.json | 3 ++ models/notices.js | 36 +++++++++++++++++++++++ server/publications/notices.js | 3 ++ 10 files changed, 135 insertions(+), 4 deletions(-) create mode 100644 models/notices.js create mode 100644 server/publications/notices.js diff --git a/.eslintrc.json b/.eslintrc.json index 51b2037f..2a55dcc3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -130,6 +130,7 @@ "Authentication": true, "Integrations": true, "HTTP": true, - "AccountSettings": true + "AccountSettings": true, + "Notices": true } } diff --git a/client/components/main/header.jade b/client/components/main/header.jade index bd0af880..613dd736 100644 --- a/client/components/main/header.jade +++ b/client/components/main/header.jade @@ -49,6 +49,13 @@ template(name="header") if appIsOffline +offlineWarning + if hasAnnouncement + .announcement + p + i.fa.fa-bullhorn + | #{announcement} + i.fa.fa-times-circle.js-close-announcement + template(name="offlineWarning") .offline-warning p diff --git a/client/components/main/header.js b/client/components/main/header.js index 49acbfef..3b724651 100644 --- a/client/components/main/header.js +++ b/client/components/main/header.js @@ -10,8 +10,22 @@ Template.header.helpers({ appIsOffline() { return !Meteor.status().connected; }, + + hasAnnouncement() { + const notice = Notices.findOne(); + return notice && notice.enabled; + }, + + announcement() { + $('.announcement').show(); + const notice = Notices.findOne(); + return notice && notice.body; + }, }); Template.header.events({ 'click .js-create-board': Popup.open('headerBarCreateBoard'), + 'click .js-close-announcement'() { + $('.announcement').hide(); + }, }); diff --git a/client/components/main/header.styl b/client/components/main/header.styl index 0e35d38a..191e8893 100644 --- a/client/components/main/header.styl +++ b/client/components/main/header.styl @@ -197,6 +197,7 @@ li height: 28px +.announcement, .offline-warning width: 100% text-align: center diff --git a/client/components/settings/settingBody.jade b/client/components/settings/settingBody.jade index 5864efd5..a3b534f4 100644 --- a/client/components/settings/settingBody.jade +++ b/client/components/settings/settingBody.jade @@ -14,6 +14,8 @@ template(name="setting") a.js-setting-menu(data-id="email-setting") {{_ 'email'}} li a.js-setting-menu(data-id="account-setting") {{_ 'accounts'}} + li + a.js-setting-menu(data-id="notice-setting") {{_ 'admin-notice'}} .main-body if loading.get +spinner @@ -23,6 +25,8 @@ template(name="setting") +email else if accountSetting.get +accountSettings + else if noticeSetting.get + +administratorNoticeSettings template(name="general") ul#registration-setting.setting-detail @@ -96,3 +100,19 @@ template(name='accountSettings') span {{_ 'no'}} li button.js-accounts-save.primary {{_ 'save'}} + +template(name='administratorNoticeSettings') + ul#notice-setting.setting-detail + li + a.flex.js-toggle-activemessage + .materialCheckBox(class="{{#if currentSetting.enabled}}is-checked{{/if}}") + + span {{_ 'admin-notice-active'}} + li + .admin-notice(class="{{#if currentSetting.enabled}}{{else}}hide{{/if}}") + ul + li + .title {{_ 'admin-notice-title'}} + textarea#admin-notice.form-control= currentSetting.body + li + button.js-notice-save.primary {{_ 'save'}} diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js index a2993426..38213828 100644 --- a/client/components/settings/settingBody.js +++ b/client/components/settings/settingBody.js @@ -1,6 +1,7 @@ Meteor.subscribe('setting'); Meteor.subscribe('mailServer'); Meteor.subscribe('accountSettings'); +Meteor.subscribe('notices'); BlazeComponent.extendComponent({ onCreated() { @@ -9,6 +10,7 @@ BlazeComponent.extendComponent({ this.generalSetting = new ReactiveVar(true); this.emailSetting = new ReactiveVar(false); this.accountSetting = new ReactiveVar(false); + this.noticeSetting = new ReactiveVar(false); }, setError(error) { @@ -65,6 +67,7 @@ BlazeComponent.extendComponent({ this.generalSetting.set('registration-setting' === targetID); this.emailSetting.set('email-setting' === targetID); this.accountSetting.set('account-setting' === targetID); + this.noticeSetting.set('notice-setting' === targetID); } }, @@ -152,3 +155,45 @@ BlazeComponent.extendComponent({ }]; }, }).register('accountSettings'); + +BlazeComponent.extendComponent({ + onCreated() { + this.loading = new ReactiveVar(false); + }, + + setLoading(w) { + this.loading.set(w); + }, + + currentSetting(){ + return Notices.findOne(); + }, + + saveMessage() { + const message = $('#admin-notice').val().trim(); + Notices.update(Notices.findOne()._id, { + $set: { 'body': message }, + }); + }, + + toggleActive(){ + this.setLoading(true); + const isActive = this.currentSetting().enabled; + Notices.update(Notices.findOne()._id, { + $set:{ 'enabled': !isActive}, + }); + this.setLoading(false); + if(isActive){ + $('.admin-notice').slideUp(); + }else{ + $('.admin-notice').slideDown(); + } + }, + + events() { + return [{ + 'click a.js-toggle-activemessage': this.toggleActive, + 'click button.js-notice-save': this.saveMessage, + }]; + }, +}).register('administratorNoticeSettings'); diff --git a/client/components/settings/settingBody.styl b/client/components/settings/settingBody.styl index 118d364c..d28ae268 100644 --- a/client/components/settings/settingBody.styl +++ b/client/components/settings/settingBody.styl @@ -61,10 +61,11 @@ .is-checked border-bottom: 2px solid #2980b9; border-right: 2px solid #2980b9; - - span + + span padding: 0 0.5rem - + + .admin-notice, .invite-people padding-left 20px; li diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index 64a720db..a87c45e5 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Members", "admin": "Admin", "admin-desc": "Can view and edit cards, remove members, and change settings for the board.", + "admin-notice": "Notice", + "admin-notice-active": "Active message", + "admin-notice-title": "Message from service administrator", "all-boards": "All boards", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/models/notices.js b/models/notices.js new file mode 100644 index 00000000..d62f6797 --- /dev/null +++ b/models/notices.js @@ -0,0 +1,36 @@ +Notices = new Mongo.Collection('notices'); + +Notices.attachSchema(new SimpleSchema({ + enabled: { + type: Boolean, + defaultValue: false, + }, + title: { + type: String, + optional: true, + }, + body: { + type: String, + optional: true, + }, + sort: { + type: Number, + decimal: true, + }, +})); + +Notices.allow({ + update(userId) { + const user = Users.findOne(userId); + return user && user.isAdmin; + }, +}); + +if (Meteor.isServer) { + Meteor.startup(() => { + const notices = Notices.findOne({}); + if(!notices){ + Notices.insert({enabled: false, sort: 0}); + } + }); +} diff --git a/server/publications/notices.js b/server/publications/notices.js new file mode 100644 index 00000000..8910d740 --- /dev/null +++ b/server/publications/notices.js @@ -0,0 +1,3 @@ +Meteor.publish('notices', function() { + return Notices.find(); +}); -- cgit v1.2.3-1-g7c22 From a88ac6113e5f7f428d0f021bbcb213cc517c177e Mon Sep 17 00:00:00 2001 From: nztqa Date: Sun, 1 Oct 2017 12:43:15 +0900 Subject: Rename notice -> announcement --- .eslintrc.json | 2 +- client/components/main/header.js | 8 +++---- client/components/settings/settingBody.jade | 20 ++++++++-------- client/components/settings/settingBody.js | 22 +++++++++--------- client/components/settings/settingBody.styl | 2 +- i18n/en.i18n.json | 6 ++--- models/announcements.js | 36 +++++++++++++++++++++++++++++ models/notices.js | 36 ----------------------------- server/publications/announcements.js | 3 +++ server/publications/notices.js | 3 --- 10 files changed, 69 insertions(+), 69 deletions(-) create mode 100644 models/announcements.js delete mode 100644 models/notices.js create mode 100644 server/publications/announcements.js delete mode 100644 server/publications/notices.js diff --git a/.eslintrc.json b/.eslintrc.json index 2a55dcc3..b93dd916 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -131,6 +131,6 @@ "Integrations": true, "HTTP": true, "AccountSettings": true, - "Notices": true + "Announcements": true } } diff --git a/client/components/main/header.js b/client/components/main/header.js index 3b724651..c8f415df 100644 --- a/client/components/main/header.js +++ b/client/components/main/header.js @@ -12,14 +12,14 @@ Template.header.helpers({ }, hasAnnouncement() { - const notice = Notices.findOne(); - return notice && notice.enabled; + const announcements = Announcements.findOne(); + return announcements && announcements.enabled; }, announcement() { $('.announcement').show(); - const notice = Notices.findOne(); - return notice && notice.body; + const announcements = Announcements.findOne(); + return announcements && announcements.body; }, }); diff --git a/client/components/settings/settingBody.jade b/client/components/settings/settingBody.jade index a3b534f4..2152cc2c 100644 --- a/client/components/settings/settingBody.jade +++ b/client/components/settings/settingBody.jade @@ -15,7 +15,7 @@ template(name="setting") li a.js-setting-menu(data-id="account-setting") {{_ 'accounts'}} li - a.js-setting-menu(data-id="notice-setting") {{_ 'admin-notice'}} + a.js-setting-menu(data-id="announcement-setting") {{_ 'admin-announcement'}} .main-body if loading.get +spinner @@ -25,8 +25,8 @@ template(name="setting") +email else if accountSetting.get +accountSettings - else if noticeSetting.get - +administratorNoticeSettings + else if announcementSetting.get + +announcementSettings template(name="general") ul#registration-setting.setting-detail @@ -101,18 +101,18 @@ template(name='accountSettings') li button.js-accounts-save.primary {{_ 'save'}} -template(name='administratorNoticeSettings') - ul#notice-setting.setting-detail +template(name='announcementSettings') + ul#announcement-setting.setting-detail li a.flex.js-toggle-activemessage .materialCheckBox(class="{{#if currentSetting.enabled}}is-checked{{/if}}") - span {{_ 'admin-notice-active'}} + span {{_ 'admin-announcement-active'}} li - .admin-notice(class="{{#if currentSetting.enabled}}{{else}}hide{{/if}}") + .admin-announcement(class="{{#if currentSetting.enabled}}{{else}}hide{{/if}}") ul li - .title {{_ 'admin-notice-title'}} - textarea#admin-notice.form-control= currentSetting.body + .title {{_ 'admin-announcement-title'}} + textarea#admin-announcement.form-control= currentSetting.body li - button.js-notice-save.primary {{_ 'save'}} + button.js-announcement-save.primary {{_ 'save'}} diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js index 38213828..27f690ee 100644 --- a/client/components/settings/settingBody.js +++ b/client/components/settings/settingBody.js @@ -1,7 +1,7 @@ Meteor.subscribe('setting'); Meteor.subscribe('mailServer'); Meteor.subscribe('accountSettings'); -Meteor.subscribe('notices'); +Meteor.subscribe('announcements'); BlazeComponent.extendComponent({ onCreated() { @@ -10,7 +10,7 @@ BlazeComponent.extendComponent({ this.generalSetting = new ReactiveVar(true); this.emailSetting = new ReactiveVar(false); this.accountSetting = new ReactiveVar(false); - this.noticeSetting = new ReactiveVar(false); + this.announcementSetting = new ReactiveVar(false); }, setError(error) { @@ -67,7 +67,7 @@ BlazeComponent.extendComponent({ this.generalSetting.set('registration-setting' === targetID); this.emailSetting.set('email-setting' === targetID); this.accountSetting.set('account-setting' === targetID); - this.noticeSetting.set('notice-setting' === targetID); + this.announcementSetting.set('announcement-setting' === targetID); } }, @@ -166,12 +166,12 @@ BlazeComponent.extendComponent({ }, currentSetting(){ - return Notices.findOne(); + return Announcements.findOne(); }, saveMessage() { - const message = $('#admin-notice').val().trim(); - Notices.update(Notices.findOne()._id, { + const message = $('#admin-announcement').val().trim(); + Announcements.update(Announcements.findOne()._id, { $set: { 'body': message }, }); }, @@ -179,21 +179,21 @@ BlazeComponent.extendComponent({ toggleActive(){ this.setLoading(true); const isActive = this.currentSetting().enabled; - Notices.update(Notices.findOne()._id, { + Announcements.update(Announcements.findOne()._id, { $set:{ 'enabled': !isActive}, }); this.setLoading(false); if(isActive){ - $('.admin-notice').slideUp(); + $('.admin-announcement').slideUp(); }else{ - $('.admin-notice').slideDown(); + $('.admin-announcement').slideDown(); } }, events() { return [{ 'click a.js-toggle-activemessage': this.toggleActive, - 'click button.js-notice-save': this.saveMessage, + 'click button.js-announcement-save': this.saveMessage, }]; }, -}).register('administratorNoticeSettings'); +}).register('announcementSettings'); diff --git a/client/components/settings/settingBody.styl b/client/components/settings/settingBody.styl index d28ae268..fec64cee 100644 --- a/client/components/settings/settingBody.styl +++ b/client/components/settings/settingBody.styl @@ -65,7 +65,7 @@ span padding: 0 0.5rem - .admin-notice, + .admin-announcement, .invite-people padding-left 20px; li diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index a87c45e5..a33d55d1 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -54,9 +54,9 @@ "addMemberPopup-title": "Members", "admin": "Admin", "admin-desc": "Can view and edit cards, remove members, and change settings for the board.", - "admin-notice": "Notice", - "admin-notice-active": "Active message", - "admin-notice-title": "Message from service administrator", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "All boards", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/models/announcements.js b/models/announcements.js new file mode 100644 index 00000000..2cb1e1b7 --- /dev/null +++ b/models/announcements.js @@ -0,0 +1,36 @@ +Announcements = new Mongo.Collection('announcements'); + +Announcements.attachSchema(new SimpleSchema({ + enabled: { + type: Boolean, + defaultValue: false, + }, + title: { + type: String, + optional: true, + }, + body: { + type: String, + optional: true, + }, + sort: { + type: Number, + decimal: true, + }, +})); + +Announcements.allow({ + update(userId) { + const user = Users.findOne(userId); + return user && user.isAdmin; + }, +}); + +if (Meteor.isServer) { + Meteor.startup(() => { + const announcements = Announcements.findOne({}); + if(!announcements){ + Announcements.insert({enabled: false, sort: 0}); + } + }); +} diff --git a/models/notices.js b/models/notices.js deleted file mode 100644 index d62f6797..00000000 --- a/models/notices.js +++ /dev/null @@ -1,36 +0,0 @@ -Notices = new Mongo.Collection('notices'); - -Notices.attachSchema(new SimpleSchema({ - enabled: { - type: Boolean, - defaultValue: false, - }, - title: { - type: String, - optional: true, - }, - body: { - type: String, - optional: true, - }, - sort: { - type: Number, - decimal: true, - }, -})); - -Notices.allow({ - update(userId) { - const user = Users.findOne(userId); - return user && user.isAdmin; - }, -}); - -if (Meteor.isServer) { - Meteor.startup(() => { - const notices = Notices.findOne({}); - if(!notices){ - Notices.insert({enabled: false, sort: 0}); - } - }); -} diff --git a/server/publications/announcements.js b/server/publications/announcements.js new file mode 100644 index 00000000..efebf640 --- /dev/null +++ b/server/publications/announcements.js @@ -0,0 +1,3 @@ +Meteor.publish('announcements', function() { + return Announcements.find(); +}); diff --git a/server/publications/notices.js b/server/publications/notices.js deleted file mode 100644 index 8910d740..00000000 --- a/server/publications/notices.js +++ /dev/null @@ -1,3 +0,0 @@ -Meteor.publish('notices', function() { - return Notices.find(); -}); -- cgit v1.2.3-1-g7c22 From c8cbb7697da83805de546be37859ca06ce6e8fde Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sun, 1 Oct 2017 10:18:16 +0300 Subject: Site Wide Announcement. Thanks to nztqa ! --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c626610..8a9dbdca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ This release adds the following new features: -* [Slider for Comments only in activity feed](https://github.com/wekan/wekan/issues/1247). +* [Slider for Comments only in activity feed](https://github.com/wekan/wekan/issues/1247); +* [Site Wide Announcement](https://github.com/wekan/wekan/pull/1260). and fixes the following bugs: -- cgit v1.2.3-1-g7c22 From 443c3a7ac6c1b22eb5e13072d5b6bd797271dc2a Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sun, 1 Oct 2017 10:41:57 +0300 Subject: Update translations. --- i18n/ar.i18n.json | 3 +++ i18n/br.i18n.json | 3 +++ i18n/ca.i18n.json | 3 +++ i18n/cs.i18n.json | 3 +++ i18n/de.i18n.json | 3 +++ i18n/en-GB.i18n.json | 3 +++ i18n/eo.i18n.json | 3 +++ i18n/es.i18n.json | 3 +++ i18n/eu.i18n.json | 3 +++ i18n/fa.i18n.json | 3 +++ i18n/fi.i18n.json | 3 +++ i18n/fr.i18n.json | 3 +++ i18n/gl.i18n.json | 3 +++ i18n/he.i18n.json | 3 +++ i18n/hu.i18n.json | 3 +++ i18n/id.i18n.json | 3 +++ i18n/it.i18n.json | 3 +++ i18n/ja.i18n.json | 3 +++ i18n/ko.i18n.json | 3 +++ i18n/nb.i18n.json | 3 +++ i18n/nl.i18n.json | 3 +++ i18n/pl.i18n.json | 3 +++ i18n/pt-BR.i18n.json | 3 +++ i18n/ro.i18n.json | 3 +++ i18n/ru.i18n.json | 3 +++ i18n/sr.i18n.json | 3 +++ i18n/sv.i18n.json | 3 +++ i18n/ta.i18n.json | 3 +++ i18n/th.i18n.json | 3 +++ i18n/tr.i18n.json | 3 +++ i18n/uk.i18n.json | 3 +++ i18n/vi.i18n.json | 3 +++ i18n/zh-CN.i18n.json | 3 +++ i18n/zh-TW.i18n.json | 3 +++ 34 files changed, 102 insertions(+) diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index 88eaf7be..3ef30996 100644 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "الأعضاء", "admin": "المدير", "admin-desc": "إمكانية مشاهدة و تعديل و حذف أعضاء ، و تعديل إعدادات اللوحة أيضا.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "كل اللوحات", "and-n-other-card": "And __count__ other بطاقة", "and-n-other-card_plural": "And __count__ other بطاقات", diff --git a/i18n/br.i18n.json b/i18n/br.i18n.json index a0a23c2c..2b77db28 100644 --- a/i18n/br.i18n.json +++ b/i18n/br.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Izili", "admin": "Merour", "admin-desc": "Can view and edit cards, remove members, and change settings for the board.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "All boards", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json index 530f2d98..3764d81f 100644 --- a/i18n/ca.i18n.json +++ b/i18n/ca.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Membres", "admin": "Administrador", "admin-desc": "Pots veure i editar fitxes, eliminar membres, i canviar la configuració del tauler", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Tots els taulers", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/cs.i18n.json b/i18n/cs.i18n.json index 7fa6b0b6..a46529e1 100644 --- a/i18n/cs.i18n.json +++ b/i18n/cs.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Členové", "admin": "Administrátor", "admin-desc": "Může zobrazovat a upravovat karty, mazat členy a měnit nastavení tabla.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Všechna tabla", "and-n-other-card": "A __count__ další karta(y)", "and-n-other-card_plural": "A __count__ dalších karet", diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json index bc5599ac..7d180656 100644 --- a/i18n/de.i18n.json +++ b/i18n/de.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Mitglieder", "admin": "Admin", "admin-desc": "Kann Karten anschauen und bearbeiten, Mitglieder entfernen und Boardeinstellungen ändern.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Alle Boards", "and-n-other-card": "und eine andere Karte", "and-n-other-card_plural": "und __count__ andere Karten", diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json index 9d9b823d..2c18438d 100644 --- a/i18n/en-GB.i18n.json +++ b/i18n/en-GB.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Members", "admin": "Admin", "admin-desc": "Can view and edit cards, remove members, and change settings for the board.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "All boards", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/eo.i18n.json b/i18n/eo.i18n.json index efe04463..c7fa1264 100644 --- a/i18n/eo.i18n.json +++ b/i18n/eo.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Membroj", "admin": "Admin", "admin-desc": "Can view and edit cards, remove members, and change settings for the board.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "All boards", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json index 6577add6..804fc816 100644 --- a/i18n/es.i18n.json +++ b/i18n/es.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Miembros", "admin": "Administrador", "admin-desc": "Puedes ver y editar fichas, eliminar miembros, y cambiar los ajustes del tablero", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Tableros", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/eu.i18n.json b/i18n/eu.i18n.json index 9bc874fa..4aac43d4 100644 --- a/i18n/eu.i18n.json +++ b/i18n/eu.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Kideak", "admin": "Kudeatzailea", "admin-desc": "Txartelak ikusi eta editatu ditzake, kideak kendu, eta arbelaren ezarpenak aldatu.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Arbel guztiak", "and-n-other-card": "Eta beste txartel __count__", "and-n-other-card_plural": "Eta beste __count__ txartel", diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json index 53eac924..3ff24ff7 100644 --- a/i18n/fa.i18n.json +++ b/i18n/fa.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "اعضا", "admin": "مدیر", "admin-desc": "امکان دیدن و ویرایش کارتها،پاک کردن کاربران و تغییر تنظیمات برای تخته", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "تمام بردها", "and-n-other-card": "و __count__ کارت دیگر", "and-n-other-card_plural": "و __count__ کارت دیگر", diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json index 64a328fd..9587cee6 100644 --- a/i18n/fi.i18n.json +++ b/i18n/fi.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Jäsenet", "admin": "Ylläpitäjä", "admin-desc": "Voi nähfä ja muokata kortteja, poistaa jäseniä, ja muuttaa taulun asetuksia.", + "admin-announcement": "Ilmoitus", + "admin-announcement-active": "Aktiivinen järjestelmänlaajuinen ilmoitus", + "admin-announcement-title": "Ilmoitus ylläpitäjältä", "all-boards": "Kaikki taulut", "and-n-other-card": "Ja __count__ muu kortti", "and-n-other-card_plural": "Ja __count__ muuta korttia", diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index 053874c7..90738b72 100644 --- a/i18n/fr.i18n.json +++ b/i18n/fr.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Membres", "admin": "Admin", "admin-desc": "Peut voir et éditer les cartes, supprimer des membres et changer les paramètres du tableau.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Tous les tableaux", "and-n-other-card": "Et __count__ autre carte", "and-n-other-card_plural": "Et __count__ autres cartes", diff --git a/i18n/gl.i18n.json b/i18n/gl.i18n.json index 27769c08..523a6f53 100644 --- a/i18n/gl.i18n.json +++ b/i18n/gl.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Membros", "admin": "Admin", "admin-desc": "Pode ver e editar tarxetas, retirar membros e cambiar a configuración do taboleiro.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Todos os taboleiros", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/he.i18n.json b/i18n/he.i18n.json index 91b39872..ca20ac04 100644 --- a/i18n/he.i18n.json +++ b/i18n/he.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "חברים", "admin": "מנהל", "admin-desc": "יש הרשאות לצפייה ולעריכת כרטיסים, להסרת חברים ולשינוי הגדרות לוח.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "כל הלוחות", "and-n-other-card": "וכרטיס אחר", "and-n-other-card_plural": "ו־__count__ כרטיסים אחרים", diff --git a/i18n/hu.i18n.json b/i18n/hu.i18n.json index 59922ec5..37a296d0 100644 --- a/i18n/hu.i18n.json +++ b/i18n/hu.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Tagok", "admin": "Adminisztrátor", "admin-desc": "Lehet szerkeszteni a lapot, tagokat távolíthat el, és és a fórumon-beállításainak módosítása.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Összes tábla", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json index 894710a4..08c03788 100644 --- a/i18n/id.i18n.json +++ b/i18n/id.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Daftar Anggota", "admin": "Admin", "admin-desc": "Bisa tampilkan dan sunting kartu, menghapus partisipan, dan merubah setting panel", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Semua Panel", "and-n-other-card": "Dan__menghitung__kartu lain", "and-n-other-card_plural": "Dan__menghitung__kartu lain", diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json index 0ed9a895..02245f73 100644 --- a/i18n/it.i18n.json +++ b/i18n/it.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Membri", "admin": "Amministratore", "admin-desc": "Può vedere e modificare schede, rimuovere membri e modificare le impostazioni della bacheca.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Tutte le bacheche", "and-n-other-card": "E __count__ altra scheda", "and-n-other-card_plural": "E __count__ altre schede", diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json index 7c261acc..2dcf87cd 100644 --- a/i18n/ja.i18n.json +++ b/i18n/ja.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "メンバー", "admin": "管理", "admin-desc": "カードの閲覧と編集、メンバーの削除、ボードの設定変更が可能", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "全てのボード", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json index d865017c..d253d999 100644 --- a/i18n/ko.i18n.json +++ b/i18n/ko.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "멤버", "admin": "관리자", "admin-desc": "카드를 보거나 수정하고, 멤버를 삭제하고, 보드에 대한 설정을 수정할 수 있습니다.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "전체 보드", "and-n-other-card": "__count__ 개의 다른 카드", "and-n-other-card_plural": "__count__ 개의 다른 카드들", diff --git a/i18n/nb.i18n.json b/i18n/nb.i18n.json index 538efd2b..fead15c6 100644 --- a/i18n/nb.i18n.json +++ b/i18n/nb.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Medlemmer", "admin": "Admin", "admin-desc": "Kan se og redigere kort, fjerne medlemmer, og endre innstillingene for tavlen.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Alle tavler", "and-n-other-card": "Og __count__ andre kort", "and-n-other-card_plural": "Og __count__ andre kort", diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json index 60bf3b87..cfebef2b 100644 --- a/i18n/nl.i18n.json +++ b/i18n/nl.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Leden", "admin": "Administrator", "admin-desc": "Kan kaarten bekijken en wijzigen, leden verwijderen, en instellingen voor het bord aanpassen.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Alle borden", "and-n-other-card": "En nog __count__ ander", "and-n-other-card_plural": "En __count__ andere kaarten", diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json index 144c29a3..929c89d8 100644 --- a/i18n/pl.i18n.json +++ b/i18n/pl.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Członkowie", "admin": "Admin", "admin-desc": "Może widzieć i edytować karty, usuwać członków oraz zmieniać ustawienia tablicy.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Wszystkie tablice", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json index 4c570dab..ccb2bbe6 100644 --- a/i18n/pt-BR.i18n.json +++ b/i18n/pt-BR.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Membros", "admin": "Administrador", "admin-desc": "Pode ver e editar cartões, remover membros e alterar configurações do quadro.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Todos os quadros", "and-n-other-card": "E __count__ outro cartão", "and-n-other-card_plural": "E __count__ outros cartões", diff --git a/i18n/ro.i18n.json b/i18n/ro.i18n.json index e6172a02..ad95902b 100644 --- a/i18n/ro.i18n.json +++ b/i18n/ro.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Members", "admin": "Admin", "admin-desc": "Can view and edit cards, remove members, and change settings for the board.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "All boards", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json index 1be6242b..88dfbce2 100644 --- a/i18n/ru.i18n.json +++ b/i18n/ru.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Участники", "admin": "Администратор", "admin-desc": "Может просматривать и редактировать карточки, удалять участников и управлять настройками доски.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Все доски", "and-n-other-card": "И __count__ другая карточка", "and-n-other-card_plural": "И __count__ другие карточки", diff --git a/i18n/sr.i18n.json b/i18n/sr.i18n.json index 1659c722..9c1a8245 100644 --- a/i18n/sr.i18n.json +++ b/i18n/sr.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Članovi", "admin": "Administrator", "admin-desc": "Može da pregleda i menja kartice, uklanja članove i menja podešavanja table", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Sve table", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/sv.i18n.json b/i18n/sv.i18n.json index e980bd4d..574dc3e3 100644 --- a/i18n/sv.i18n.json +++ b/i18n/sv.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Medlemmar", "admin": "Adminstratör", "admin-desc": "Kan visa och redigera kort, ta bort medlemmar och ändra inställningarna för anslagstavlan.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Alla anslagstavlor", "and-n-other-card": "Och __count__ annat kort", "and-n-other-card_plural": "Och __count__ andra kort", diff --git a/i18n/ta.i18n.json b/i18n/ta.i18n.json index 3c6d5a52..c7794d4f 100644 --- a/i18n/ta.i18n.json +++ b/i18n/ta.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Members", "admin": "Admin", "admin-desc": "Can view and edit cards, remove members, and change settings for the board.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "All boards", "and-n-other-card": "And __count__ other card", "and-n-other-card_plural": "And __count__ other cards", diff --git a/i18n/th.i18n.json b/i18n/th.i18n.json index 8dc7ab8e..0568ceae 100644 --- a/i18n/th.i18n.json +++ b/i18n/th.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "สมาชิก", "admin": "ผู้ดูแลระบบ", "admin-desc": "สามารถดูและแก้ไขการ์ด ลบสมาชิก และเปลี่ยนการตั้งค่าบอร์ดได้", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "บอร์ดทั้งหมด", "and-n-other-card": "และการ์ดอื่น __count__", "and-n-other-card_plural": "และการ์ดอื่น ๆ __count__", diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json index 83186d66..b9270ae5 100644 --- a/i18n/tr.i18n.json +++ b/i18n/tr.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Üyeler", "admin": "Yönetici", "admin-desc": "Kartları görüntüleyebilir ve düzenleyebilir, üyeleri çıkarabilir ve pano ayarlarını değiştirebilir.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Tüm panolar", "and-n-other-card": "Ve __count__ diğer kart", "and-n-other-card_plural": "Ve __count__ diğer kart", diff --git a/i18n/uk.i18n.json b/i18n/uk.i18n.json index d298c2fa..04121321 100644 --- a/i18n/uk.i18n.json +++ b/i18n/uk.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Користувачі", "admin": "Адмін", "admin-desc": "Може переглядати і редагувати картки, відаляти учасників та змінювати налаштування для дошки.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Всі дошки", "and-n-other-card": "та __count__ інших карток", "and-n-other-card_plural": "та __count__ інших карток", diff --git a/i18n/vi.i18n.json b/i18n/vi.i18n.json index d6b805c2..6ae0d150 100644 --- a/i18n/vi.i18n.json +++ b/i18n/vi.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "Thành Viên", "admin": "Quản Trị Viên", "admin-desc": "Có thể xem và chỉnh sửa những thẻ, xóa thành viên và thay đổi cài đặt cho bảng.", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "Tất cả các bảng", "and-n-other-card": "Và __count__ thẻ khác", "and-n-other-card_plural": "Và __count__ thẻ khác", diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json index 64687d33..3c4fafb2 100644 --- a/i18n/zh-CN.i18n.json +++ b/i18n/zh-CN.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "成员", "admin": "管理员", "admin-desc": "可以浏览并编辑卡片,移除成员,并且更改该看板的设置", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "全部看板", "and-n-other-card": "和其他 __count__ 个卡片", "and-n-other-card_plural": "和其他 __count__ 个卡片", diff --git a/i18n/zh-TW.i18n.json b/i18n/zh-TW.i18n.json index 3c9224b4..60045b91 100644 --- a/i18n/zh-TW.i18n.json +++ b/i18n/zh-TW.i18n.json @@ -54,6 +54,9 @@ "addMemberPopup-title": "成員", "admin": "管理員", "admin-desc": "可以瀏覽並編輯卡片,移除成員,並且更改該看板的設定", + "admin-announcement": "Announcement", + "admin-announcement-active": "Active System-Wide Announcement", + "admin-announcement-title": "Announcement from Administrator", "all-boards": "全部看板", "and-n-other-card": "和其他 __count__ 個卡片", "and-n-other-card_plural": "和其他 __count__ 個卡片", -- cgit v1.2.3-1-g7c22 From 8df9e681ed28b29f90a787beabaea16c324a1852 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sun, 1 Oct 2017 10:44:06 +0300 Subject: Fix lint errors. --- client/components/lists/listBody.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 794f33c2..b9365448 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -83,10 +83,8 @@ BlazeComponent.extendComponent({ evt.stopImmediatePropagation(); evt.preventDefault(); Utils.goBoardId(Session.get('currentBoard')); - } else { - if (!Meteor.user().hasHiddenSystemMessages()) { - $('.toggle-switch').prop('checked', false); - } + } else if (!Meteor.user().hasHiddenSystemMessages()) { + $('.toggle-switch').prop('checked', false); } }, -- cgit v1.2.3-1-g7c22