2015-03-11 03:01:15 +08:00
|
|
|
import showModal from 'discourse/lib/show-modal';
|
|
|
|
|
2015-02-06 03:34:57 +08:00
|
|
|
export default Discourse.Route.extend({
|
|
|
|
// TODO: make this automatic using an `{{outlet}}`
|
|
|
|
renderTemplate: function() {
|
2016-11-10 03:47:58 +08:00
|
|
|
this.render('admin/templates/logs/staff-action-logs', {into: 'adminLogs'});
|
2015-02-06 03:34:57 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function(controller) {
|
|
|
|
controller.resetFilters();
|
|
|
|
controller.refresh();
|
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
2015-04-10 06:33:37 +08:00
|
|
|
showDetailsModal(model) {
|
2016-11-17 05:38:27 +08:00
|
|
|
showModal('admin-staff-action-log-details', { model, admin: true });
|
2015-02-06 03:34:57 +08:00
|
|
|
this.controllerFor('modal').set('modalClass', 'log-details-modal');
|
|
|
|
},
|
|
|
|
|
2015-04-10 06:33:37 +08:00
|
|
|
showCustomDetailsModal(model) {
|
2016-11-17 05:38:27 +08:00
|
|
|
const modalName = (model.action_name + '_details').replace(/\_/g, "-");
|
|
|
|
|
|
|
|
showModal(modalName, {
|
|
|
|
model,
|
|
|
|
admin: true,
|
|
|
|
templateName: 'site-customization-change'
|
|
|
|
});
|
2015-02-06 03:34:57 +08:00
|
|
|
this.controllerFor('modal').set('modalClass', 'tabbed-modal log-details-modal');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|