FIX: Staff action log 'show details' links (#18542)
Followup to 03b7b7d1bc
This commit is contained in:
parent
a0eb8092f0
commit
f3e956a7a3
|
@ -5,6 +5,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import { exportEntity } from "discourse/lib/export-csv";
|
import { exportEntity } from "discourse/lib/export-csv";
|
||||||
import { outputExportResult } from "discourse/lib/export-result";
|
import { outputExportResult } from "discourse/lib/export-result";
|
||||||
import { scheduleOnce } from "@ember/runloop";
|
import { scheduleOnce } from "@ember/runloop";
|
||||||
|
import showModal from "discourse/lib/show-modal";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
queryParams: ["filters"],
|
queryParams: ["filters"],
|
||||||
|
@ -147,4 +148,25 @@ export default Controller.extend({
|
||||||
loadMore() {
|
loadMore() {
|
||||||
this.model.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();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import showModal from "discourse/lib/show-modal";
|
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
@ -43,17 +42,6 @@ export default DiscourseRoute.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
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) {
|
onFiltersChange(filters) {
|
||||||
if (filters && Object.keys(filters) === 0) {
|
if (filters && Object.keys(filters) === 0) {
|
||||||
this.transitionTo("adminLogs.staffActionLogs");
|
this.transitionTo("adminLogs.staffActionLogs");
|
||||||
|
|
Loading…
Reference in New Issue