mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Display new swimlane creation button when no swimlanes exist
This commit is contained in:
parent
fecae8d0a3
commit
96e11cb727
3 changed files with 15 additions and 4 deletions
|
@ -17,7 +17,8 @@ template(name="boardBody")
|
|||
| {{_ 'tableVisibilityMode-allowPrivateOnly'}}
|
||||
else
|
||||
.board-wrapper(class=currentBoard.colorClass)
|
||||
.board-canvas.js-swimlanes.dragscroll(
|
||||
.board-canvas.js-swimlanes(
|
||||
class="{{#if hasSwimlanes}}dragscroll{{/if}}"
|
||||
class="{{#if Sidebar.isOpen}}is-sibling-sidebar-open{{/if}}"
|
||||
class="{{#if MultiSelection.isActive}}is-multiselection-active{{/if}}"
|
||||
class="{{#if draggingActive.get}}is-dragging-active{{/if}}")
|
||||
|
@ -27,8 +28,13 @@ template(name="boardBody")
|
|||
each currentBoard.swimlanes
|
||||
+swimlane(this)
|
||||
else if isViewSwimlanes
|
||||
each currentBoard.swimlanes
|
||||
+swimlane(this)
|
||||
if hasSwimlanes
|
||||
each currentBoard.swimlanes
|
||||
+swimlane(this)
|
||||
else
|
||||
a.js-empty-board-add-swimlane(title="{{_ 'add-swimlane'}}")
|
||||
h1.big-message.quiet
|
||||
| {{_ 'add-swimlane'}} +
|
||||
else if isViewLists
|
||||
+listsGroup(currentBoard)
|
||||
else if isViewCalendar
|
||||
|
|
|
@ -248,6 +248,10 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
},
|
||||
|
||||
hasSwimlanes() {
|
||||
return Utils.getCurrentBoard().swimlanes().length > 0;
|
||||
},
|
||||
|
||||
isViewLists() {
|
||||
const currentUser = ReactiveCache.getCurrentUser();
|
||||
if (currentUser) {
|
||||
|
@ -288,6 +292,7 @@ BlazeComponent.extendComponent({
|
|||
this._isDragging = false;
|
||||
}
|
||||
},
|
||||
'click .js-empty-board-add-swimlane': Popup.open('swimlaneAdd'),
|
||||
},
|
||||
];
|
||||
},
|
||||
|
|
|
@ -143,7 +143,7 @@ BlazeComponent.extendComponent({
|
|||
Swimlanes.insert({
|
||||
title,
|
||||
boardId: Session.get('currentBoard'),
|
||||
sort: sortValue.base,
|
||||
sort: sortValue.base || 0,
|
||||
type: swimlaneType,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue