discourse/app/assets/javascripts/admin/routes/admin-logs-staff-action-logs.js.es6
Robin Ward 7f501a0c41 When a post returns enqueued don't insert it in the stream and notify
- Includes removal of a lot of modal boilerplate
2015-04-15 14:54:37 -04:00

27 lines
824 B
JavaScript

import showModal from 'discourse/lib/show-modal';
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: {
showDetailsModal(model) {
showModal('modals/admin-staff-action-log-details', { model });
this.controllerFor('modal').set('modalClass', 'log-details-modal');
},
showCustomDetailsModal(model) {
const modalName = "modals/" + (model.action_name + '_details').replace("_", "-");
showModal(modalName, { model });
this.controllerFor('modal').set('modalClass', 'tabbed-modal log-details-modal');
}
}
});