2019-10-22 21:46:10 +08:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
2018-06-15 23:03:24 +08:00
|
|
|
import showModal from "discourse/lib/show-modal";
|
2015-03-11 03:01:15 +08:00
|
|
|
|
2019-10-22 21:46:10 +08:00
|
|
|
export default DiscourseRoute.extend({
|
2015-02-06 03:34:57 +08:00
|
|
|
// 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"
|
|
|
|
});
|
2015-02-06 03:34:57 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
2015-04-10 06:33:37 +08:00
|
|
|
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");
|
2015-02-06 03:34:57 +08:00
|
|
|
},
|
|
|
|
|
2015-04-10 06:33:37 +08:00
|
|
|
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");
|
2017-04-12 22:52:52 +08:00
|
|
|
modal.loadDiff();
|
2015-02-06 03:34:57 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|