2015-03-10 15:01:15 -04:00
|
|
|
import showModal from 'discourse/lib/show-modal';
|
|
|
|
|
2015-02-05 14:34:57 -05:00
|
|
|
export default Discourse.Route.extend({
|
|
|
|
// TODO: make this automatic using an `{{outlet}}`
|
|
|
|
renderTemplate: function() {
|
|
|
|
this.render('admin/templates/logs/staff_action_logs', {into: 'adminLogs'});
|
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function(controller) {
|
|
|
|
controller.resetFilters();
|
|
|
|
controller.refresh();
|
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
2015-04-09 18:33:37 -04:00
|
|
|
showDetailsModal(model) {
|
|
|
|
showModal('modals/admin-staff-action-log-details', { model });
|
2015-02-05 14:34:57 -05:00
|
|
|
this.controllerFor('modal').set('modalClass', 'log-details-modal');
|
|
|
|
},
|
|
|
|
|
2015-04-09 18:33:37 -04:00
|
|
|
showCustomDetailsModal(model) {
|
|
|
|
const modalName = "modals/" + (model.action_name + '_details').replace("_", "-");
|
|
|
|
showModal(modalName, { model });
|
2015-02-05 14:34:57 -05:00
|
|
|
this.controllerFor('modal').set('modalClass', 'tabbed-modal log-details-modal');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|