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 1aab6209b31..d2783f1dd3b 100644 --- a/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs +++ b/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs @@ -1,209 +1,225 @@ -{{#if showPositionInput}} -
- - {{text-field value=category.position id="category-position" class="position-input" type="number"}} +
+

{{i18n 'category.settings_sections.general'}}

-
-{{/if}} + {{#if showPositionInput}} +
+ + {{text-field value=category.position id="category-position" class="position-input" type="number"}} +
+ {{/if}} -{{#unless showPositionInput}} -
- {{i18n 'category.position_disabled'}} - {{i18n 'category.position_disabled_click'}} -
-{{/unless}} - -
-
- - {{text-field value=category.auto_close_hours id="topic-auto-close" type="number"}} - - -
-
- -
- -
- -
- -
- -
- - - {{combo-box valueAttribute="value" - id="category-search-priority" - content=searchPrioritiesOptions - value=category.search_priority}} -
- -{{#if isParentCategory}} -
- -
-{{/if}} - -{{#if showSubcategoryListStyle}} -
- - {{combo-box valueAttribute="value" id="subcategory-list-style" content=availableSubcategoryListStyles value=category.subcategory_list_style}} - -
-{{/if}} - -
- -
- {{combo-box valueAttribute="value" id="category-default-view" content=availableViews value=category.default_view}} -
-
- -
- -
- {{combo-box valueAttribute="value" id="category-default-period" content=availableTopPeriods value=category.default_top_period}} -
-
- -
- -
- {{combo-box valueAttribute="value" content=availableSorts value=category.sort_order none="category.sort_options.default"}} - {{#unless isDefaultSortOrder}} - {{combo-box castBoolean=true valueAttribute="value" content=sortAscendingOptions value=category.sort_ascending none="category.sort_options.default"}} + {{#unless showPositionInput}} +
+ {{i18n 'category.position_disabled'}} + {{i18n 'category.position_disabled_click'}} +
{{/unless}} -
-
-
- - {{text-field value=category.num_featured_topics id="category-number-featured-topics" type="number"}} - -
- -
- - {{text-field value=category.custom_fields.num_auto_bump_daily id="category-number-daily-bump" type="number"}} - -
- -
- -
- -
- -
- -{{#if siteSettings.topic_featured_link_enabled}} -
- -
-{{/if}} - -{{#if emailInEnabled}} -
- -
- -
- - {{text-field id="category-email-in" class="email-in" value=category.email_in}} - -
- -
- -
- - {{plugin-outlet name="category-email-in" args=(hash category=category)}} -{{/if}} - -{{#if siteSettings.tagging_enabled}} -
-
+ +
+ +

{{i18n 'category.settings_sections.moderation'}}

+ +
+ +
+ +
+ +
+ +
+
+ + {{text-field value=category.auto_close_hours id="topic-auto-close" type="number"}} + +
+
+ + {{#if siteSettings.tagging_enabled}} +
+ + {{text-field value=category.minimum_required_tags id="category-minimum-tags" type="number" min="0"}} +
+ {{/if}} + +
+ + {{text-field value=category.custom_fields.num_auto_bump_daily id="category-number-daily-bump" type="number"}} +
+ +
+ +
+ +

{{i18n "category.settings_sections.appearance"}}

+ +
+ +
+ {{combo-box valueAttribute="value" id="category-default-view" content=availableViews value=category.default_view}} +
+
+ +
+ +
+ {{combo-box valueAttribute="value" id="category-default-period" content=availableTopPeriods value=category.default_top_period}} +
+
+ +
+ +
+ {{combo-box valueAttribute="value" content=availableSorts value=category.sort_order none="category.sort_options.default"}} + {{#unless isDefaultSortOrder}} + {{combo-box castBoolean=true valueAttribute="value" content=sortAscendingOptions value=category.sort_ascending none="category.sort_options.default"}} + {{/unless}} +
+
+ + {{#if isParentCategory}} +
+ +
+ {{/if}} + + {{#if showSubcategoryListStyle}} +
+ + {{combo-box valueAttribute="value" id="subcategory-list-style" content=availableSubcategoryListStyles value=category.subcategory_list_style}} +
+ {{/if}} + +
+ +
+

{{i18n "category.settings_sections.email"}}

+ + {{#if emailInEnabled}} +
+ + {{text-field id="category-email-in" class="email-in" value=category.email_in}} +
+ +
+ +
+ +
+ +
+ + {{plugin-outlet name="category-email-in" args=(hash category=category)}} + {{/if}} + + {{#unless emailInEnabled}} +
+ {{i18n 'category.email_in_disabled'}} + {{i18n 'category.email_in_disabled_click'}} +
+ {{/unless}} + +
+ +{{plugin-outlet name="category-custom-settings" args=(hash category=category) connectorTagName="" tagName="section"}} diff --git a/app/assets/stylesheets/common/base/modal.scss b/app/assets/stylesheets/common/base/modal.scss index 4fea95eb2ec..1b928b5d734 100644 --- a/app/assets/stylesheets/common/base/modal.scss +++ b/app/assets/stylesheets/common/base/modal.scss @@ -402,10 +402,6 @@ margin-bottom: 0.5em; } - .subcategory-list-style-field { - margin-left: 16px; - } - .disable_info_wrap { position: relative; display: inline-block; @@ -431,12 +427,6 @@ } } - section.minimum-required-tags { - input[type="number"] { - width: 5em; - } - } - .permission-selector { margin-right: 0.25em; } @@ -449,6 +439,24 @@ .add-permission-icon { margin: 0; } + + .edit-category-tab-settings { + $category-settings-width: 280px; // Consistent width makes this all easier to read + > section { + margin-bottom: 1.5em; + } + input[type="number"], + input[type="text"], + .select-kit { + width: $category-settings-width; + } + label { + max-width: $category-settings-width; + } + .category-custom-settings-outlet { + border-top: 1px solid $primary-low; + } + } } .incoming-email-modal { diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 09c4419fb5c..36e1fbc68d1 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2538,7 +2538,7 @@ en: require_topic_approval: "Require moderator approval of all new topics" require_reply_approval: "Require moderator approval of all new replies" this_year: "this year" - position: "Position:" + position: "Position on the categories page:" default_position: "Default Position" position_disabled: "Categories will be displayed in order of activity. To control the order of categories in lists, " position_disabled_click: 'enable the "fixed category positions" setting.' @@ -2588,6 +2588,11 @@ en: rows_with_featured_topics: "Rows with featured topics" boxes: "Boxes" boxes_with_featured_topics: "Boxes with featured topics" + settings_sections: + general: "General" + moderation: "Moderation" + appearance: "Appearance" + email: "Email" flagging: title: "Thanks for helping to keep our community civil!"