mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
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
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue