summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-09-06 03:42:43 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-09-06 03:54:36 +0200
commite964fbb5cc018f6978579274e41a4ad3d7c30378 (patch)
treed361c8382de2e3ccd2c9219b4d70d78ea869d281 /client/components
parentddb6b62f5355f1307996c7956f4bf494214b4b08 (diff)
downloadwekan-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')
-rw-r--r--client/components/cards/attachments.jade24
-rw-r--r--client/components/cards/cardDetails.jade12
-rw-r--r--client/components/sidebar/sidebar.jade3
3 files changed, 22 insertions, 17 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
diff --git a/client/components/sidebar/sidebar.jade b/client/components/sidebar/sidebar.jade
index caa698ab..a09f6a20 100644
--- a/client/components/sidebar/sidebar.jade
+++ b/client/components/sidebar/sidebar.jade
@@ -41,7 +41,8 @@ template(name="labelsWidget")
| {{_ 'labels'}}
.board-widget-content
each currentBoard.labels
- a.card-label(class="card-label-{{color}}").js-label
+ a.card-label(class="card-label-{{color}}"
+ class="{{#if currentUser.isBoardMember}}js-add-labels{{/if}}")
span.card-label-name= name
if currentUser.isBoardAdmin
a.card-label.add-label.js-add-label