diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-09-06 03:42:43 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-09-06 03:54:36 +0200 |
commit | e964fbb5cc018f6978579274e41a4ad3d7c30378 (patch) | |
tree | d361c8382de2e3ccd2c9219b4d70d78ea869d281 /client/components/cards | |
parent | ddb6b62f5355f1307996c7956f4bf494214b4b08 (diff) | |
download | wekan-e964fbb5cc018f6978579274e41a4ad3d7c30378.tar.gz wekan-e964fbb5cc018f6978579274e41a4ad3d7c30378.tar.bz2 wekan-e964fbb5cc018f6978579274e41a4ad3d7c30378.zip |
Hide some disabled forms for anonymous board viewers
Fixes #288
Fixes #289
Fixes #290
Diffstat (limited to 'client/components/cards')
-rw-r--r-- | client/components/cards/attachments.jade | 24 | ||||
-rw-r--r-- | client/components/cards/cardDetails.jade | 12 |
2 files changed, 20 insertions, 16 deletions
diff --git a/client/components/cards/attachments.jade b/client/components/cards/attachments.jade index 783178e6..59eaf077 100644 --- a/client/components/cards/attachments.jade +++ b/client/components/cards/attachments.jade @@ -26,15 +26,17 @@ template(name="attachmentsGalery") a.js-download(href="{{url download=true}}") i.fa.fa-download | {{_ 'download'}} - if isImage - a(class="{{#if $eq ../coverId _id}}js-remove-cover{{else}}js-add-cover{{/if}}") - i.fa.fa-thumb-tack - if($eq ../coverId _id) - | {{_ 'remove-cover'}} - else - | {{_ 'add-cover'}} - a.js-confirm-delete - i.fa.fa-close - | {{_ 'delete'}} + if currentUser.isBoardMember + if isImage + a(class="{{#if $eq ../coverId _id}}js-remove-cover{{else}}js-add-cover{{/if}}") + i.fa.fa-thumb-tack + if($eq ../coverId _id) + | {{_ 'remove-cover'}} + else + | {{_ 'add-cover'}} + a.js-confirm-delete + i.fa.fa-close + | {{_ 'delete'}} - a.attachment-item.add-attachment.js-add-attachment {{_ 'add-attachment' }} + if currentUser.isBoardMember + a.attachment-item.add-attachment.js-add-attachment {{_ 'add-attachment' }} diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 497cdf64..9d2cbec7 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -23,16 +23,18 @@ template(name="cardDetails") each members +userAvatar(userId=this cardId=../_id) | {{! XXX Hack to hide syntaxic coloration /// }} - a.member.add-member.card-details-item-add-button.js-add-members(title="{{_ 'card-members-title'}}") - i.fa.fa-plus + if currentUser.isBoardMember + a.member.add-member.card-details-item-add-button.js-add-members(title="{{_ 'card-members-title'}}") + i.fa.fa-plus .card-details-item.card-details-item-labels h3.card-details-item-title {{_ 'labels'}} - a.js-add-labels(title="{{_ 'card-labels-title'}}") + a(class="{{#if currentUser.isBoardMember}}js-add-labels{{else}}is-disabled{{/if}}" title="{{_ 'card-labels-title'}}") each labels span.card-label(class="card-label-{{color}}" title=name)= name - a.card-label.add-label.js-add-labels(title="{{_ 'card-labels-title'}}") - i.fa.fa-plus + if currentUser.isBoardMember + a.card-label.add-label.js-add-labels(title="{{_ 'card-labels-title'}}") + i.fa.fa-plus //- XXX We should use "editable" to avoid repetiting ourselves if currentUser.isBoardMember |