diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-08-28 12:15:29 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-08-28 12:15:29 +0200 |
commit | dc3cbdd20e59c2cc92a4acfeb1230ce71ac4a7c1 (patch) | |
tree | d95ad91548aee35dd7bb3c26c4307edac73c903a /client | |
parent | 732aa5eccb7fc96b87104b53fbd579e7fe9e6e18 (diff) | |
download | wekan-dc3cbdd20e59c2cc92a4acfeb1230ce71ac4a7c1.tar.gz wekan-dc3cbdd20e59c2cc92a4acfeb1230ce71ac4a7c1.tar.bz2 wekan-dc3cbdd20e59c2cc92a4acfeb1230ce71ac4a7c1.zip |
Hide feature non-member users can't use
Fixes #206
Fixes #244
Diffstat (limited to 'client')
-rw-r--r-- | client/components/activities/activities.jade | 11 | ||||
-rw-r--r-- | client/components/boards/boardHeader.jade | 21 | ||||
-rw-r--r-- | client/components/cards/cardDetails.jade | 17 | ||||
-rw-r--r-- | client/components/lists/listHeader.jade | 3 | ||||
-rw-r--r-- | client/components/sidebar/sidebar.jade | 5 | ||||
-rw-r--r-- | client/components/sidebar/sidebarArchives.jade | 18 |
6 files changed, 38 insertions, 37 deletions
diff --git a/client/components/activities/activities.jade b/client/components/activities/activities.jade index dd47af7f..ffe4b233 100644 --- a/client/components/activities/activities.jade +++ b/client/components/activities/activities.jade @@ -103,11 +103,12 @@ template(name="cardActivities") .activity-comment +viewer = comment.text - span.activity-meta - | {{ moment createdAt }} - - a.js-open-inlined-form {{_ "edit"}} - = ' - ' - a.js-delete-comment {{_ "delete"}} + if ($eq currentUser comment.userId) + span.activity-meta + | {{ moment createdAt }} - + a.js-open-inlined-form {{_ "edit"}} + = ' - ' + a.js-delete-comment {{_ "delete"}} else span.activity-meta {{ moment createdAt }} diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade index ea779e32..eed099db 100644 --- a/client/components/boards/boardHeader.jade +++ b/client/components/boards/boardHeader.jade @@ -41,17 +41,16 @@ template(name="headerBoard") i.board-header-btn-icon.fa.fa-cog template(name="boardMenuPopup") - if currentUser.isBoardMember - ul.pop-over-list - li: a.js-open-archives Archived elements - if currentUser.isBoardAdmin - li: a.js-change-board-color Change color - //- - XXX Language should be handled by sandstorm, but for now display a - language selection link in the board menu. This link is normally present - in the header bar that is not displayed on sandstorm. - if isSandstorm - li: a.js-change-language {{_ 'language'}} + ul.pop-over-list + li: a.js-open-archives Archived elements + if currentUser.isBoardAdmin + li: a.js-change-board-color Change color + //- + XXX Language should be handled by sandstorm, but for now display a + language selection link in the board menu. This link is normally present + in the header bar that is not displayed on sandstorm. + if isSandstorm + li: a.js-change-language {{_ 'language'}} unless isSandstorm if currentUser.isBoardAdmin hr diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 56c32e84..3cb1c87d 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -1,8 +1,5 @@ template(name="cardDetails") section.card-details.js-card-details.js-perfect-scrollbar: .card-details-canvas - if cover - .card-details-cover(style="background-image: url({{ cover.url }})") - .card-details-header +inlinedForm(classNames="js-card-details-title") input.full-line(type="text" value=title autofocus) @@ -11,7 +8,8 @@ template(name="cardDetails") a.fa.fa-times-thin.js-close-inlined-form else a.fa.fa-angle-left.close-card-details.js-close-card-details - a.fa.fa-bars.card-details-menu.js-open-card-details-menu + if currentUser.isBoardMember + a.fa.fa-bars.card-details-menu.js-open-card-details-menu h2.card-details-title.js-card-title( class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}") = title @@ -27,7 +25,7 @@ template(name="cardDetails") .card-details-item.card-details-item-members h3.card-details-item-title {{_ 'members'}} each members - +userAvatar(userId=this cardId=../_id) + +userAvatar(userId=this cardId="{{../_id}}") a.member.add-member.card-details-item-add-button.js-add-members i.fa.fa-plus @@ -75,11 +73,10 @@ template(name="cardDetails") +activities(card=this mode="card") template(name="cardDetailsActionsPopup") - if currentUser.isBoardMember - ul.pop-over-list - li: a.js-members Edit Members… - li: a.js-labels Edit Labels… - li: a.js-attachments Edit Attachments… + ul.pop-over-list + li: a.js-members Edit Members… + li: a.js-labels Edit Labels… + li: a.js-attachments Edit Attachments… hr ul.pop-over-list li: a.js-copy Copy Card diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade index 00b574da..e314e18f 100644 --- a/client/components/lists/listHeader.jade +++ b/client/components/lists/listHeader.jade @@ -6,7 +6,8 @@ template(name="listHeader") h2.list-header-name( class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}") = title - a.list-header-menu-icon.fa.fa-bars.js-open-list-menu + if currentUser.isBoardMember + a.list-header-menu-icon.fa.fa-bars.js-open-list-menu template(name="editListTitleForm") .list-composer diff --git a/client/components/sidebar/sidebar.jade b/client/components/sidebar/sidebar.jade index a28c9d2f..f162fd6c 100644 --- a/client/components/sidebar/sidebar.jade +++ b/client/components/sidebar/sidebar.jade @@ -43,8 +43,9 @@ template(name="labelsWidget") each currentBoard.labels a.card-label(class="card-label-{{color}}").js-label span.card-label-name= name - a.card-label.add-label.js-add-label - i.fa.fa-plus + if currentUser.isBoardAdmin + a.card-label.add-label.js-add-label + i.fa.fa-plus template(name="memberPopup") .board-member-menu diff --git a/client/components/sidebar/sidebarArchives.jade b/client/components/sidebar/sidebarArchives.jade index 2e42de6a..fdfd3798 100644 --- a/client/components/sidebar/sidebarArchives.jade +++ b/client/components/sidebar/sidebarArchives.jade @@ -5,12 +5,13 @@ template(name="archivesSidebar") each archivedCards .minicard-wrapper.js-minicard +minicard(this) - p.quiet - a.js-restore-card Restore - | - - a.js-delete-card Delete - if cardIsInArchivedList - p.quiet.small (warning: this card is in an archived list) + if currentUser.isBoardMember + p.quiet + a.js-restore-card Restore + | - + a.js-delete-card Delete + if cardIsInArchivedList + p.quiet.small (warning: this card is in an archived list) else p.no-items-message No archived cards. @@ -18,8 +19,9 @@ template(name="archivesSidebar") ul.archived-lists each archivedLists li.archived-lists-item - button.js-restore-list - i.fa.fa-undo + if currentUser.isBoardMember + button.js-restore-list + i.fa.fa-undo = title else li.no-items-message No archived lists. |