2020-05-13 16:23:41 -04:00
|
|
|
import I18n from "I18n";
|
2019-10-29 15:23:50 -04:00
|
|
|
import EmberObject from "@ember/object";
|
2019-10-22 09:46:10 -04:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
|
|
|
|
export default DiscourseRoute.extend({
|
2015-03-02 12:12:19 -05:00
|
|
|
model(params) {
|
2013-11-15 16:43:56 -05:00
|
|
|
// The model depends on user input, so let the controller do the work:
|
2018-06-15 11:03:24 -04:00
|
|
|
this.controllerFor("adminSiteSettingsCategory").set(
|
|
|
|
"categoryNameKey",
|
|
|
|
params.category_id
|
|
|
|
);
|
2019-05-01 09:44:45 -04:00
|
|
|
this.controllerFor("adminSiteSettings").set(
|
|
|
|
"categoryNameKey",
|
|
|
|
params.category_id
|
|
|
|
);
|
2019-10-29 15:23:50 -04:00
|
|
|
return EmberObject.create({
|
2013-11-15 16:43:56 -05:00
|
|
|
nameKey: params.category_id,
|
2018-06-15 11:03:24 -04:00
|
|
|
name: I18n.t("admin.site_settings.categories." + params.category_id),
|
|
|
|
siteSettings: this.controllerFor("adminSiteSettingsCategory").get(
|
|
|
|
"filteredContent"
|
|
|
|
)
|
2013-11-14 16:50:34 -05:00
|
|
|
});
|
2013-11-13 14:02:47 -05:00
|
|
|
}
|
|
|
|
});
|