Code to support EmberJS + Discourse Tutorial feature: Admin Reports

This commit is contained in:
Robin Ward
2013-02-27 22:39:42 -05:00
parent 416f981f92
commit dc8e1196fd
11 changed files with 213 additions and 0 deletions

View File

@@ -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'});
}
});

View File

@@ -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' });