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

25 lines
748 B
Plaintext
Raw Normal View History

import DiscourseRoute from "discourse/routes/discourse";
2018-06-15 23:03:24 +08:00
import showModal from "discourse/lib/show-modal";
export default DiscourseRoute.extend({
// TODO: make this automatic using an `{{outlet}}`
renderTemplate: function() {
2018-06-15 23:03:24 +08:00
this.render("admin/templates/logs/staff-action-logs", {
into: "adminLogs"
});
},
actions: {
showDetailsModal(model) {
2018-06-15 23:03:24 +08:00
showModal("admin-staff-action-log-details", { model, admin: true });
this.controllerFor("modal").set("modalClass", "log-details-modal");
},
showCustomDetailsModal(model) {
2018-06-15 23:03:24 +08:00
let modal = showModal("admin-theme-change", { model, admin: true });
this.controllerFor("modal").set("modalClass", "history-modal");
modal.loadDiff();
}
}
});