summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.eslintrc.json3
-rw-r--r--CHANGELOG.md3
-rw-r--r--client/components/lists/listBody.js6
-rw-r--r--client/components/main/header.jade7
-rw-r--r--client/components/main/header.js14
-rw-r--r--client/components/main/header.styl1
-rw-r--r--client/components/settings/settingBody.jade20
-rw-r--r--client/components/settings/settingBody.js45
-rw-r--r--client/components/settings/settingBody.styl7
-rw-r--r--i18n/ar.i18n.json3
-rw-r--r--i18n/br.i18n.json3
-rw-r--r--i18n/ca.i18n.json3
-rw-r--r--i18n/cs.i18n.json3
-rw-r--r--i18n/de.i18n.json3
-rw-r--r--i18n/en-GB.i18n.json3
-rw-r--r--i18n/en.i18n.json3
-rw-r--r--i18n/eo.i18n.json3
-rw-r--r--i18n/es.i18n.json3
-rw-r--r--i18n/eu.i18n.json3
-rw-r--r--i18n/fa.i18n.json3
-rw-r--r--i18n/fi.i18n.json3
-rw-r--r--i18n/fr.i18n.json3
-rw-r--r--i18n/gl.i18n.json3
-rw-r--r--i18n/he.i18n.json3
-rw-r--r--i18n/hu.i18n.json3
-rw-r--r--i18n/id.i18n.json3
-rw-r--r--i18n/it.i18n.json3
-rw-r--r--i18n/ja.i18n.json3
-rw-r--r--i18n/ko.i18n.json3
-rw-r--r--i18n/nb.i18n.json3
-rw-r--r--i18n/nl.i18n.json3
-rw-r--r--i18n/pl.i18n.json3
-rw-r--r--i18n/pt-BR.i18n.json3
-rw-r--r--i18n/ro.i18n.json3
-rw-r--r--i18n/ru.i18n.json3
-rw-r--r--i18n/sr.i18n.json3
-rw-r--r--i18n/sv.i18n.json3
-rw-r--r--i18n/ta.i18n.json3
-rw-r--r--i18n/th.i18n.json3
-rw-r--r--i18n/tr.i18n.json3
-rw-r--r--i18n/uk.i18n.json3
-rw-r--r--i18n/vi.i18n.json3
-rw-r--r--i18n/zh-CN.i18n.json3
-rw-r--r--i18n/zh-TW.i18n.json3
-rw-r--r--models/announcements.js36
-rw-r--r--server/publications/announcements.js3
46 files changed, 241 insertions, 9 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 51b2037f..b93dd916 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -130,6 +130,7 @@
"Authentication": true,
"Integrations": true,
"HTTP": true,
- "AccountSettings": true
+ "AccountSettings": true,
+ "Announcements": true
}
}
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:
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);
}
},
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..c8f415df 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 announcements = Announcements.findOne();
+ return announcements && announcements.enabled;
+ },
+
+ announcement() {
+ $('.announcement').show();
+ const announcements = Announcements.findOne();
+ return announcements && announcements.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..2152cc2c 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="announcement-setting") {{_ 'admin-announcement'}}
.main-body
if loading.get
+spinner
@@ -23,6 +25,8 @@ template(name="setting")
+email
else if accountSetting.get
+accountSettings
+ else if announcementSetting.get
+ +announcementSettings
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='announcementSettings')
+ ul#announcement-setting.setting-detail
+ li
+ a.flex.js-toggle-activemessage
+ .materialCheckBox(class="{{#if currentSetting.enabled}}is-checked{{/if}}")
+
+ span {{_ 'admin-announcement-active'}}
+ li
+ .admin-announcement(class="{{#if currentSetting.enabled}}{{else}}hide{{/if}}")
+ ul
+ li
+ .title {{_ 'admin-announcement-title'}}
+ textarea#admin-announcement.form-control= currentSetting.body
+ li
+ button.js-announcement-save.primary {{_ 'save'}}
diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js
index a2993426..27f690ee 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('announcements');
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.announcementSetting = 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.announcementSetting.set('announcement-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 Announcements.findOne();
+ },
+
+ saveMessage() {
+ const message = $('#admin-announcement').val().trim();
+ Announcements.update(Announcements.findOne()._id, {
+ $set: { 'body': message },
+ });
+ },
+
+ toggleActive(){
+ this.setLoading(true);
+ const isActive = this.currentSetting().enabled;
+ Announcements.update(Announcements.findOne()._id, {
+ $set:{ 'enabled': !isActive},
+ });
+ this.setLoading(false);
+ if(isActive){
+ $('.admin-announcement').slideUp();
+ }else{
+ $('.admin-announcement').slideDown();
+ }
+ },
+
+ events() {
+ return [{
+ 'click a.js-toggle-activemessage': this.toggleActive,
+ 'click button.js-announcement-save': this.saveMessage,
+ }];
+ },
+}).register('announcementSettings');
diff --git a/client/components/settings/settingBody.styl b/client/components/settings/settingBody.styl
index 118d364c..fec64cee 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-announcement,
.invite-people
padding-left 20px;
li
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/en.i18n.json b/i18n/en.i18n.json
index 466f58dd..95be9865 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-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__ 個卡片",
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/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();
+});