瀏覽代碼

Merge branch 'bentiss-ui-fixes' into edge

Lauri Ojansivu 6 年之前
父節點
當前提交
c72b3a870e
共有 2 個文件被更改,包括 12 次插入3 次删除
  1. 2 3
      client/components/lists/listHeader.jade
  2. 10 0
      client/components/lists/listHeader.js

+ 2 - 3
client/components/lists/listHeader.jade

@@ -15,9 +15,8 @@ template(name="listHeader")
          |/#{wipLimit.value})
          |/#{wipLimit.value})
 
 
         if showCardsCountForList cards.count
         if showCardsCountForList cards.count
-          = cards.count
-          span
-            |  {{_ 'cards-count'}}
+          | 
+          p.quiet.small {{cardsCount}} {{_ 'cards-count'}}
       if isMiniScreen
       if isMiniScreen
         if currentList
         if currentList
           if isWatching
           if isWatching

+ 10 - 0
client/components/lists/listHeader.js

@@ -22,6 +22,16 @@ BlazeComponent.extendComponent({
     return Meteor.user().getLimitToShowCardsCount();
     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() {
   reachedWipLimit() {
     const list = Template.currentData();
     const list = Template.currentData();
     return list.getWipLimit('enabled') && list.getWipLimit('value') <= list.cards().count();
     return list.getWipLimit('enabled') && list.getWipLimit('value') <= list.cards().count();