From 58ab888f3f915df8b2272fce5e076f92d9a3fd85 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Wed, 7 Dec 2016 14:57:54 +0000 Subject: [PATCH] Add a button to show all, when filtering new items. --- services/web/app/views/project/list.jade | 7 +++++++ services/web/public/coffee/main/announcements.coffee | 2 ++ 2 files changed, 9 insertions(+) diff --git a/services/web/app/views/project/list.jade b/services/web/app/views/project/list.jade index 476ef0ca4c..ac852da97e 100644 --- a/services/web/app/views/project/list.jade +++ b/services/web/app/views/project/list.jade @@ -52,6 +52,13 @@ block content ng-href="{{ announcement.url }}" 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 .row(ng-cloak) span(ng-if="projects.length > 0") diff --git a/services/web/public/coffee/main/announcements.coffee b/services/web/public/coffee/main/announcements.coffee index 94303e921a..cccebf56ad 100644 --- a/services/web/public/coffee/main/announcements.coffee +++ b/services/web/public/coffee/main/announcements.coffee @@ -24,4 +24,6 @@ define [ $scope.ui.newItems = 0 markAnnouncementsAsRead() + $scope.showAll = -> + $scope.ui.newItems = 0