2013-08-02 09:30:13 +08:00
|
|
|
/**
|
|
|
|
Index redirects to a default logs index.
|
|
|
|
|
|
|
|
@class AdminLogsIndexRoute
|
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.AdminLogsIndexRoute = Discourse.Route.extend({
|
|
|
|
redirect: function() {
|
2013-08-08 04:04:12 +08:00
|
|
|
this.transitionTo('adminLogs.staffActionLogs');
|
2013-08-02 09:30:13 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
The route that lists blocked email addresses.
|
|
|
|
|
|
|
|
@class AdminLogsBlockedEmailsRoute
|
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.AdminLogsBlockedEmailsRoute = Discourse.Route.extend({
|
|
|
|
renderTemplate: function() {
|
|
|
|
this.render('admin/templates/logs/blocked_emails', {into: 'adminLogs'});
|
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function() {
|
|
|
|
return this.controllerFor('adminLogsBlockedEmails').show();
|
|
|
|
}
|
2013-08-08 04:04:12 +08: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'});
|
|
|
|
},
|
|
|
|
|
2013-08-10 04:58:57 +08:00
|
|
|
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-08 04:04:12 +08:00
|
|
|
}
|
2013-08-02 09:30:13 +08:00
|
|
|
});
|