2018-05-16 09:37:40 -04:00
|
|
|
import computed from "ember-addons/ember-computed-decorators";
|
|
|
|
|
2015-08-11 12:27:07 -04:00
|
|
|
export default Ember.Controller.extend({
|
2013-11-14 12:37:41 -05:00
|
|
|
categoryNameKey: null,
|
2016-10-20 13:26:41 -04:00
|
|
|
adminSiteSettings: Ember.inject.controller(),
|
2013-11-14 12:37:41 -05:00
|
|
|
|
2018-12-11 10:48:12 -05:00
|
|
|
@computed("adminSiteSettings.visibleSiteSettings", "categoryNameKey")
|
2018-05-16 09:37:40 -04:00
|
|
|
category(categories, nameKey) {
|
|
|
|
return (categories || []).findBy("nameKey", nameKey);
|
|
|
|
},
|
2013-11-14 12:37:41 -05:00
|
|
|
|
2018-05-16 09:37:40 -04:00
|
|
|
@computed("category")
|
|
|
|
filteredContent(category) {
|
|
|
|
return category ? category.siteSettings : [];
|
|
|
|
}
|
2013-11-14 12:37:41 -05:00
|
|
|
});
|