mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
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
This commit is contained in:
parent
64bf455b29
commit
cdf070189e
7 changed files with 61 additions and 10 deletions
|
|
@ -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;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue