FIX: Only show undelete button when the topic is deleted

This commit is contained in:
Robin Ward 2013-07-17 10:21:47 -04:00
parent 50238d71c8
commit 86c884aa29
2 changed files with 4 additions and 2 deletions

View file

@ -16,6 +16,8 @@ Discourse.TopicAdminMenuController = Discourse.ObjectController.extend({
hide: function() {
this.set('menuVisible', false);
}
},
showRecover: Em.computed.and('deleted', 'details.can_recover'),
});

View file

@ -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>