diff --git a/app/assets/javascripts/admin/addon/controllers/admin-logs-staff-action-logs.js b/app/assets/javascripts/admin/addon/controllers/admin-logs-staff-action-logs.js index a8a297d47c4..11e5324bd61 100644 --- a/app/assets/javascripts/admin/addon/controllers/admin-logs-staff-action-logs.js +++ b/app/assets/javascripts/admin/addon/controllers/admin-logs-staff-action-logs.js @@ -5,6 +5,7 @@ import discourseComputed from "discourse-common/utils/decorators"; import { exportEntity } from "discourse/lib/export-csv"; import { outputExportResult } from "discourse/lib/export-result"; import { scheduleOnce } from "@ember/runloop"; +import showModal from "discourse/lib/show-modal"; export default Controller.extend({ queryParams: ["filters"], @@ -147,4 +148,25 @@ export default Controller.extend({ loadMore() { this.model.loadMore(); }, + + @action + showDetailsModal(model, event) { + event?.preventDefault(); + showModal("admin-staff-action-log-details", { + model, + admin: true, + modalClass: "log-details-modal", + }); + }, + + @action + showCustomDetailsModal(model, event) { + event?.preventDefault(); + let modal = showModal("admin-theme-change", { + model, + admin: true, + modalClass: "history-modal", + }); + modal.loadDiff(); + }, }); diff --git a/app/assets/javascripts/admin/addon/routes/admin-logs-staff-action-logs.js b/app/assets/javascripts/admin/addon/routes/admin-logs-staff-action-logs.js index f643d41e181..c00f1e135cc 100644 --- a/app/assets/javascripts/admin/addon/routes/admin-logs-staff-action-logs.js +++ b/app/assets/javascripts/admin/addon/routes/admin-logs-staff-action-logs.js @@ -1,6 +1,5 @@ import DiscourseRoute from "discourse/routes/discourse"; import EmberObject from "@ember/object"; -import showModal from "discourse/lib/show-modal"; export default DiscourseRoute.extend({ queryParams: { @@ -43,17 +42,6 @@ export default DiscourseRoute.extend({ }, actions: { - showDetailsModal(model) { - showModal("admin-staff-action-log-details", { model, admin: true }); - this.controllerFor("modal").set("modalClass", "log-details-modal"); - }, - - showCustomDetailsModal(model) { - let modal = showModal("admin-theme-change", { model, admin: true }); - this.controllerFor("modal").set("modalClass", "history-modal"); - modal.loadDiff(); - }, - onFiltersChange(filters) { if (filters && Object.keys(filters) === 0) { this.transitionTo("adminLogs.staffActionLogs");