mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:33:43 +08:00
Disable reply button on archived/closed topics
This commit is contained in:
parent
946255fcc4
commit
29d2f04d87
|
@ -38,6 +38,7 @@ window.Discourse.TopicFooterButtonsView = Ember.ContainerView.extend
|
||||||
|
|
||||||
@addObject Discourse.ButtonView.createWithMixins
|
@addObject Discourse.ButtonView.createWithMixins
|
||||||
classNames: ['btn', 'btn-primary', 'create']
|
classNames: ['btn', 'btn-primary', 'create']
|
||||||
|
attributeBindings: ['disabled']
|
||||||
text: (->
|
text: (->
|
||||||
archetype = @get('controller.content.archetype')
|
archetype = @get('controller.content.archetype')
|
||||||
return customTitle if customTitle = @get("parentView.replyButtonText#{archetype.capitalize()}")
|
return customTitle if customTitle = @get("parentView.replyButtonText#{archetype.capitalize()}")
|
||||||
|
@ -46,6 +47,7 @@ window.Discourse.TopicFooterButtonsView = Ember.ContainerView.extend
|
||||||
renderIcon: (buffer) -> buffer.push("<i class='icon icon-plus'></i>")
|
renderIcon: (buffer) -> buffer.push("<i class='icon icon-plus'></i>")
|
||||||
click: -> @get('controller').reply()
|
click: -> @get('controller').reply()
|
||||||
helpKey: 'topic.reply.help'
|
helpKey: 'topic.reply.help'
|
||||||
|
disabled: !@get('controller.content.can_create_post')
|
||||||
|
|
||||||
unless topic.get('isPrivateMessage')
|
unless topic.get('isPrivateMessage')
|
||||||
@addObject Discourse.DropdownButtonView.createWithMixins
|
@addObject Discourse.DropdownButtonView.createWithMixins
|
||||||
|
|
Loading…
Reference in New Issue
Block a user