2013-08-19 07:14:26 -04:00
|
|
|
Discourse.AdminFlagsIndexRoute = Discourse.Route.extend({
|
2013-07-18 23:26:04 -04:00
|
|
|
redirect: function() {
|
|
|
|
this.transitionTo('adminFlags.active');
|
|
|
|
}
|
|
|
|
});
|
2013-08-19 07:14:26 -04:00
|
|
|
|
|
|
|
Discourse.AdminFlagsRouteType = Discourse.Route.extend({
|
|
|
|
model: function() {
|
|
|
|
return Discourse.FlaggedPost.findAll(this.get('filter'));
|
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function(controller, model) {
|
|
|
|
var adminFlagsController = this.controllerFor('adminFlags');
|
|
|
|
adminFlagsController.set('content', model);
|
|
|
|
adminFlagsController.set('query', this.get('filter'));
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
Discourse.AdminFlagsActiveRoute = Discourse.AdminFlagsRouteType.extend({
|
2014-07-28 13:17:37 -04:00
|
|
|
filter: 'active',
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
|
|
|
|
showDeleteFlagModal: function(flaggedPost) {
|
|
|
|
Discourse.Route.showModal(this, 'admin_delete_flag', flaggedPost);
|
|
|
|
this.controllerFor('modal').set('modalClass', 'delete-flag-modal');
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2013-08-19 07:14:26 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Discourse.AdminFlagsOldRoute = Discourse.AdminFlagsRouteType.extend({
|
|
|
|
filter: 'old'
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|