2019-10-22 09:46:10 -04:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
2015-03-10 15:01:15 -04:00
|
|
|
import showModal from "discourse/lib/show-modal";
|
|
|
|
|
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() {
|
2016-11-09 14:47:58 -05: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) {
|
2016-11-16 16:38:27 -05:00
|
|
|
showModal("admin-staff-action-log-details", { model, admin: true });
|
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) {
|
2017-04-12 10:52:52 -04:00
|
|
|
let modal = showModal("admin-theme-change", { model, admin: true });
|
|
|
|
this.controllerFor("modal").set("modalClass", "history-modal");
|
|
|
|
modal.loadDiff();
|
2015-02-05 14:34:57 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|