summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2018-07-26 15:50:51 +0200
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>2018-10-25 16:18:02 +0200
commite57269ed57d5870083da91bdfde69f7ebe6bd139 (patch)
tree8357f23a8975ff5da2879e9409c9fe304f54cca7 /client
parent05e0fb8fbe0676babdc07e2c13a3290edad66783 (diff)
downloadwekan-e57269ed57d5870083da91bdfde69f7ebe6bd139.tar.gz
wekan-e57269ed57d5870083da91bdfde69f7ebe6bd139.tar.bz2
wekan-e57269ed57d5870083da91bdfde69f7ebe6bd139.zip
UI: lists: only output the number of cards for each swimlane
Diffstat (limited to 'client')
-rw-r--r--client/components/lists/listHeader.jade2
-rw-r--r--client/components/lists/listHeader.js10
2 files changed, 11 insertions, 1 deletions
diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade
index 45c07cb5..25ab8c20 100644
--- a/client/components/lists/listHeader.jade
+++ b/client/components/lists/listHeader.jade
@@ -16,7 +16,7 @@ template(name="listHeader")
if showCardsCountForList cards.count
|&nbsp;
- p.quiet.small {{cards.count}} {{_ 'cards-count'}}
+ p.quiet.small {{cardsCount}} {{_ 'cards-count'}}
if isMiniScreen
if currentList
if isWatching
diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js
index 4b6bf196..abcc4639 100644
--- a/client/components/lists/listHeader.js
+++ b/client/components/lists/listHeader.js
@@ -22,6 +22,16 @@ BlazeComponent.extendComponent({
return Meteor.user().getLimitToShowCardsCount();
},
+ cardsCount() {
+ const list = Template.currentData();
+ let swimlaneId = '';
+ const boardView = Meteor.user().profile.boardView;
+ if (boardView === 'board-view-swimlanes')
+ swimlaneId = this.parentComponent().parentComponent().data()._id;
+
+ return list.cards(swimlaneId).count();
+ },
+
reachedWipLimit() {
const list = Template.currentData();
return list.getWipLimit('enabled') && list.getWipLimit('value') <= list.cards().count();