Don't render 'Reply' button when user can't post
This commit is contained in:
parent
067b220a62
commit
8447fd47e5
|
@ -8,9 +8,7 @@
|
|||
**/
|
||||
Discourse.ReplyButton = Discourse.ButtonView.extend({
|
||||
classNames: ['btn', 'btn-primary', 'create'],
|
||||
attributeBindings: ['disabled'],
|
||||
helpKey: 'topic.reply.help',
|
||||
disabled: Em.computed.not('controller.model.details.can_create_post'),
|
||||
|
||||
text: function() {
|
||||
var archetypeCapitalized = this.get('controller.content.archetype').capitalize();
|
||||
|
|
|
@ -31,7 +31,9 @@ Discourse.TopicFooterButtonsView = Discourse.ContainerView.extend({
|
|||
this.attachViewClass(Discourse.FlagTopicButton);
|
||||
}
|
||||
}
|
||||
this.attachViewClass(Discourse.ReplyButton);
|
||||
if (this.get('topic.details.can_create_post')) {
|
||||
this.attachViewClass(Discourse.ReplyButton);
|
||||
}
|
||||
this.attachViewClass(Discourse.NotificationsButton);
|
||||
|
||||
this.trigger('additionalButtons', this);
|
||||
|
|
Loading…
Reference in New Issue