Topic Auto-Close: admins and mods can set a topic to automatically close after a number of days

This commit is contained in:
Neil Lalonde
2013-05-07 14:25:41 -04:00
parent 87469fa4b7
commit 9828c87525
33 changed files with 600 additions and 55 deletions
@@ -8,6 +8,7 @@
**/
Discourse.TopicAdminMenuController = Discourse.ObjectController.extend({
visible: false,
needs: ['modal'],
show: function() {
this.set('visible', true);
@@ -15,6 +16,15 @@ Discourse.TopicAdminMenuController = Discourse.ObjectController.extend({
hide: function() {
this.set('visible', false);
},
autoClose: function() {
var modalController = this.get('controllers.modal');
if (modalController) {
var v = Discourse.EditTopicAutoCloseView.create();
v.set('topic', this.get('content'));
modalController.show(v);
}
}
});