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:
Robin Ward 2013-12-16 10:57:45 -08:00
commit 30d1801703
1 changed files with 4 additions and 0 deletions

View File

@ -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');
}),