discourse/app/assets/javascripts/admin/routes/admin-site-text-index.js.es6

28 lines
564 B
Plaintext
Raw Normal View History

import Route from "@ember/routing/route";
import showModal from "discourse/lib/show-modal";
import { getProperties } from "@ember/object";
export default Route.extend({
queryParams: {
q: { replace: true },
overridden: { replace: true }
},
model(params) {
2018-06-15 11:03:24 -04:00
return this.store.find(
"site-text",
getProperties(params, "q", "overridden")
2018-06-15 11:03:24 -04:00
);
},
setupController(controller, model) {
2018-06-15 11:03:24 -04:00
controller.set("siteTexts", model);
},
actions: {
showReseedModal() {
showModal("admin-reseed", { admin: true });
}
}
});