diff options
author | Nicu Tofan <nicu.tofan@gmail.com> | 2018-06-26 14:10:58 +0300 |
---|---|---|
committer | Nicu Tofan <nicu.tofan@gmail.com> | 2018-06-26 14:33:05 +0300 |
commit | bac490d2f3b5531125694ff0cd9fa1e55d255c80 (patch) | |
tree | 8e9fb822718a400a632da70e3d22a24a60282cac /client/components | |
parent | 3a4a075dbadba8c1ce12fa86730a4507985729f7 (diff) | |
download | wekan-bac490d2f3b5531125694ff0cd9fa1e55d255c80.tar.gz wekan-bac490d2f3b5531125694ff0cd9fa1e55d255c80.tar.bz2 wekan-bac490d2f3b5531125694ff0cd9fa1e55d255c80.zip |
Links for parents in card details.
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/cards/cardDetails.jade | 2 | ||||
-rw-r--r-- | client/components/cards/cardDetails.js | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index a5b8a2b3..0110d12e 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -16,7 +16,7 @@ template(name="cardDetails") .card-details-path each parentList | > - a.js-parent-card {{title}} + a.js-parent-card(href=linkForCard) {{title}} // else {{_ 'top-level-card'}} diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 1c85580f..d4957964 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -20,10 +20,11 @@ BlazeComponent.extendComponent({ }, onCreated() { + this.currentBoard = Boards.findOne(Session.get('currentBoard')); this.isLoaded = new ReactiveVar(false); const boardBody = this.parentComponent().parentComponent(); //in Miniview parent is Board, not BoardBody. - if (boardBody !== null){ + if (boardBody !== null) { boardBody.showOverlay.set(true); boardBody.mouseHasEnterCardDetails = false; } @@ -78,6 +79,22 @@ BlazeComponent.extendComponent({ 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() { if (!Utils.isMiniScreen()) this.scrollParentContainer(); const $checklistsDom = this.$('.card-checklist-items'); |