diff --git a/services/web/app/coffee/infrastructure/ExpressLocals.coffee b/services/web/app/coffee/infrastructure/ExpressLocals.coffee index c99cc2935e..bd65daf49c 100644 --- a/services/web/app/coffee/infrastructure/ExpressLocals.coffee +++ b/services/web/app/coffee/infrastructure/ExpressLocals.coffee @@ -307,4 +307,5 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)-> chatMessageBorderLightness : if isOl then "40%" else "70%" chatMessageBgSaturation : if isOl then "85%" else "60%" chatMessageBgLightness : if isOl then "40%" else "97%" + renderAnnouncements : if isOl then false else true next() diff --git a/services/web/app/views/project/list.pug b/services/web/app/views/project/list.pug index 7ee28763a8..4ef8df3697 100644 --- a/services/web/app/views/project/list.pug +++ b/services/web/app/views/project/list.pug @@ -16,45 +16,46 @@ block content } }; - .announcements( - ng-controller="AnnouncementsController" - ng-class="{ 'announcements-open': ui.isOpen }" - ng-cloak - ) - .announcements-backdrop( - ng-if="ui.isOpen" - ng-click="toggleAnnouncementsUI();" + if uiConfig.renderAnnouncements + .announcements( + ng-controller="AnnouncementsController" + ng-class="{ 'announcements-open': ui.isOpen }" + ng-cloak ) - a.announcements-btn( - href - ng-if="announcements.length" - ng-click="toggleAnnouncementsUI();" - ng-class="{ 'announcements-btn-open': ui.isOpen, 'announcements-btn-has-new': ui.newItems }" - ) - span.announcements-badge(ng-if="ui.newItems") {{ ui.newItems }} - .announcements-body( - ng-if="ui.isOpen" - ) - .announcements-scroller - .announcement( - ng-repeat="announcement in announcements | filter:(ui.newItems ? { read: false } : '') track by announcement.id" - ) - h2.announcement-header {{ announcement.title }} - p.announcement-description(ng-bind-html="announcement.excerpt") - .announcement-meta - p.announcement-date {{ announcement.date | date:"longDate" }} - a.announcement-link( - ng-href="{{ announcement.url }}" - ng-click="logAnnouncementClick()", - target="_blank" - ) Read more - div.text-center( - ng-if="ui.newItems > 0 && ui.newItems < announcements.length" - ) - a.btn.btn-default.btn-sm( - href - ng-click="showAll();" - ) Show all + .announcements-backdrop( + ng-if="ui.isOpen" + ng-click="toggleAnnouncementsUI();" + ) + a.announcements-btn( + href + ng-if="announcements.length" + ng-click="toggleAnnouncementsUI();" + ng-class="{ 'announcements-btn-open': ui.isOpen, 'announcements-btn-has-new': ui.newItems }" + ) + span.announcements-badge(ng-if="ui.newItems") {{ ui.newItems }} + .announcements-body( + ng-if="ui.isOpen" + ) + .announcements-scroller + .announcement( + ng-repeat="announcement in announcements | filter:(ui.newItems ? { read: false } : '') track by announcement.id" + ) + h2.announcement-header {{ announcement.title }} + p.announcement-description(ng-bind-html="announcement.excerpt") + .announcement-meta + p.announcement-date {{ announcement.date | date:"longDate" }} + a.announcement-link( + ng-href="{{ announcement.url }}" + ng-click="logAnnouncementClick()", + target="_blank" + ) Read more + div.text-center( + ng-if="ui.newItems > 0 && ui.newItems < announcements.length" + ) + a.btn.btn-default.btn-sm( + href + ng-click="showAll();" + ) Show all .content.content-alt.project-list-page(ng-controller="ProjectPageController") .project-list-content