mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Links for parents in card details.
This commit is contained in:
parent
3a4a075dba
commit
bac490d2f3
2 changed files with 19 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ template(name="cardDetails")
|
||||||
.card-details-path
|
.card-details-path
|
||||||
each parentList
|
each parentList
|
||||||
| >
|
| >
|
||||||
a.js-parent-card {{title}}
|
a.js-parent-card(href=linkForCard) {{title}}
|
||||||
// else
|
// else
|
||||||
{{_ 'top-level-card'}}
|
{{_ 'top-level-card'}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,11 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
onCreated() {
|
onCreated() {
|
||||||
|
this.currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||||
this.isLoaded = new ReactiveVar(false);
|
this.isLoaded = new ReactiveVar(false);
|
||||||
const boardBody = this.parentComponent().parentComponent();
|
const boardBody = this.parentComponent().parentComponent();
|
||||||
//in Miniview parent is Board, not BoardBody.
|
//in Miniview parent is Board, not BoardBody.
|
||||||
if (boardBody !== null){
|
if (boardBody !== null) {
|
||||||
boardBody.showOverlay.set(true);
|
boardBody.showOverlay.set(true);
|
||||||
boardBody.mouseHasEnterCardDetails = false;
|
boardBody.mouseHasEnterCardDetails = false;
|
||||||
}
|
}
|
||||||
|
|
@ -78,6 +79,22 @@ BlazeComponent.extendComponent({
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
linkForCard() {
|
||||||
|
const card = this.currentData();
|
||||||
|
let result = '#';
|
||||||
|
if (card) {
|
||||||
|
const board = Boards.findOne(card.boardId);
|
||||||
|
if (board) {
|
||||||
|
result = FlowRouter.url('card', {
|
||||||
|
boardId: card.boardId,
|
||||||
|
slug: board.slug,
|
||||||
|
cardId: card._id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
onRendered() {
|
onRendered() {
|
||||||
if (!Utils.isMiniScreen()) this.scrollParentContainer();
|
if (!Utils.isMiniScreen()) this.scrollParentContainer();
|
||||||
const $checklistsDom = this.$('.card-checklist-items');
|
const $checklistsDom = this.$('.card-checklist-items');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue