Rename humburger_menu_categories_count site setting to header_dropdown_category_count

This commit is contained in:
Vinoth Kannan 2018-07-31 09:12:30 +05:30
parent 09bb25a287
commit ece3cb73df
5 changed files with 8 additions and 8 deletions

View File

@ -178,7 +178,7 @@ export default createWidget("hamburger-menu", {
listCategories() {
const maxCategoriesToDisplay = this.siteSettings
.hamburger_menu_categories_count;
.header_dropdown_category_count;
let categories = this.site.get("categoriesByCount");
if (this.currentUser) {

View File

@ -168,7 +168,7 @@ class CurrentUserSerializer < BasicUserSerializer
WHEN notification_level = 4 THEN 3
END")
.pluck(:category_id)
.slice(0, SiteSetting.hamburger_menu_categories_count)
.slice(0, SiteSetting.header_dropdown_category_count)
end
def dismissed_banner_key

View File

@ -1655,7 +1655,7 @@ en:
suppress_uncategorized_badge: "Don't show the badge for uncategorized topics in topic lists."
hamburger_menu_categories_count: "How many categories can be displayed in the hamburger menu."
header_dropdown_category_count: "How many categories can be displayed in the header dropdown menu."
permalink_normalizations: "Apply the following regex before matching permalinks, for example: /(topic.*)\\?.*/\\1 will strip query strings from topic routes. Format is regex+string use \\1 etc. to access captures"

View File

@ -1415,7 +1415,7 @@ uncategorized:
client: true
default: true
hamburger_menu_categories_count:
header_dropdown_category_count:
client: true
default: 8

View File

@ -138,8 +138,8 @@ widgetTest("top categories - anonymous", {
anonymous: true,
beforeEach() {
this.siteSettings.hamburger_menu_categories_count = 8;
maxCategoriesToDisplay = this.siteSettings.hamburger_menu_categories_count;
this.siteSettings.header_dropdown_category_count = 8;
maxCategoriesToDisplay = this.siteSettings.header_dropdown_category_count;
categoriesByCount = this.site.get("categoriesByCount");
},
@ -162,8 +162,8 @@ widgetTest("top categories", {
template: '{{mount-widget widget="hamburger-menu"}}',
beforeEach() {
this.siteSettings.hamburger_menu_categories_count = 8;
maxCategoriesToDisplay = this.siteSettings.hamburger_menu_categories_count;
this.siteSettings.header_dropdown_category_count = 8;
maxCategoriesToDisplay = this.siteSettings.header_dropdown_category_count;
categoriesByCount = this.site.get("categoriesByCount").slice();
categoriesByCount.every(c => {
if (!topCategoryIds.includes(c.id)) {