diff --git a/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 index 9af70311842..2202a0793e3 100644 --- a/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 +++ b/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 @@ -19,7 +19,7 @@ export default DiscoveryController.extend({ @computed("model.parentCategory") categoryPageStyle(parentCategory) { - const style = this.siteSettings.category_page_style; + const style = this.siteSettings.desktop_category_page_style; return parentCategory && style === "categories_and_latest_topics" ? "categories_only" : style; } diff --git a/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 b/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 index f7ce2519d6a..132f826d970 100644 --- a/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 +++ b/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 @@ -31,7 +31,7 @@ const DiscoveryCategoriesRoute = Discourse.Route.extend(OpenComposer, { }, setupController(controller, model) { - const style = this.siteSettings.category_page_style; + const style = this.siteSettings.desktop_category_page_style; if (style === "categories_and_latest_topics" && !this.get("model.parentCategory")) { model.set("loadingTopics", true); diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 324a798c4a9..ec5f4e51bde 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -18,7 +18,7 @@ class CategoriesController < ApplicationController include_topics = view_context.mobile_view? || params[:include_topics] || - SiteSetting.category_page_style == "categories_with_featured_topics".freeze + SiteSetting.desktop_category_page_style == "categories_with_featured_topics".freeze category_options = { is_homepage: current_homepage == "categories".freeze, @@ -37,7 +37,7 @@ class CategoriesController < ApplicationController format.html do store_preloaded(@category_list.preload_key, MultiJson.dump(CategoryListSerializer.new(@category_list, scope: guardian))) - if SiteSetting.category_page_style == "categories_and_latest_topics".freeze + if SiteSetting.desktop_category_page_style == "categories_and_latest_topics".freeze topic_options = { per_page: SiteSetting.categories_topics, no_definitions: true } topic_list = TopicQuery.new(current_user, topic_options).list_latest store_preloaded(topic_list.preload_key, MultiJson.dump(TopicListSerializer.new(topic_list, scope: guardian))) diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index abe795f4f88..88b35191fb9 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1148,7 +1148,7 @@ en: min_title_similar_length: "The minimum length of a title before it will be checked for similar topics." min_body_similar_length: "The minimum length of a post's body before it will be checked for similar topics." - category_page_style: "Visual style for the /categories page." + desktop_category_page_style: "Visual style for the /categories page." category_colors: "A list of hexadecimal color values allowed for categories." category_style: "Visual style for category badges." diff --git a/config/site_settings.yml b/config/site_settings.yml index de0690bce78..42646109d21 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -157,7 +157,7 @@ basic: - facebook - google+ - email - category_page_style: + desktop_category_page_style: client: true enum: 'CategoryPageStyle' default: 'categories_and_latest_topics'