2019-10-23 12:39:32 -04:00
|
|
|
import Route from "@ember/routing/route";
|
2023-03-15 09:17:51 -04:00
|
|
|
import { action, getProperties } from "@ember/object";
|
2019-03-18 16:09:13 -04:00
|
|
|
import showModal from "discourse/lib/show-modal";
|
|
|
|
|
2023-03-15 09:17:51 -04:00
|
|
|
export default class AdminSiteTextIndexRoute extends Route {
|
|
|
|
queryParams = {
|
2015-11-30 15:22:58 -05:00
|
|
|
q: { replace: true },
|
|
|
|
overridden: { replace: true },
|
2021-01-18 12:53:45 -05:00
|
|
|
locale: { replace: true },
|
2023-03-15 09:17:51 -04:00
|
|
|
};
|
2015-11-23 16:45:05 -05:00
|
|
|
|
|
|
|
model(params) {
|
2015-11-30 15:22:58 -05:00
|
|
|
return this.store.find(
|
|
|
|
"site-text",
|
2021-01-18 12:53:45 -05:00
|
|
|
getProperties(params, "q", "overridden", "locale")
|
2015-11-30 15:22:58 -05:00
|
|
|
);
|
2023-03-15 09:17:51 -04:00
|
|
|
}
|
2015-11-23 16:45:05 -05:00
|
|
|
|
|
|
|
setupController(controller, model) {
|
|
|
|
controller.set("siteTexts", model);
|
2023-03-15 09:17:51 -04:00
|
|
|
}
|
2019-03-18 16:09:13 -04:00
|
|
|
|
2023-03-15 09:17:51 -04:00
|
|
|
@action
|
|
|
|
showReseedModal() {
|
|
|
|
showModal("admin-reseed", { admin: true });
|
|
|
|
}
|
|
|
|
}
|