blob: 9d7ca7f24b49a3f3531e3b73efa604c098729b31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
Template.headerTitle.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 boardId = this.currentData()._id;
Boards.update(boardId, {
$set: {
archived: false,
},
});
Utils.goBoardId(boardId);
},
}];
},
}).register('archivedBoards');
|