diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2018-07-26 15:50:51 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2018-10-25 16:18:02 +0200 |
commit | e57269ed57d5870083da91bdfde69f7ebe6bd139 (patch) | |
tree | 8357f23a8975ff5da2879e9409c9fe304f54cca7 /client | |
parent | 05e0fb8fbe0676babdc07e2c13a3290edad66783 (diff) | |
download | wekan-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.jade | 2 | ||||
-rw-r--r-- | client/components/lists/listHeader.js | 10 |
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 | - 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(); |