2013-08-19 19:14:26 +08:00
|
|
|
Discourse.AdminFlagsIndexRoute = Discourse.Route.extend({
|
2013-07-19 11:26:04 +08:00
|
|
|
redirect: function() {
|
|
|
|
this.transitionTo('adminFlags.active');
|
|
|
|
}
|
|
|
|
});
|
2013-08-19 19:14:26 +08: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({
|
|
|
|
filter: 'active'
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Discourse.AdminFlagsOldRoute = Discourse.AdminFlagsRouteType.extend({
|
|
|
|
filter: 'old'
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|