Merge pull request #1739 from vikhyat/uncategorized-topics
Don't show "uncategorized" in the category dropdown if allow_uncategorized_topics is false.
This commit is contained in:
commit
30d1801703
|
@ -12,6 +12,10 @@ Discourse.BreadCrumbsComponent = Ember.Component.extend({
|
|||
parentCategory: Em.computed.alias('category.parentCategory'),
|
||||
|
||||
parentCategories: Em.computed.filter('categories', function(c) {
|
||||
if (c.id === Discourse.Site.currentProp("uncategorized_category_id") && !Discourse.SiteSettings.allow_uncategorized_topics) {
|
||||
// Don't show "uncategorized" if allow_uncategorized_topics setting is false.
|
||||
return false;
|
||||
}
|
||||
return !c.get('parentCategory');
|
||||
}),
|
||||
|
||||
|
|
Loading…
Reference in New Issue