diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-11-07 00:14:50 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-11-07 00:14:50 +0200 |
commit | 3cf09efb13438d66db6cf739591c679ea538d812 (patch) | |
tree | 2fbe452004f501bd2415bf453878d021a0709b0f | |
parent | 22083787f936535e9d1d9f897dfdecbaad00d038 (diff) | |
download | wekan-3cf09efb13438d66db6cf739591c679ea538d812.tar.gz wekan-3cf09efb13438d66db6cf739591c679ea538d812.tar.bz2 wekan-3cf09efb13438d66db6cf739591c679ea538d812.zip |
Assignee field like Jira #2452 , in progress.
When there is one selected assignee on card, don't show + button
for adding more assignees, because there can only be one assignee.
Thanks to xet7 !
-rw-r--r-- | client/components/cards/cardDetails.jade | 5 | ||||
-rw-r--r-- | client/components/cards/cardDetails.js | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 02929757..53a264ec 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -79,8 +79,9 @@ template(name="cardDetails") +userAvatarAssignee(userId=this cardId=../_id) | {{! XXX Hack to hide syntaxic coloration /// }} if canModifyCard - a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}") - i.fa.fa-plus + unless assigneeSelected + a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}") + i.fa.fa-plus .card-details-item.card-details-item-labels h3.card-details-item-title {{_ 'labels'}} diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index ad500657..7bb54223 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -364,6 +364,14 @@ Template.cardDetails.helpers({ }); }, + assigneeSelected() { + if (this.getAssignees().length === 0) { + return false; + } else { + return true; + } + }, + memberType() { const user = Users.findOne(this.userId); return user && user.isBoardAdmin() ? 'admin' : 'normal'; |