diff --git a/app/assets/javascripts/discourse/models/category.js.es6 b/app/assets/javascripts/discourse/models/category.js.es6 index 735fdda1a8a..8839be9bc8d 100644 --- a/app/assets/javascripts/discourse/models/category.js.es6 +++ b/app/assets/javascripts/discourse/models/category.js.es6 @@ -70,7 +70,7 @@ const Category = RestModel.extend({ @computed("topic_count") moreTopics(topicCount) { - return topicCount > Discourse.SiteSettings.category_featured_topics; + return topicCount > (this.get('num_featured_topics') || 2); }, save() { @@ -103,7 +103,8 @@ const Category = RestModel.extend({ sort_order: this.get('sort_order'), sort_ascending: this.get('sort_ascending'), topic_featured_link_allowed: this.get('topic_featured_link_allowed'), - show_subcategory_list: this.get('show_subcategory_list') + show_subcategory_list: this.get('show_subcategory_list'), + num_featured_topics: this.get('num_featured_topics') }, type: id ? 'PUT' : 'POST' }); @@ -149,7 +150,7 @@ const Category = RestModel.extend({ @computed("topics") featuredTopics(topics) { if (topics && topics.length) { - return topics.slice(0, Discourse.SiteSettings.category_featured_topics || 2); + return topics.slice(0, this.get('num_featured_topics') || 2); } }, diff --git a/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs b/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs index ed9c0689c2c..d330fe0775f 100644 --- a/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs +++ b/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs @@ -75,8 +75,17 @@ {{plugin-outlet name="category-email-in" args=(hash category=category)}} {{/if}} +{{#unless category.parent_category_id}} + +{{/unless}} + {{#if showPositionInput}} -
+