2019-10-22 09:46:10 -04:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
2018-06-15 11:03:24 -04:00
|
|
|
import showModal from "discourse/lib/show-modal";
|
2015-03-10 15:01:15 -04:00
|
|
|
|
2019-10-22 09:46:10 -04:00
|
|
|
export default DiscourseRoute.extend({
|
2015-02-05 14:34:57 -05:00
|
|
|
// TODO: make this automatic using an `{{outlet}}`
|
|
|
|
renderTemplate: function() {
|
2018-06-15 11:03:24 -04:00
|
|
|
this.render("admin/templates/logs/staff-action-logs", {
|
|
|
|
into: "adminLogs"
|
|
|
|
});
|
2015-02-05 14:34:57 -05:00
|
|
|
},
|
|
|
|
|
2020-04-02 23:13:01 -04:00
|
|
|
activate() {
|
|
|
|
let controller = this.controllerFor("admin-logs-staff-action-logs");
|
|
|
|
if (controller.filters === null) controller.resetFilters();
|
|
|
|
},
|
|
|
|
|
2015-02-05 14:34:57 -05:00
|
|
|
actions: {
|
2015-04-09 18:33:37 -04:00
|
|
|
showDetailsModal(model) {
|
2018-06-15 11:03:24 -04:00
|
|
|
showModal("admin-staff-action-log-details", { model, admin: true });
|
|
|
|
this.controllerFor("modal").set("modalClass", "log-details-modal");
|
2015-02-05 14:34:57 -05:00
|
|
|
},
|
|
|
|
|
2015-04-09 18:33:37 -04:00
|
|
|
showCustomDetailsModal(model) {
|
2018-06-15 11:03:24 -04:00
|
|
|
let modal = showModal("admin-theme-change", { model, admin: true });
|
|
|
|
this.controllerFor("modal").set("modalClass", "history-modal");
|
2017-04-12 10:52:52 -04:00
|
|
|
modal.loadDiff();
|
2015-02-05 14:34:57 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|