mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 23:21:47 +01:00
Add view boards field to change between views
This commit is contained in:
parent
2d7d9b5d9f
commit
a14f4ffee2
5 changed files with 44 additions and 0 deletions
|
|
@ -87,6 +87,11 @@ template(name="boardHeaderBar")
|
|||
a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
|
||||
i.fa.fa-times-thin
|
||||
|
||||
a.board-header-btn.js-toggle-board-view(
|
||||
title="{{_ 'board-view'}}")
|
||||
i.fa.fa-th-large
|
||||
span {{_ currentBoard.view}}
|
||||
|
||||
if canModifyBoard
|
||||
a.board-header-btn.js-multiselection-activate(
|
||||
title="{{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}"
|
||||
|
|
|
|||
|
|
@ -76,6 +76,22 @@ BlazeComponent.extendComponent({
|
|||
'click .js-open-archived-board'() {
|
||||
Modal.open('archivedBoards');
|
||||
},
|
||||
'click .js-toggle-board-view'() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
if (currentBoard.view === 'board-view-swimlanes') {
|
||||
Boards.update(currentBoard._id, {
|
||||
$set: {
|
||||
view: 'board-view-lists',
|
||||
}
|
||||
});
|
||||
} else if (currentBoard.view === 'board-view-lists') {
|
||||
Boards.update(currentBoard._id, {
|
||||
$set: {
|
||||
view: 'board-view-swimlanes',
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'click .js-open-filter-view'() {
|
||||
Sidebar.setView('filter');
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue