discourse/app/assets/javascripts/admin/controllers/admin-site-settings-categor...

17 lines
480 B
Plaintext
Raw Normal View History

export default Ember.Controller.extend({
categoryNameKey: null,
needs: ['adminSiteSettings'],
filteredContent: function() {
if (!this.get('categoryNameKey')) { return []; }
2015-03-02 12:12:19 -05:00
const category = this.get('controllers.adminSiteSettings.content').findProperty('nameKey', this.get('categoryNameKey'));
if (category) {
return category.siteSettings;
} else {
return [];
}
2015-03-02 12:12:19 -05:00
}.property('controllers.adminSiteSettings.content', 'categoryNameKey')
});