FEATURE: allow selecting a tag when moving posts to a new topic (#6074)

This commit is contained in:
Maja Komel
2018-07-06 18:21:00 +02:00
committed by Régis Hanol
parent dca1ba9a4c
commit 7cba4cbcc6
2 changed files with 21 additions and 4 deletions

View File

@@ -966,15 +966,21 @@ export default Ember.Controller.extend(BufferedContent, {
canDeselectAll: Ember.computed.alias("selectedAllPosts"),
@computed(
"currentUser.staff",
"selectedPostsCount",
"selectedAllPosts",
"selectedPosts",
"selectedPosts.[]"
)
canDeleteSelected(selectedPostsCount, selectedAllPosts, selectedPosts) {
canDeleteSelected(
isStaff,
selectedPostsCount,
selectedAllPosts,
selectedPosts
) {
return (
selectedPostsCount > 0 &&
(selectedAllPosts || selectedPosts.every(p => p.can_delete))
((selectedAllPosts && isStaff) || selectedPosts.every(p => p.can_delete))
);
},