mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Avoid setting same card as parentCard.
Avoid listing templates board in copy/move/more menus
This commit is contained in:
parent
18cccd514f
commit
745f39ed20
1 changed files with 9 additions and 1 deletions
|
@ -430,6 +430,7 @@ BlazeComponent.extendComponent({
|
||||||
const boards = Boards.find({
|
const boards = Boards.find({
|
||||||
archived: false,
|
archived: false,
|
||||||
'members.userId': Meteor.userId(),
|
'members.userId': Meteor.userId(),
|
||||||
|
_id: {$ne: Meteor.user().getTemplatesBoardId()},
|
||||||
}, {
|
}, {
|
||||||
sort: ['title'],
|
sort: ['title'],
|
||||||
});
|
});
|
||||||
|
@ -589,6 +590,9 @@ BlazeComponent.extendComponent({
|
||||||
const boards = Boards.find({
|
const boards = Boards.find({
|
||||||
archived: false,
|
archived: false,
|
||||||
'members.userId': Meteor.userId(),
|
'members.userId': Meteor.userId(),
|
||||||
|
_id: {
|
||||||
|
$ne: Meteor.user().getTemplatesBoardId(),
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
sort: ['title'],
|
sort: ['title'],
|
||||||
});
|
});
|
||||||
|
@ -596,8 +600,12 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
cards() {
|
cards() {
|
||||||
|
const currentId = Session.get('currentCard');
|
||||||
if (this.parentBoard) {
|
if (this.parentBoard) {
|
||||||
return this.parentBoard.cards();
|
return Cards.find({
|
||||||
|
boardId: this.parentBoard,
|
||||||
|
_id: {$ne: currentId},
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue