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