wekan/client/components/boards/boardArchive.js
Maxime Quandalle f30c776f20 Fix home header bar
The issue was introduced in 3b2eb0f but was only partially fixed (in
urgency) in 71b9a42. We sould have test to avoid these trivial
regressions! (I guess React will also yelp in this particular case by
removing the need to link the template and the "component", and thus
removing the possibility to break this link)

Fixes #434
2015-12-19 17:39:38 +01:00

31 lines
584 B
JavaScript

Template.boardListHeaderBar.events({
'click .js-open-archived-board'() {
Modal.open('archivedBoards');
},
});
BlazeComponent.extendComponent({
template() {
return 'archivedBoards';
},
onCreated() {
this.subscribe('archivedBoards');
},
archivedBoards() {
return Boards.find({ archived: true }, {
sort: ['title'],
});
},
events() {
return [{
'click .js-restore-board'() {
const board = this.currentData();
board.restore();
Utils.goBoardId(board._id);
},
}];
},
}).register('archivedBoards');