summaryrefslogtreecommitdiffstats
path: root/client/components/lists
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/lists')
-rw-r--r--client/components/lists/listBody.jade2
-rw-r--r--client/components/lists/listBody.js7
-rw-r--r--client/components/lists/listHeader.jade2
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