summaryrefslogtreecommitdiffstats
path: root/client/components/lists/listBody.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/lists/listBody.js')
-rw-r--r--client/components/lists/listBody.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 0f5caac5..576bcd9f 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -70,7 +70,11 @@ BlazeComponent.extendComponent({
const boardId = this.data().board();
let swimlaneId = '';
const boardView = Meteor.user().profile.boardView;
- if (boardView === 'board-view-swimlanes')
+ let cardType = 'cardType-card';
+ if (this.data().board().isTemplatesBoard()) {
+ swimlaneId = this.parentComponent().parentComponent().data()._id; // Always swimlanes view
+ cardType = (Swimlanes.findOne(swimlaneId).isCardTemplatesSwimlane())?'template-card':'cardType-card';
+ } else if (boardView === 'board-view-swimlanes')
swimlaneId = this.parentComponent().parentComponent().data()._id;
else if ((boardView === 'board-view-lists') || (boardView === 'board-view-cal'))
swimlaneId = boardId.getDefaultSwimline()._id;
@@ -85,7 +89,7 @@ BlazeComponent.extendComponent({
boardId: boardId._id,
sort: sortIndex,
swimlaneId,
- type: 'cardType-card',
+ type: cardType,
});
// if the displayed card count is less than the total cards in the list,
@@ -149,7 +153,8 @@ BlazeComponent.extendComponent({
idOrNull(swimlaneId) {
const currentUser = Meteor.user();
- if (currentUser.profile.boardView === 'board-view-swimlanes')
+ if (currentUser.profile.boardView === 'board-view-swimlanes'
+ || this.data().board().isTemplatesBoard())
return swimlaneId;
return undefined;
},