mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
36 lines
665 B
JavaScript
36 lines
665 B
JavaScript
![]() |
Template.headerTitle.events({
|
||
|
'click .js-open-archived-board': function() {
|
||
|
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': function() {
|
||
|
let boardId = this.currentData()._id
|
||
|
Boards.update(boardId, {
|
||
|
$set: {
|
||
|
archived: false
|
||
|
}
|
||
|
})
|
||
|
Utils.goBoardId(boardId)
|
||
|
}
|
||
|
}]
|
||
|
},
|
||
|
}).register('archivedBoards')
|