mirror of
https://github.com/wekan/wekan.git
synced 2026-02-04 23:51:48 +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
|
|
@ -27,6 +27,13 @@ Lists.attachSchema(new SimpleSchema({
|
|||
*/
|
||||
type: String,
|
||||
},
|
||||
swimlaneId: {
|
||||
/**
|
||||
* the swimalen associated to this list. Used for templates
|
||||
*/
|
||||
type: String,
|
||||
defaultValue: '',
|
||||
},
|
||||
createdAt: {
|
||||
/**
|
||||
* creation date
|
||||
|
|
|
|||
|
|
@ -108,6 +108,13 @@ Swimlanes.helpers({
|
|||
}), { sort: ['sort'] });
|
||||
},
|
||||
|
||||
lists() {
|
||||
return Lists.find(Filter.mongoSelector({
|
||||
swimlaneId: this._id,
|
||||
archived: false,
|
||||
}), { sort: ['sort'] });
|
||||
},
|
||||
|
||||
allCards() {
|
||||
return Cards.find({ swimlaneId: this._id });
|
||||
},
|
||||
|
|
@ -129,6 +136,21 @@ Swimlanes.helpers({
|
|||
isTemplateContainer() {
|
||||
return this.type === 'template-container';
|
||||
},
|
||||
|
||||
isListTemplatesSwimlane() {
|
||||
const user = Users.findOne(Meteor.userId());
|
||||
return user.profile.listTemplatesSwimlaneId === this._id;
|
||||
},
|
||||
|
||||
isCardTemplatesSwimlane() {
|
||||
const user = Users.findOne(Meteor.userId());
|
||||
return user.profile.cardTemplatesSwimlaneId === this._id;
|
||||
},
|
||||
|
||||
isBoardTemplatesSwimlane() {
|
||||
const user = Users.findOne(Meteor.userId());
|
||||
return user.profile.boardsTemplatesSwimlaneId === this._id;
|
||||
},
|
||||
});
|
||||
|
||||
Swimlanes.mutations({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue