discourse/app/assets/javascripts/admin/routes/admin_logs_routes.js

78 lines
1.8 KiB
JavaScript
Raw Normal View History

2013-08-01 21:30:13 -04:00
/**
Index redirects to a default logs index.
@class AdminLogsIndexRoute
@extends Discourse.Route
@namespace Discourse
@module Discourse
**/
Discourse.AdminLogsIndexRoute = Discourse.Route.extend({
redirect: function() {
this.transitionTo('adminLogs.staffActionLogs');
2013-08-01 21:30:13 -04:00
}
});
2013-08-15 10:48:30 -04:00
/**
The route that lists staff actions that were logged.
@class AdminLogsStaffActionLogsRoute
@extends Discourse.Route
@namespace Discourse
@module Discourse
**/
Discourse.AdminLogsStaffActionLogsRoute = Discourse.Route.extend({
renderTemplate: function() {
this.render('admin/templates/logs/staff_action_logs', {into: 'adminLogs'});
},
setupController: function(controller) {
var queryParams = Discourse.URL.get('queryParams');
if (queryParams) {
controller.set('filters', queryParams);
}
return controller.show();
},
deactivate: function() {
this._super();
// Clear any filters when we leave the route
Discourse.URL.set('queryParams', null);
}
});
2013-08-01 21:30:13 -04:00
/**
The route that lists blocked email addresses.
@class AdminLogsScreenedEmailsRoute
2013-08-01 21:30:13 -04:00
@extends Discourse.Route
@namespace Discourse
@module Discourse
**/
Discourse.AdminLogsScreenedEmailsRoute = Discourse.Route.extend({
2013-08-01 21:30:13 -04:00
renderTemplate: function() {
this.render('admin/templates/logs/screened_emails', {into: 'adminLogs'});
2013-08-01 21:30:13 -04:00
},
setupController: function() {
return this.controllerFor('adminLogsScreenedEmails').show();
2013-08-01 21:30:13 -04:00
}
});
/**
2013-08-15 10:48:30 -04:00
The route that lists screened URLs.
2013-08-15 10:48:30 -04:00
@class AdminLogsScreenedUrlsRoute
@extends Discourse.Route
@namespace Discourse
@module Discourse
**/
2013-08-15 10:48:30 -04:00
Discourse.AdminLogsScreenedUrlsRoute = Discourse.Route.extend({
renderTemplate: function() {
2013-08-15 10:48:30 -04:00
this.render('admin/templates/logs/screened_urls', {into: 'adminLogs'});
},
2013-08-15 10:48:30 -04:00
setupController: function() {
return this.controllerFor('adminLogsScreenedUrls').show();
}
2013-08-01 21:30:13 -04:00
});