mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Code to support EmberJS + Discourse Tutorial feature: Admin Reports
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
Discourse.AdminReportsRoute = Discourse.Route.extend({
|
||||
model: function(params) {
|
||||
return(Discourse.Report.find(params.type));
|
||||
},
|
||||
|
||||
renderTemplate: function() {
|
||||
this.render('admin/templates/reports', {into: 'admin/templates/admin'});
|
||||
}
|
||||
});
|
||||
@@ -11,6 +11,8 @@ Discourse.Route.buildRoutes(function() {
|
||||
this.route('email_logs', { path: '/email_logs' });
|
||||
this.route('customize', { path: '/customize' });
|
||||
|
||||
this.resource('adminReports', { path: '/reports/:type' });
|
||||
|
||||
this.resource('adminFlags', { path: '/flags' }, function() {
|
||||
this.route('active', { path: '/active' });
|
||||
this.route('old', { path: '/old' });
|
||||
|
||||
Reference in New Issue
Block a user