mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 08:20:12 +01:00
Fix details view in lists only mode
This commit is contained in:
parent
d3c110cd8f
commit
ff9ca755f3
3 changed files with 22 additions and 2 deletions
13
client/components/lists/listsGroup.js
Normal file
13
client/components/lists/listsGroup.js
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
BlazeComponent.extendComponent({
|
||||||
|
currentCardIsInThisList(listId, swimlaneId) {
|
||||||
|
const currentCard = Cards.findOne(Session.get('currentCard'));
|
||||||
|
const currentBoardId = Session.get('currentBoard');
|
||||||
|
const board = Boards.findOne(currentBoardId);
|
||||||
|
if (board.view === 'board-view-lists')
|
||||||
|
return currentCard && currentCard.listId === listId;
|
||||||
|
else if (board.view === 'board-view-swimlanes')
|
||||||
|
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
}).register('listsGroup');
|
||||||
|
|
@ -33,7 +33,7 @@ template(name="listsGroup")
|
||||||
else
|
else
|
||||||
each currentBoard.lists
|
each currentBoard.lists
|
||||||
+list(this)
|
+list(this)
|
||||||
if currentCardIsInThisList
|
if currentCardIsInThisList _id null
|
||||||
+cardDetails(currentCard)
|
+cardDetails(currentCard)
|
||||||
if currentUser.isBoardMember
|
if currentUser.isBoardMember
|
||||||
+addListForm
|
+addListForm
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,14 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
currentCardIsInThisList(listId, swimlaneId) {
|
currentCardIsInThisList(listId, swimlaneId) {
|
||||||
const currentCard = Cards.findOne(Session.get('currentCard'));
|
const currentCard = Cards.findOne(Session.get('currentCard'));
|
||||||
|
const currentBoardId = Session.get('currentBoard');
|
||||||
|
const board = Boards.findOne(currentBoardId);
|
||||||
|
if (board.view === 'board-view-lists')
|
||||||
|
return currentCard && currentCard.listId === listId;
|
||||||
|
else if (board.view === 'board-view-swimlanes')
|
||||||
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
|
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
events() {
|
events() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue