Can recover deleted topics. Deleted topics show the first post as deleted in the UI.

This commit is contained in:
Robin Ward
2013-07-12 12:08:23 -04:00
parent f05bc44fbe
commit 6ca5df0a09
16 changed files with 167 additions and 31 deletions
@@ -247,6 +247,10 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
return Discourse.User.current() && !this.get('isPrivateMessage');
}.property('isPrivateMessage'),
recoverTopic: function() {
this.get('content').recover();
},
deleteTopic: function() {
this.unsubscribe();
this.get('content').destroy(Discourse.User.current());
@@ -380,7 +384,6 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
},
recoverPost: function(post) {
post.set('deleted_at', null);
post.recover();
},