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'}}
|
| {{_ 'tableVisibilityMode-allowPrivateOnly'}}
|
||||||
else
|
else
|
||||||
.board-wrapper(class=currentBoard.colorClass)
|
.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 Sidebar.isOpen}}is-sibling-sidebar-open{{/if}}"
|
||||||
class="{{#if MultiSelection.isActive}}is-multiselection-active{{/if}}"
|
class="{{#if MultiSelection.isActive}}is-multiselection-active{{/if}}"
|
||||||
class="{{#if draggingActive.get}}is-dragging-active{{/if}}")
|
class="{{#if draggingActive.get}}is-dragging-active{{/if}}")
|
||||||
|
@ -27,8 +28,13 @@ template(name="boardBody")
|
||||||
each currentBoard.swimlanes
|
each currentBoard.swimlanes
|
||||||
+swimlane(this)
|
+swimlane(this)
|
||||||
else if isViewSwimlanes
|
else if isViewSwimlanes
|
||||||
each currentBoard.swimlanes
|
if hasSwimlanes
|
||||||
+swimlane(this)
|
each currentBoard.swimlanes
|
||||||
|
+swimlane(this)
|
||||||
|
else
|
||||||
|
a.js-empty-board-add-swimlane(title="{{_ 'add-swimlane'}}")
|
||||||
|
h1.big-message.quiet
|
||||||
|
| {{_ 'add-swimlane'}} +
|
||||||
else if isViewLists
|
else if isViewLists
|
||||||
+listsGroup(currentBoard)
|
+listsGroup(currentBoard)
|
||||||
else if isViewCalendar
|
else if isViewCalendar
|
||||||
|
|
|
@ -248,6 +248,10 @@ BlazeComponent.extendComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hasSwimlanes() {
|
||||||
|
return Utils.getCurrentBoard().swimlanes().length > 0;
|
||||||
|
},
|
||||||
|
|
||||||
isViewLists() {
|
isViewLists() {
|
||||||
const currentUser = ReactiveCache.getCurrentUser();
|
const currentUser = ReactiveCache.getCurrentUser();
|
||||||
if (currentUser) {
|
if (currentUser) {
|
||||||
|
@ -288,6 +292,7 @@ BlazeComponent.extendComponent({
|
||||||
this._isDragging = false;
|
this._isDragging = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'click .js-empty-board-add-swimlane': Popup.open('swimlaneAdd'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
|
@ -143,7 +143,7 @@ BlazeComponent.extendComponent({
|
||||||
Swimlanes.insert({
|
Swimlanes.insert({
|
||||||
title,
|
title,
|
||||||
boardId: Session.get('currentBoard'),
|
boardId: Session.get('currentBoard'),
|
||||||
sort: sortValue.base,
|
sort: sortValue.base || 0,
|
||||||
type: swimlaneType,
|
type: swimlaneType,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue