Add popup menu and archive action

This commit is contained in:
Andrés Manelli 2018-02-01 14:23:27 -03:00
parent 3414cb84ad
commit 5953fb8a44
7 changed files with 57 additions and 2 deletions

View file

@ -25,3 +25,14 @@ template(name="archivesSidebar")
= title
else
li.no-items-message {{_ 'no-archived-lists'}}
+tabContent(slug="swimlanes")
ul.archived-lists
each archivedSwimlanes
li.archived-lists-item
if currentUser.isBoardMember
button.js-restore-swimlane
i.fa.fa-undo
= title
else
li.no-items-message {{_ 'no-archived-swimlanes'}}

View file

@ -3,6 +3,7 @@ BlazeComponent.extendComponent({
return [
{ name: TAPi18n.__('cards'), slug: 'cards' },
{ name: TAPi18n.__('lists'), slug: 'lists' },
{ name: TAPi18n.__('swimlanes'), slug: 'swimlanes' },
];
},
@ -20,6 +21,13 @@ BlazeComponent.extendComponent({
});
},
archivedSwimlanes() {
return Swimlanes.find({
archived: true,
boardId: Session.get('currentBoard'),
});
},
cardIsInArchivedList() {
return this.currentData().list().archived;
},
@ -45,6 +53,10 @@ BlazeComponent.extendComponent({
const list = this.currentData();
list.restore();
},
'click .js-restore-swimlane'() {
const swimlane = this.currentData();
swimlane.restore();
},
}];
},
}).register('archivesSidebar');