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

24 lines
692 B
Plaintext
Raw Normal View History

2018-06-15 23:03:24 +08:00
import showModal from "discourse/lib/show-modal";
export default Discourse.Route.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();
}
}
});