summaryrefslogtreecommitdiffstats
path: root/client/components/lists/listBody.js
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2019-02-23 01:40:11 +0100
committerAndrés Manelli <andresmanelli@gmail.com>2019-02-24 00:05:00 +0100
commitcdf070189e11205eecd11641226ae62964cc03e1 (patch)
treea5f0d59fa0a7cb117f3a6b63c2fe8b229b055f7b /client/components/lists/listBody.js
parent64bf455b296a10369e8318183c2c6cd61a122869 (diff)
downloadwekan-cdf070189e11205eecd11641226ae62964cc03e1.tar.gz
wekan-cdf070189e11205eecd11641226ae62964cc03e1.tar.bz2
wekan-cdf070189e11205eecd11641226ae62964cc03e1.zip
Remove links from templates board for the moment
Insert the correct template type in templates board Allow independant lists in templates board Add some helpers
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;
},