discourse/app/assets/javascripts/admin/routes/admin-logs-staff-action-log...

Failed to ignore revisions in .git-blame-ignore-revs.

30 lines
906 B
JavaScript
Raw Normal View History

import DiscourseRoute from "discourse/routes/discourse";
2018-06-15 11:03:24 -04:00
import showModal from "discourse/lib/show-modal";
export default DiscourseRoute.extend({
// 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"
});
},
activate() {
let controller = this.controllerFor("admin-logs-staff-action-logs");
if (controller.filters === null) controller.resetFilters();
},
actions: {
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");
},
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");
modal.loadDiff();
}
}
});