boardArchive.js 577 B

12345678910111213141516171819202122232425262728293031
  1. Template.headerTitle.events({
  2. 'click .js-open-archived-board'() {
  3. Modal.open('archivedBoards');
  4. },
  5. });
  6. BlazeComponent.extendComponent({
  7. template() {
  8. return 'archivedBoards';
  9. },
  10. onCreated() {
  11. this.subscribe('archivedBoards');
  12. },
  13. archivedBoards() {
  14. return Boards.find({ archived: true }, {
  15. sort: ['title'],
  16. });
  17. },
  18. events() {
  19. return [{
  20. 'click .js-restore-board'() {
  21. const board = this.currentData();
  22. board.restore();
  23. Utils.goBoardId(board._id);
  24. },
  25. }];
  26. },
  27. }).register('archivedBoards');