diff options
author | Ryan Helsing <ryanhelsing@gmail.com> | 2017-03-18 16:01:22 -0400 |
---|---|---|
committer | Ryan Helsing <ryanhelsing@gmail.com> | 2017-03-18 16:01:22 -0400 |
commit | ec9498fa627228bd411af6070645fa2ed7cd895d (patch) | |
tree | 027a1fdb3d6591ad831d8b99d19a361420f8bafe /client/components/lists | |
parent | cf85c9c6cda86ede8fdfe746a8affc33b8ba4719 (diff) | |
download | wekan-ec9498fa627228bd411af6070645fa2ed7cd895d.tar.gz wekan-ec9498fa627228bd411af6070645fa2ed7cd895d.tar.bz2 wekan-ec9498fa627228bd411af6070645fa2ed7cd895d.zip |
current progress
Diffstat (limited to 'client/components/lists')
-rw-r--r-- | client/components/lists/listBody.jade | 2 | ||||
-rw-r--r-- | client/components/lists/listBody.js | 7 | ||||
-rw-r--r-- | client/components/lists/listHeader.jade | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/client/components/lists/listBody.jade b/client/components/lists/listBody.jade index e659b179..01aa7179 100644 --- a/client/components/lists/listBody.jade +++ b/client/components/lists/listBody.jade @@ -12,7 +12,7 @@ template(name="listBody") .materialCheckBox.multi-selection-checkbox.js-toggle-multi-selection( class="{{#if MultiSelection.isSelected _id}}is-checked{{/if}}") +minicard(this) - if currentUser.isBoardMember + if canSeeAddCard +inlinedForm(autoclose=false position="bottom") +addCardForm(listId=_id position="bottom") else diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 34c2dcd6..bdc812c7 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -239,3 +239,10 @@ BlazeComponent.extendComponent({ }); }, }).register('addCardForm'); + + +Template.listBody.helpers({ + canSeeAddCard() { + return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); + }, +}); diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade index ae178c94..3f6ce0eb 100644 --- a/client/components/lists/listHeader.jade +++ b/client/components/lists/listHeader.jade @@ -25,8 +25,8 @@ template(name="editListTitleForm") template(name="listActionPopup") ul.pop-over-list li: a.js-toggle-watch-list {{#if isWatching}}{{_ 'unwatch'}}{{else}}{{_ 'watch'}}{{/if}} - hr unless currentUser.isCommentOnly + hr ul.pop-over-list li: a.js-add-card {{_ 'add-card'}} if cards.count |