mirror of
https://github.com/wekan/wekan.git
synced 2026-02-07 09:01:47 +01:00
Implement board archive and restoration
This commit is contained in:
parent
9faaf07e02
commit
48ac8b026f
32 changed files with 138 additions and 42 deletions
35
client/components/boards/boardArchive.js
Normal file
35
client/components/boards/boardArchive.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
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')
|
||||
Loading…
Add table
Add a link
Reference in a new issue