Add message from service administrator

This commit is contained in:
nztqa 2017-09-28 16:57:04 +09:00
parent eb945f26a3
commit aa1876f94c
10 changed files with 135 additions and 4 deletions

View file

@ -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

View file

@ -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();
},
});

View file

@ -197,6 +197,7 @@
li
height: 28px
.announcement,
.offline-warning
width: 100%
text-align: center