diff options
author | Nicu Tofan <nicu.tofan@gmail.com> | 2018-06-26 02:13:31 +0300 |
---|---|---|
committer | Nicu Tofan <nicu.tofan@gmail.com> | 2018-06-26 14:32:51 +0300 |
commit | c0ffd6c20f2a04bd1436ea2f0953f1c3c8afe145 (patch) | |
tree | 991e195f99639c69479381c4a72c17b6da1ba115 /client/components/cards | |
parent | 94a52080cff14f7587c0ee837c1fca131cd6aff0 (diff) | |
download | wekan-c0ffd6c20f2a04bd1436ea2f0953f1c3c8afe145.tar.gz wekan-c0ffd6c20f2a04bd1436ea2f0953f1c3c8afe145.tar.bz2 wekan-c0ffd6c20f2a04bd1436ea2f0953f1c3c8afe145.zip |
Show parent in card (no links, yet)
Diffstat (limited to 'client/components/cards')
-rw-r--r-- | client/components/cards/cardDetails.jade | 6 | ||||
-rw-r--r-- | client/components/cards/cardDetails.js | 8 | ||||
-rw-r--r-- | client/components/cards/minicard.jade | 16 |
3 files changed, 29 insertions, 1 deletions
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 789cc4b1..a5b8a2b3 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -13,6 +13,12 @@ template(name="cardDetails") = title if isWatching i.fa.fa-eye.card-details-watch + .card-details-path + each parentList + | > + a.js-parent-card {{title}} + // else + {{_ 'top-level-card'}} if archived p.warning {{_ 'card-archived'}} diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 4731e448..1c85580f 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -70,6 +70,14 @@ BlazeComponent.extendComponent({ } }, + presentParentTask() { + let result = this.currentBoard.presentParentTask; + if ((result === null) || (result === undefined)) { + result = 'no-parent'; + } + return result; + }, + onRendered() { if (!Utils.isMiniScreen()) this.scrollParentContainer(); const $checklistsDom = this.$('.card-checklist-items'); diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index 2a8e95ab..9a9b897f 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -8,7 +8,21 @@ template(name="minicard") .minicard-label(class="card-label-{{color}}" title="{{name}}") .minicard-title +viewer - = title + if isTopLevel + = title + else + if $eq 'prefix-with-full-path' currentBoard.presentParentTask + [{{ parentString ' > ' }}] {{ title }} + else + if $eq 'prefix-with-parent' currentBoard.presentParentTask + [{{ parentCardName }}] {{ title }} + else + = title + if $eq 'subtext-with-full-path' currentBoard.presentParentTask + .small {{ parentString ' > ' }} + if $eq 'subtext-with-parent' currentBoard.presentParentTask + .small {{ parentCardName }} + .dates if receivedAt unless startAt |