mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-18 08:18:12 +08:00
Adds an Events category type alongside Support and Ideas in the simplified category creation flow. Auto-enables Calendar + Discourse Post Event, registers the category in events_calendar_categories, and writes a matching calendar_categories entry. Gated behind enable_events_category_type_setup. The Events tab exposes: default calendar view, display weekends, allowed groups, event date format, topic sorting, and the upcoming events sidebar link. Framework support for per-category type settings: - CategoriesController#create and #update now accept category_type_settings, slicing the payload by each type's own configuration_schema_keys(:category_settings). On create the slice merges into Categories::Configure's category_configuration_values; on update the controller iterates the category's attached types and calls configure_category per type, so per-type fields persist on edit and a type only ever sees its own keys. - Categories::Types::Base#read_category_settings is a new extension point types override to return current per-category values; the CategorySerializer aggregates these as category_type_settings so the edit form preloads stored values rather than schema defaults. - Categories::Types::Base forwards :choices through the resolved schema and lets a type override site setting :type and :choices when it wants a bool to render as a labelled enum. configure_custom_fields and configure_site_settings tolerate string or symbol keys. - SchemaFormField gains enum (FormKit select) and group_list (GroupChooser) branches. EditCategoryTypeSchemaFields renders a new form section bound to a category_type_settings form object that iterates schema.category_settings, gated by a hasCategorySettings getter. tabs.js seeds the bucket from model.category_type_settings plus schema defaults; Category#_categoryTypeSaveProperties sends it on save. --------- Co-authored-by: Martin Brennan <martin@discourse.org> |
||
|---|---|---|
| .. | ||
| admin/search | ||
| admin_notices | ||
| categories | ||
| category | ||
| discourse_id | ||
| flags | ||
| groups | ||
| nested_topic | ||
| notification/action | ||
| notifications | ||
| problem_check | ||
| site_setting | ||
| tags | ||
| themes | ||
| upcoming_changes | ||
| user | ||
| video_conversion | ||
| admin_dashboard_highlights_spec.rb | ||
| admin_dashboard_section_configuration_spec.rb | ||
| anonymous_shadow_creator_spec.rb | ||
| auto_silence_spec.rb | ||
| badge_granter_spec.rb | ||
| base_bookmarkable_spec.rb | ||
| category_hashtag_data_source_spec.rb | ||
| color_scheme_revisor_spec.rb | ||
| destroy_task_spec.rb | ||
| email_settings_exception_handler_spec.rb | ||
| email_settings_validator_spec.rb | ||
| email_style_updater_spec.rb | ||
| external_upload_manager_spec.rb | ||
| flag_sockpuppets_spec.rb | ||
| group_action_logger_spec.rb | ||
| group_mentions_updater_spec.rb | ||
| group_message_spec.rb | ||
| hashtag_autocomplete_service_spec.rb | ||
| heat_settings_updater_spec.rb | ||
| hub_push_notification_pusher_spec.rb | ||
| inline_uploads_multisite_spec.rb | ||
| inline_uploads_spec.rb | ||
| locale_normalizer_spec.rb | ||
| notification_emailer_spec.rb | ||
| post_action_notifier_spec.rb | ||
| post_alerter_spec.rb | ||
| post_bookmarkable_spec.rb | ||
| post_owner_changer_spec.rb | ||
| problem_check_spec.rb | ||
| push_notification_pusher_spec.rb | ||
| random_topic_selector_spec.rb | ||
| search_indexer_spec.rb | ||
| sidebar_site_settings_backfiller_spec.rb | ||
| site_settings_spec.rb | ||
| staff_action_logger_spec.rb | ||
| tag_hashtag_data_source_spec.rb | ||
| tag_settings_updater_spec.rb | ||
| theme_settings_migrations_runner_spec.rb | ||
| themes_spec.rb | ||
| topic_bookmarkable_spec.rb | ||
| topic_status_updater_spec.rb | ||
| topic_timestamp_changer_spec.rb | ||
| trust_level_granter_spec.rb | ||
| user_activator_spec.rb | ||
| user_anonymizer_spec.rb | ||
| user_authenticator_spec.rb | ||
| user_destroyer_spec.rb | ||
| user_merger_spec.rb | ||
| user_notification_schedule_processor_spec.rb | ||
| user_password_expirer_spec.rb | ||
| user_silencer_spec.rb | ||
| user_stat_count_updater_spec.rb | ||
| user_suspender_spec.rb | ||
| user_updater_spec.rb | ||
| username_changer_spec.rb | ||
| username_checker_service_spec.rb | ||
| wildcard_domain_checker_spec.rb | ||
| wildcard_url_checker_spec.rb | ||
| word_watcher_spec.rb | ||