mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-20 20:42:44 -05:00
a9393e4a7a
corrected reload behavior on flag list refactored post actions ... extracted flag queries
30 lines
705 B
JavaScript
30 lines
705 B
JavaScript
Discourse.AdminFlagsIndexRoute = Discourse.Route.extend({
|
|
redirect: function() {
|
|
this.transitionTo('adminFlags.active');
|
|
}
|
|
});
|
|
|
|
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'
|
|
});
|
|
|
|
|
|
|