mirror of
https://github.com/wekan/wekan.git
synced 2026-02-22 16:04:08 +01:00
Allow toogle of lists and swimlanes views
This commit is contained in:
parent
a14f4ffee2
commit
7b04f14e3c
7 changed files with 51 additions and 8 deletions
|
|
@ -20,5 +20,8 @@ template(name="boardBody")
|
|||
class="{{#if draggingActive.get}}is-dragging-active{{/if}}")
|
||||
if showOverlay.get
|
||||
.board-overlay
|
||||
each currentBoard.swimlanes
|
||||
+swimlane(this)
|
||||
if isViewSwimlanes
|
||||
each currentBoard.swimlanes
|
||||
+swimlane(this)
|
||||
if isViewLists
|
||||
+listsGroup
|
||||
|
|
|
|||
|
|
@ -47,6 +47,18 @@ BlazeComponent.extendComponent({
|
|||
return Utils.isMiniScreen() && Session.get('currentCard');
|
||||
},
|
||||
|
||||
isViewSwimlanes() {
|
||||
const currentBoardId = Session.get('currentBoard');
|
||||
const board = Boards.findOne(currentBoardId);
|
||||
return (board.view === 'board-view-swimlanes');
|
||||
},
|
||||
|
||||
isViewLists() {
|
||||
const currentBoardId = Session.get('currentBoard');
|
||||
const board = Boards.findOne(currentBoardId);
|
||||
return (board.view === 'board-view-lists');
|
||||
},
|
||||
|
||||
events() {
|
||||
return [{
|
||||
// XXX The board-overlay div should probably be moved to the parent
|
||||
|
|
|
|||
|
|
@ -82,13 +82,13 @@ BlazeComponent.extendComponent({
|
|||
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',
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue