summaryrefslogtreecommitdiffstats
path: root/client/components/lists
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/lists')
-rw-r--r--client/components/lists/list.js4
-rw-r--r--client/components/lists/listBody.jade2
-rw-r--r--client/components/lists/listBody.js7
-rw-r--r--client/components/lists/listHeader.jade23
4 files changed, 22 insertions, 14 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index 187d8ec3..9c191348 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -79,10 +79,10 @@ BlazeComponent.extendComponent({
});
function userIsMember() {
- return Meteor.user() && Meteor.user().isBoardMember();
+ return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly();
}
- // Disable drag-dropping if the current user is not a board member
+ // Disable drag-dropping if the current user is not a board member or is comment only
this.autorun(() => {
$cards.sortable('option', 'disabled', !userIsMember());
});
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 29aa4282..3f6ce0eb 100644
--- a/client/components/lists/listHeader.jade
+++ b/client/components/lists/listHeader.jade
@@ -25,17 +25,18 @@ template(name="editListTitleForm")
template(name="listActionPopup")
ul.pop-over-list
li: a.js-toggle-watch-list {{#if isWatching}}{{_ 'unwatch'}}{{else}}{{_ 'watch'}}{{/if}}
- hr
- ul.pop-over-list
- li: a.js-add-card {{_ 'add-card'}}
- if cards.count
- li: a.js-select-cards {{_ 'list-select-cards'}}
- hr
- ul.pop-over-list
- li: a.js-close-list {{_ 'archive-list'}}
- hr
- ul.pop-over-list
- li: a.js-remove-list {{_ 'remove-list'}}
+ unless currentUser.isCommentOnly
+ hr
+ ul.pop-over-list
+ li: a.js-add-card {{_ 'add-card'}}
+ if cards.count
+ li: a.js-select-cards {{_ 'list-select-cards'}}
+ hr
+ ul.pop-over-list
+ li: a.js-close-list {{_ 'archive-list'}}
+ hr
+ ul.pop-over-list
+ li: a.js-remove-list {{_ 'remove-list'}}
template(name="boardLists")
ul.pop-over-list