mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: Only show undelete button when the topic is deleted
This commit is contained in:
parent
50238d71c8
commit
86c884aa29
2 changed files with 4 additions and 2 deletions
|
@ -16,6 +16,8 @@ Discourse.TopicAdminMenuController = Discourse.ObjectController.extend({
|
|||
|
||||
hide: function() {
|
||||
this.set('menuVisible', false);
|
||||
}
|
||||
},
|
||||
|
||||
showRecover: Em.computed.and('deleted', 'details.can_recover'),
|
||||
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if details.can_recover}}
|
||||
{{#if showRecover}}
|
||||
<li>
|
||||
<button {{action recoverTopic}} class='btn btn-admin'><i class='icon-undo'></i> {{i18n topic.actions.recover}}</button>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue