From e2cea039d7b1b5a3a8cf1c3e382ddaa38e7ec002 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 24 Oct 2024 15:32:50 +0900 Subject: [PATCH] FIX: category settings for calendar were incorrect Following the key change in https://github.com/discourse/discourse-calendar/commit/d31933bf4963ad8c107e9a9c0e8349a2b96145ad this has been broken. This commit also hides the section if `sort_categories_by_event_start_date_enabled` AND `disable_resorting_on_categories_enabled` are not enabled, prior to this change we would just show the title, with no checkbox to check. --- .../show-event-category-sorting-settings.hbs | 61 +++++++++++-------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/assets/javascripts/discourse/adapters/connectors/category-custom-settings/show-event-category-sorting-settings.hbs b/assets/javascripts/discourse/adapters/connectors/category-custom-settings/show-event-category-sorting-settings.hbs index 16b244d6a..03c7f0e37 100644 --- a/assets/javascripts/discourse/adapters/connectors/category-custom-settings/show-event-category-sorting-settings.hbs +++ b/assets/javascripts/discourse/adapters/connectors/category-custom-settings/show-event-category-sorting-settings.hbs @@ -1,27 +1,38 @@ -
-

{{i18n "category.settings_sections.event_sorting"}}

+{{#if + (or + siteSettings.sort_categories_by_event_start_date_enabled + siteSettings.disable_resorting_on_categories_enabled + ) +}} +
+

{{i18n + "discourse_post_event.category.settings_sections.event_sorting" + }}

- {{#if siteSettings.sort_categories_by_event_start_date_enabled}} -
- -
- {{/if}} + {{#if siteSettings.sort_categories_by_event_start_date_enabled}} +
+ +
+ {{/if}} - {{#if siteSettings.disable_resorting_on_categories_enabled}} -
- -
- {{/if}} -
\ No newline at end of file + {{#if siteSettings.disable_resorting_on_categories_enabled}} +
+ +
+ {{/if}} +
+{{/if}} \ No newline at end of file