mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
16 lines
486 B
JavaScript
16 lines
486 B
JavaScript
export default Ember.ObjectController.extend({
|
|
categoryNameKey: null,
|
|
needs: ['adminSiteSettings'],
|
|
|
|
filteredContent: function() {
|
|
if (!this.get('categoryNameKey')) { return []; }
|
|
|
|
const category = this.get('controllers.adminSiteSettings.content').findProperty('nameKey', this.get('categoryNameKey'));
|
|
if (category) {
|
|
return category.siteSettings;
|
|
} else {
|
|
return [];
|
|
}
|
|
}.property('controllers.adminSiteSettings.content', 'categoryNameKey')
|
|
|
|
});
|