decidim-core 0.31.7 → 0.32.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -13
- data/app/cells/decidim/amendable/amend_button_card/show.erb +2 -2
- data/app/cells/decidim/amendable/amend_button_card_cell.rb +1 -1
- data/app/cells/decidim/author_cell.rb +4 -0
- data/app/cells/decidim/card_metadata_cell.rb +1 -1
- data/app/cells/decidim/comments_button_cell.rb +1 -9
- data/app/cells/decidim/content_blocks/announcement_settings_form/show.erb +5 -0
- data/app/cells/decidim/content_blocks/announcement_settings_form_cell.rb +17 -0
- data/app/cells/decidim/content_blocks/cta_settings_form/show.erb +1 -1
- data/app/cells/decidim/content_blocks/hero_settings_form/show.erb +2 -2
- data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/highlighted_content_banner_settings_form/show.erb +1 -1
- data/app/cells/decidim/content_blocks/highlighted_participatory_spaces_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/how_to_participate/show.erb +1 -1
- data/app/cells/decidim/content_blocks/html_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/participatory_space_announcement_cell.rb +1 -3
- data/app/cells/decidim/content_blocks/participatory_space_hero_cell.rb +1 -5
- data/app/cells/decidim/content_blocks/participatory_space_hero_settings_form/show.erb +1 -1
- data/app/cells/decidim/content_blocks/static_page/section_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/static_page/section_settings_form/show.erb +1 -3
- data/app/cells/decidim/content_blocks/static_page/summary_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/static_page/summary_settings_form/show.erb +1 -3
- data/app/cells/decidim/content_blocks/static_page/two_pane_section_cell.rb +2 -2
- data/app/cells/decidim/content_blocks/static_page/two_pane_section_settings_form/show.erb +2 -4
- data/app/cells/decidim/data_consent/category.erb +38 -25
- data/app/cells/decidim/footer_topics/show.erb +8 -5
- data/app/cells/decidim/{participatory_space_private_user_cell.rb → member_cell.rb} +1 -1
- data/app/cells/decidim/onboarding_action_message_cell.rb +1 -0
- data/app/cells/decidim/profile/details.erb +1 -1
- data/app/cells/decidim/profile_cell.rb +1 -0
- data/app/cells/decidim/profile_member_of/show.erb +13 -0
- data/app/cells/decidim/profile_member_of_cell.rb +35 -0
- data/app/cells/decidim/resource_types_filter/show.erb +2 -2
- data/app/cells/decidim/share_widget/qr_code_modal.erb +1 -1
- data/app/cells/decidim/tags_cell.rb +1 -1
- data/app/cells/decidim/upload_modal_cell.rb +0 -5
- data/app/cells/decidim/versions_list/show.erb +25 -0
- data/app/commands/decidim/create_follow.rb +3 -5
- data/app/commands/decidim/create_user_report.rb +1 -1
- data/app/commands/decidim/destroy_account.rb +4 -15
- data/app/commands/decidim/gallery_methods.rb +107 -0
- data/app/commands/decidim/multiple_attachments_methods.rb +27 -28
- data/app/commands/decidim/search.rb +5 -5
- data/app/controllers/concerns/decidim/ajax_permission_handler.rb +1 -1
- data/app/controllers/concerns/decidim/devise_controllers.rb +0 -10
- data/app/controllers/concerns/decidim/direct_upload.rb +3 -2
- data/app/controllers/concerns/decidim/ephemeral_session_checker.rb +1 -1
- data/app/controllers/concerns/decidim/force_authentication.rb +10 -1
- data/app/controllers/concerns/decidim/impersonate_users.rb +4 -0
- data/app/controllers/concerns/decidim/locale_switcher.rb +52 -2
- data/app/controllers/concerns/decidim/needs_tos_accepted.rb +1 -1
- data/app/controllers/concerns/decidim/participatory_space/has_members_page.rb +27 -0
- data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -5
- data/app/controllers/decidim/account_controller.rb +1 -1
- data/app/controllers/decidim/amendments_controller.rb +5 -4
- data/app/controllers/decidim/components/base_controller.rb +20 -3
- data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +1 -1
- data/app/controllers/decidim/devise/passwords_controller.rb +1 -1
- data/app/controllers/decidim/devise/registrations_controller.rb +1 -1
- data/app/controllers/decidim/devise/sessions_controller.rb +1 -1
- data/app/controllers/decidim/download_your_data_controller.rb +2 -2
- data/app/controllers/decidim/editor_images_controller.rb +1 -1
- data/app/controllers/decidim/follows_controller.rb +4 -3
- data/app/controllers/decidim/geolocation_controller.rb +1 -1
- data/app/controllers/decidim/likes_controller.rb +2 -1
- data/app/controllers/decidim/locales_controller.rb +3 -11
- data/app/controllers/decidim/messaging/conversations_controller.rb +3 -3
- data/app/controllers/decidim/newsletters_controller.rb +1 -1
- data/app/controllers/decidim/notifications_settings_controller.rb +1 -1
- data/app/controllers/decidim/notifications_subscriptions_controller.rb +0 -8
- data/app/controllers/decidim/open_data_controller.rb +1 -1
- data/app/controllers/decidim/report_users_controller.rb +2 -2
- data/app/controllers/decidim/reports_controller.rb +1 -1
- data/app/controllers/decidim/user_activities_controller.rb +1 -2
- data/app/events/decidim/amendable/amendment_base_event.rb +1 -7
- data/app/events/decidim/welcome_notification_event.rb +1 -1
- data/app/forms/decidim/upload_validation_form.rb +1 -1
- data/app/helpers/concerns/decidim/flash_helper_extensions.rb +1 -0
- data/app/helpers/decidim/active_link_to_helper.rb +136 -0
- data/app/helpers/decidim/amendments_helper.rb +3 -3
- data/app/helpers/decidim/check_boxes_tree_helper.rb +2 -2
- data/app/helpers/decidim/component_path_helper.rb +9 -4
- data/app/helpers/decidim/filters_helper.rb +0 -2
- data/app/helpers/decidim/menu_helper.rb +5 -3
- data/app/helpers/decidim/meta_tags_helper.rb +0 -2
- data/app/helpers/decidim/paginate_helper.rb +14 -1
- data/app/helpers/decidim/sanitize_helper.rb +1 -0
- data/app/helpers/decidim/short_link_helper.rb +5 -5
- data/app/helpers/decidim/translations_helper.rb +4 -4
- data/app/jobs/decidim/delete_inactive_participants_job.rb +2 -2
- data/app/jobs/decidim/process_inactive_participant_job.rb +7 -0
- data/app/mailers/decidim/application_mailer.rb +7 -2
- data/app/mailers/decidim/decidim_devise_mailer.rb +1 -0
- data/app/mailers/decidim/participants_account_mailer.rb +16 -0
- data/app/mailers/decidim/reported_mailer.rb +4 -1
- data/app/models/decidim/action_log.rb +1 -1
- data/app/models/decidim/attachment.rb +2 -20
- data/app/models/decidim/authorization.rb +0 -7
- data/app/models/decidim/authorization_transfer.rb +1 -1
- data/app/models/decidim/component.rb +6 -9
- data/app/models/decidim/content_block.rb +3 -3
- data/app/models/decidim/moderation.rb +1 -1
- data/app/models/decidim/newsletter.rb +2 -2
- data/app/models/decidim/participatory_space/member.rb +55 -0
- data/app/models/decidim/private_export.rb +0 -6
- data/app/models/decidim/resource_link.rb +1 -1
- data/app/models/decidim/short_link.rb +1 -1
- data/app/models/decidim/user.rb +2 -2
- data/app/models/decidim/user_base_entity.rb +2 -17
- data/app/models/decidim/user_moderation.rb +1 -1
- data/app/packs/src/decidim/controllers/accordion/accordion.test.js +42 -196
- data/app/packs/src/decidim/controllers/accordion/controller.js +17 -93
- data/app/packs/src/decidim/controllers/assign_role/assign_role.test.js +80 -0
- data/app/packs/src/decidim/controllers/assign_role/controller.js +27 -0
- data/app/packs/src/decidim/controllers/dropdown/controller.js +0 -6
- data/app/packs/src/decidim/controllers/dropdown/dropdown.test.js +0 -28
- data/app/packs/src/decidim/controllers/form_validator/form_validator.js +6 -6
- data/app/packs/src/decidim/controllers/form_validator/form_validator.test.js +1 -23
- data/app/packs/src/decidim/controllers/main_menu/controller.js +115 -0
- data/app/packs/src/decidim/controllers/main_menu/main_menu.test.js +185 -0
- data/app/packs/src/decidim/controllers/mention/controller.js +140 -296
- data/app/packs/src/decidim/controllers/mention/input_mentions.test.js +457 -120
- data/app/packs/src/decidim/controllers/multiple_mentions/controller.js +32 -68
- data/app/packs/src/decidim/controllers/multiple_mentions/input_multiple_mentions.test.js +23 -30
- data/app/packs/src/decidim/controllers/password_toggler/controller.js +1 -22
- data/app/packs/src/decidim/controllers/password_toggler/password_toggler.test.js +20 -11
- data/app/packs/src/decidim/datepicker/generate_datepicker.js +1 -13
- data/app/packs/src/decidim/direct_uploads/upload_field.js +4 -4
- data/app/packs/src/decidim/direct_uploads/upload_modal.js +7 -12
- data/app/packs/src/decidim/editor/common/suggestion.js +1 -1
- data/app/packs/src/decidim/editor/extensions/decidim_kit/index.js +4 -1
- data/app/packs/src/decidim/editor/extensions/image/index.js +8 -5
- data/app/packs/src/decidim/editor/extensions/link/index.js +8 -0
- data/app/packs/src/decidim/editor/extensions/mention/index.js +18 -5
- data/app/packs/src/decidim/editor/extensions/mention_resource/index.js +16 -7
- data/app/packs/src/decidim/editor/test/extensions/decidim_kit.test.js +13 -4
- data/app/packs/src/decidim/editor/test/extensions/heading.test.js +1 -1
- data/app/packs/src/decidim/editor/test/extensions/image.test.js +26 -28
- data/app/packs/src/decidim/editor/test/extensions/mention.test.js +6 -2
- data/app/packs/src/decidim/editor/test/extensions/video_embed.test.js +27 -15
- data/app/packs/src/decidim/editor/test/helpers.js +8 -10
- data/app/packs/src/decidim/editor/test/toolbar/full.test.js +15 -4
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_block.js +8 -4
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_formatting.js +5 -1
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_indent.js +9 -5
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_link.js +5 -1
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_list.js +8 -4
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_styling.js +13 -9
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_content_styling.js +6 -2
- data/app/packs/src/decidim/geocoding/reverse_geocoding.js +5 -15
- data/app/packs/src/decidim/index.js +3 -5
- data/app/packs/src/decidim/map/controller.js +1 -10
- data/app/packs/src/decidim/refactor/moved/focus_guard.js +12 -12
- data/app/packs/src/decidim/sw/push-permissions.js +13 -48
- data/app/packs/src/decidim/sw/sw.js +1 -1
- data/app/packs/src/decidim/utilities/text.js +6 -6
- data/app/packs/src/decidim/vendor/tribute.js +1890 -0
- data/app/packs/stylesheets/decidim/_cards.scss +3 -2
- data/app/packs/stylesheets/decidim/_conversations.scss +0 -14
- data/app/packs/stylesheets/decidim/_cookies.scss +5 -13
- data/app/packs/stylesheets/decidim/_datepicker.scss +0 -8
- data/app/packs/stylesheets/decidim/_documents.scss +1 -1
- data/app/packs/stylesheets/decidim/_dropdown.scss +21 -31
- data/app/packs/stylesheets/decidim/_floating_help.scss +1 -1
- data/app/packs/stylesheets/decidim/_footer.scss +1 -69
- data/app/packs/stylesheets/decidim/_forms.scss +5 -1
- data/app/packs/stylesheets/decidim/_header.scss +148 -46
- data/app/packs/stylesheets/decidim/_language_chooser.scss +79 -0
- data/app/packs/stylesheets/decidim/_participatory_spaces.scss +1 -1
- data/app/packs/stylesheets/decidim/_tribute.scss +36 -0
- data/app/packs/stylesheets/decidim/application.scss +1 -2
- data/app/packs/stylesheets/decidim/editor.scss +33 -2
- data/app/packs/stylesheets/decidim/geocoding_addons.scss +2 -10
- data/app/presenters/decidim/admin_log/participatory_space/member_presenter.rb +40 -0
- data/app/presenters/decidim/admin_log/static_page_resource_presenter.rb +1 -1
- data/app/presenters/decidim/authorization_transfer_presenter.rb +1 -1
- data/app/presenters/decidim/breadcrumb_root_menu_item_presenter.rb +3 -3
- data/app/presenters/decidim/footer_menu_presenter.rb +4 -2
- data/app/presenters/decidim/log/user_presenter.rb +1 -0
- data/app/presenters/decidim/log/value_types/access_mode_presenter.rb +45 -0
- data/app/presenters/decidim/menu_item_presenter.rb +3 -9
- data/app/presenters/decidim/participatory_space/member_presenter.rb +48 -0
- data/app/presenters/decidim/resource_locator_presenter.rb +22 -3
- data/app/presenters/decidim/stats_presenter.rb +1 -1
- data/app/queries/decidim/last_activity.rb +1 -1
- data/app/resolvers/decidim/meta_image_url_resolver.rb +0 -7
- data/app/serializers/decidim/exporters/participatory_space_serializer.rb +15 -1
- data/app/services/decidim/email_notification_generator.rb +2 -0
- data/app/services/decidim/notification_generator.rb +4 -0
- data/app/services/decidim/notifications_subscriptions_persistor.rb +0 -6
- data/app/services/decidim/send_push_notification.rb +1 -5
- data/app/uploaders/decidim/image_uploader.rb +1 -1
- data/app/uploaders/decidim/organization_favicon_uploader.rb +4 -9
- data/app/validators/uploader_image_dimensions_validator.rb +13 -11
- data/app/views/decidim/gamification/badges/index.html.erb +1 -1
- data/app/views/decidim/homepage/show.html.erb +2 -2
- data/app/views/decidim/last_activities/index.html.erb +1 -1
- data/app/views/decidim/messaging/conversations/_error_modal.html.erb +19 -11
- data/app/views/decidim/messaging/conversations/_new_conversation_button.html.erb +1 -1
- data/app/views/decidim/messaging/conversations/_reply.html.erb +1 -1
- data/app/views/decidim/messaging/conversations/error.js.erb +7 -12
- data/app/views/decidim/messaging/conversations/new.html.erb +1 -1
- data/app/views/decidim/messaging/conversations/show.html.erb +2 -2
- data/app/views/decidim/newsletters/unsubscribe.html.erb +1 -1
- data/app/views/decidim/notifications_settings/show.html.erb +5 -5
- data/app/views/decidim/offline/show.html.erb +1 -1
- data/app/views/decidim/pages/index.html.erb +1 -1
- data/app/views/decidim/participants_account_mailer/removal_notification.html.erb +11 -0
- data/app/views/decidim/participatory_space/members/_member.html.erb +1 -0
- data/app/views/decidim/profiles/show.html.erb +1 -1
- data/app/views/decidim/searches/_filters.html.erb +1 -1
- data/app/views/decidim/shared/_resource_actions.html.erb +4 -4
- data/app/views/decidim/shared/_results_per_page.html.erb +1 -1
- data/app/views/decidim/shared/filters/_check_boxes_tree.html.erb +1 -1
- data/app/views/decidim/shared/filters/_dropdown_label.html.erb +4 -3
- data/app/views/decidim/user_activities/index.html.erb +1 -1
- data/app/views/devise/mailer/{invite_private_user.html.erb → invite_member.html.erb} +2 -2
- data/app/views/devise/mailer/{invite_private_user.text.erb → invite_member.text.erb} +2 -2
- data/app/views/layouts/decidim/_head.html.erb +2 -2
- data/app/views/layouts/decidim/_wrapper.html.erb +3 -3
- data/app/views/layouts/decidim/footer/_focus_mode_main.html.erb +0 -1
- data/app/views/layouts/decidim/footer/_main.html.erb +1 -2
- data/app/views/layouts/decidim/footer/_main_links.html.erb +28 -56
- data/app/views/layouts/decidim/header/_focus_mode_back_button.html.erb +4 -1
- data/app/views/layouts/decidim/header/_main.html.erb +17 -8
- data/app/views/layouts/decidim/header/_main_language_chooser.html.erb +24 -0
- data/app/views/layouts/decidim/header/_main_links_desktop.html.erb +56 -56
- data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +2 -2
- data/app/views/layouts/decidim/header/_main_links_mobile_item_account.html.erb +3 -1
- data/app/views/layouts/decidim/header/_main_menu_mobile.html.erb +18 -5
- data/app/views/layouts/decidim/header/_main_search.html.erb +3 -3
- data/app/views/layouts/decidim/header/_menu.html.erb +5 -5
- data/app/views/layouts/decidim/header/_menu_breadcrumb_desktop.html.erb +13 -12
- data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile.html.erb +28 -0
- data/app/views/layouts/decidim/shared/_layout_center.html.erb +1 -1
- data/app/views/layouts/decidim/shared/_layout_item.html.erb +1 -1
- data/app/views/layouts/decidim/shared/_layout_two_col.html.erb +1 -1
- data/config/initializers/invisible_captcha.rb +1 -0
- data/config/locales/ar.yml +29 -12
- data/config/locales/bg.yml +31 -14
- data/config/locales/bs-BA.yml +0 -1
- data/config/locales/ca-IT.yml +68 -60
- data/config/locales/ca.yml +68 -60
- data/config/locales/cs.yml +56 -37
- data/config/locales/da.yml +0 -1
- data/config/locales/de.yml +58 -27
- data/config/locales/el.yml +26 -9
- data/config/locales/en.yml +64 -55
- data/config/locales/eo.yml +0 -1
- data/config/locales/es-MX.yml +67 -59
- data/config/locales/es-PY.yml +67 -59
- data/config/locales/es.yml +67 -59
- data/config/locales/et.yml +0 -1
- data/config/locales/eu.yml +104 -94
- data/config/locales/fa-IR.yml +0 -1
- data/config/locales/fi-plain.yml +63 -60
- data/config/locales/fi.yml +65 -62
- data/config/locales/fr-CA.yml +63 -39
- data/config/locales/fr.yml +63 -39
- data/config/locales/ga-IE.yml +3 -2
- data/config/locales/gl.yml +26 -9
- data/config/locales/gn-PY.yml +0 -1
- data/config/locales/hr.yml +0 -1
- data/config/locales/hu.yml +26 -12
- data/config/locales/id-ID.yml +25 -9
- data/config/locales/is-IS.yml +7 -2
- data/config/locales/it.yml +24 -23
- data/config/locales/ja.yml +65 -75
- data/config/locales/ka-GE.yml +0 -1
- data/config/locales/kaa.yml +0 -1
- data/config/locales/ko.yml +0 -1
- data/config/locales/lb.yml +27 -10
- data/config/locales/lt.yml +28 -12
- data/config/locales/lv.yml +25 -9
- data/config/locales/mt.yml +0 -1
- data/config/locales/nl.yml +27 -10
- data/config/locales/no.yml +27 -10
- data/config/locales/oc-FR.yml +0 -1
- data/config/locales/pl.yml +33 -18
- data/config/locales/pt-BR.yml +61 -26
- data/config/locales/pt.yml +27 -10
- data/config/locales/ro-RO.yml +43 -21
- data/config/locales/ru.yml +8 -7
- data/config/locales/sk.yml +25 -1409
- data/config/locales/sl.yml +0 -1
- data/config/locales/sr-CS.yml +0 -1
- data/config/locales/sv.yml +72 -30
- data/config/locales/tr-TR.yml +28 -10
- data/config/locales/uk.yml +6 -4
- data/config/locales/vi.yml +0 -1
- data/config/locales/zh-CN.yml +25 -9
- data/config/locales/zh-TW.yml +28 -10
- data/config/routes.rb +138 -77
- data/db/data/20251213075429_rename_members_in_action_log.rb +22 -0
- data/db/data/20260319145808_rename_send_to_members_in_newsletter.rb +27 -0
- data/db/migrate/20200730142511_add_file_upload_settings_to_decidim_organizations.rb +13 -15
- data/db/migrate/20250217192438_convert_user_groups_into_users.rb +2 -3
- data/db/migrate/20250523104311_move_cta_to_hero_content_block.rb +1 -1
- data/db/migrate/20250527122040_move_highlighted_content_banner_settings_to_content_block.rb +1 -1
- data/db/migrate/20250819110800_convert_private_exports_id_to_uuid.rb +2 -2
- data/db/migrate/20251112132305_remove_legacy_images_from_core_module.rb +27 -0
- data/db/migrate/20251205122428_rename_participatory_space_private_users_to_members.rb +9 -0
- data/db/migrate/20251216185133_rename_privatable_to_to_participatory_space_in_members.rb +10 -0
- data/db/migrate/20260208201405_remove_user_group_core.rb +21 -0
- data/db/migrate/20260208201406_remove_user_group_memberships.rb +30 -0
- data/db/migrate/20260208201407_remove_user_group_organizations.rb +11 -0
- data/db/migrate/20260217152425_remove_enable_participatory_space_filters_from_decidim_organizations.rb +7 -0
- data/db/migrate/20260314081619_add_index_on_decidim_members.rb +25 -0
- data/decidim-core.gemspec +25 -31
- data/lib/decidim/acts_as_tree.rb +12 -12
- data/lib/decidim/admin_filters_registry.rb +1 -1
- data/lib/decidim/amendable.rb +5 -1
- data/lib/decidim/api/functions/category_list.rb +1 -0
- data/lib/decidim/api/functions/component_finder_base.rb +1 -1
- data/lib/decidim/api/functions/component_list.rb +3 -1
- data/lib/decidim/api/functions/component_list_base.rb +1 -0
- data/lib/decidim/api/functions/participatory_space_finder_base.rb +1 -1
- data/lib/decidim/api/functions/participatory_space_list_base.rb +1 -0
- data/lib/decidim/api/functions/user_entity_list.rb +0 -3
- data/lib/decidim/api/interfaces/amendable_entity_interface.rb +1 -0
- data/lib/decidim/api/interfaces/amendable_interface.rb +1 -0
- data/lib/decidim/api/interfaces/attachable_collection_interface.rb +1 -0
- data/lib/decidim/api/interfaces/attachable_interface.rb +1 -0
- data/lib/decidim/api/interfaces/author_interface.rb +2 -1
- data/lib/decidim/api/interfaces/authorable_interface.rb +1 -0
- data/lib/decidim/api/interfaces/categories_container_interface.rb +1 -0
- data/lib/decidim/api/interfaces/categorizable_interface.rb +1 -0
- data/lib/decidim/api/interfaces/coauthorable_interface.rb +1 -0
- data/lib/decidim/api/interfaces/component_interface.rb +9 -8
- data/lib/decidim/api/interfaces/fingerprint_interface.rb +1 -0
- data/lib/decidim/api/interfaces/followable_interface.rb +2 -0
- data/lib/decidim/api/interfaces/likeable_interface.rb +2 -2
- data/lib/decidim/api/interfaces/localizable_interface.rb +1 -0
- data/lib/decidim/api/interfaces/participatory_space_interface.rb +1 -0
- data/lib/decidim/api/interfaces/referable_interface.rb +1 -0
- data/lib/decidim/api/interfaces/scopable_interface.rb +1 -0
- data/lib/decidim/api/interfaces/taxonomizable_interface.rb +1 -0
- data/lib/decidim/api/interfaces/timestamps_interface.rb +1 -0
- data/lib/decidim/api/interfaces/traceable_interface.rb +1 -0
- data/lib/decidim/api/types/attachment_collection_type.rb +5 -3
- data/lib/decidim/api/types/attachment_type.rb +11 -4
- data/lib/decidim/api/types/badge_score_type.rb +28 -0
- data/lib/decidim/api/types/moderation_type.rb +25 -0
- data/lib/decidim/api/types/participant_details_type.rb +17 -0
- data/lib/decidim/api/types/reportable_type.rb +18 -0
- data/lib/decidim/api/types/reportable_user_type.rb +17 -0
- data/lib/decidim/api/types/static_page_topic_type.rb +16 -0
- data/lib/decidim/api/types/static_page_type.rb +22 -0
- data/lib/decidim/api/types/taxonomy_type.rb +2 -0
- data/lib/decidim/api/types/user_moderation_type.rb +36 -0
- data/lib/decidim/api/types/user_type.rb +13 -0
- data/lib/decidim/asset_router/pipeline.rb +1 -1
- data/lib/decidim/asset_router/storage.rb +9 -9
- data/lib/decidim/assets/tailwind/tailwind.config.js.erb +3 -0
- data/lib/decidim/attachment_attributes.rb +9 -58
- data/lib/decidim/attribute_encryptor.rb +51 -10
- data/lib/decidim/attribute_object/model.rb +0 -5
- data/lib/decidim/block_registry.rb +1 -1
- data/lib/decidim/coauthorable.rb +2 -1
- data/lib/decidim/command.rb +2 -1
- data/lib/decidim/content_processor.rb +1 -1
- data/lib/decidim/content_renderers/base_renderer.rb +0 -112
- data/lib/decidim/content_renderers/blob_renderer.rb +7 -4
- data/lib/decidim/content_renderers/mention_resource_renderer.rb +6 -10
- data/lib/decidim/content_renderers/resource_renderer.rb +7 -16
- data/lib/decidim/content_renderers/user_renderer.rb +9 -11
- data/lib/decidim/core/api.rb +8 -0
- data/lib/decidim/core/content_blocks/registry_manager.rb +4 -10
- data/lib/decidim/core/engine.rb +2 -42
- data/lib/decidim/core/menu.rb +0 -26
- data/lib/decidim/core/test/factories.rb +29 -21
- data/lib/decidim/core/test/shared_examples/access_mode_restricted_participatory_spaces.rb +172 -0
- data/lib/decidim/core/test/shared_examples/access_mode_transparent_participatory_spaces.rb +241 -0
- data/lib/decidim/core/test/shared_examples/admin_resource_gallery_examples.rb +10 -10
- data/lib/decidim/core/test/shared_examples/amendable/amendment_event_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +121 -143
- data/lib/decidim/core/test/shared_examples/fingerprint_examples.rb +2 -0
- data/lib/decidim/core/test/shared_examples/has_members.rb +63 -0
- data/lib/decidim/core/test/shared_examples/has_space_in_mcell_examples.rb +1 -2
- data/lib/decidim/core/test/shared_examples/manage_share_tokens_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/map_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/participant_details_examples.rb +16 -0
- data/lib/decidim/core/test/shared_examples/participatory_space_members_page_examples.rb +10 -10
- data/lib/decidim/core/test/shared_examples/resource_liked_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/resource_locator_presenter_examples.rb +7 -7
- data/lib/decidim/core/test/shared_examples/searchable_participatory_space_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/searchable_results_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/simple_event.rb +1 -0
- data/lib/decidim/core/test/shared_examples/translated_event_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/versions_controller_examples.rb +1 -1
- data/lib/decidim/core/test.rb +2 -1
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/core.rb +222 -335
- data/lib/decidim/download_your_data_serializers/{download_your_data_participatory_space_private_user_serializer.rb → download_your_data_member_serializer.rb} +6 -6
- data/lib/decidim/download_your_data_serializers.rb +2 -2
- data/lib/decidim/engine_router.rb +31 -6
- data/lib/decidim/exporters/csv.rb +1 -1
- data/lib/decidim/filter_form_builder.rb +1 -1
- data/{app/controllers/concerns → lib}/decidim/form_factory.rb +11 -1
- data/lib/decidim/has_settings.rb +2 -2
- data/lib/decidim/legacy_form_builder.rb +1 -0
- data/lib/decidim/locale_router_detector.rb +41 -0
- data/lib/decidim/maintenance/import_models/scope.rb +1 -1
- data/lib/decidim/maintenance/import_models.rb +0 -2
- data/lib/decidim/map/autocomplete.rb +3 -4
- data/lib/decidim/map/dynamic_map.rb +1 -3
- data/lib/decidim/map/frontend.rb +1 -1
- data/lib/decidim/map/geocoding.rb +2 -2
- data/lib/decidim/map/static_map.rb +10 -22
- data/lib/decidim/map/utility.rb +3 -6
- data/lib/decidim/map.rb +2 -2
- data/lib/decidim/menu.rb +1 -1
- data/lib/decidim/menu_item.rb +1 -0
- data/lib/decidim/menu_registry.rb +1 -1
- data/lib/decidim/moderation_tools.rb +1 -1
- data/lib/decidim/newsletter_encryptor.rb +5 -8
- data/lib/decidim/organization_settings.rb +2 -2
- data/lib/decidim/participable.rb +1 -0
- data/lib/decidim/participatory_space/has_members.rb +61 -0
- data/lib/decidim/participatory_space_manifest.rb +0 -4
- data/lib/decidim/participatory_space_resourceable.rb +10 -1
- data/lib/decidim/routes/locale_redirects.rb +47 -0
- data/lib/decidim/routes.rb +7 -0
- data/lib/decidim/search_resource_fields_mapper.rb +3 -4
- data/lib/decidim/searchable.rb +0 -5
- data/lib/decidim/seeds.rb +17 -0
- data/lib/decidim/shakapacker/runner.rb +4 -4
- data/lib/decidim/shakapacker/shakapacker.yml +28 -3
- data/lib/decidim/taxonomizable.rb +1 -1
- data/lib/decidim/translatable_attributes.rb +9 -3
- data/lib/decidim/view_model.rb +5 -1
- data/lib/devise/models/decidim_newsletterable.rb +1 -1
- data/lib/tasks/decidim_mailers_tasks.rake +9 -31
- data/lib/tasks/decidim_procfile.rake +1 -1
- data/lib/tasks/decidim_tasks.rake +0 -1
- data/lib/tasks/decidim_taxonomies.rake +1 -1
- data/lib/tasks/upgrade/decidim_active_storage_migration_tasks.rake +0 -1
- data/lib/tasks/upgrade/decidim_encryption.rake +12 -0
- data/lib/tasks/upgrade/decidim_migrate_wysiwyg_content.rake +0 -1
- data/lib/tasks/upgrade/decidim_remove_deleted_users_left_data_tasks.rake +1 -1
- data/lib/tasks/upgrade/{fix_deleted_private_follows.rake → fix_deleted_members_follows.rake} +5 -5
- data/lib/tasks/upgrade/migrations.rake +0 -1
- data/lib/tasks/upgrade/user_groups_migration.rake +0 -1
- metadata +206 -155
- data/app/cells/decidim/content_blocks/global_menu/show.erb +0 -11
- data/app/cells/decidim/content_blocks/global_menu_cell.rb +0 -35
- data/app/cells/decidim/content_blocks/menu_breadcrumb_last_activity/show.erb +0 -10
- data/app/cells/decidim/content_blocks/menu_breadcrumb_last_activity_cell.rb +0 -49
- data/app/cells/decidim/participatory_space_dropdown_metadata/links.erb +0 -9
- data/app/cells/decidim/participatory_space_dropdown_metadata/metadata.erb +0 -1
- data/app/cells/decidim/participatory_space_dropdown_metadata/show.erb +0 -11
- data/app/cells/decidim/participatory_space_dropdown_metadata_cell.rb +0 -26
- data/app/controllers/concerns/decidim/has_members_page.rb +0 -25
- data/app/controllers/decidim/private_downloads_controller.rb +0 -29
- data/app/jobs/decidim/newsletters_opt_in_job.rb +0 -11
- data/app/jobs/decidim/user_report_job.rb +0 -11
- data/app/mailers/decidim/delete_user_mailer.rb +0 -14
- data/app/models/decidim/participatory_space_private_user.rb +0 -51
- data/app/models/decidim/private_download.rb +0 -61
- data/app/packs/src/decidim/controllers/sticky_header/controller.js +0 -116
- data/app/packs/src/decidim/controllers/sticky_header/sticky_header.test.js +0 -320
- data/app/packs/src/decidim/dropdown_menu.js +0 -18
- data/app/packs/src/decidim/geocoding/reverse_geocoding.test.js +0 -197
- data/app/packs/src/decidim/identity_selector_dialog.js +0 -33
- data/app/packs/src/decidim/refactor/moved/focus_guard.test.js +0 -136
- data/app/packs/stylesheets/decidim/_editor_suggestions.scss +0 -49
- data/app/packs/stylesheets/decidim/_tom_select.scss +0 -23
- data/app/presenters/decidim/admin_log/participatory_space_private_user_presenter.rb +0 -38
- data/app/presenters/decidim/participatory_space_private_user_presenter.rb +0 -46
- data/app/services/decidim/push_subscription_endpoint_validator.rb +0 -34
- data/app/views/decidim/delete_user_mailer/delete.html.erb +0 -6
- data/app/views/decidim/participatory_space_private_users/_participatory_space_private_user.html.erb +0 -1
- data/app/views/layouts/decidim/footer/_main_language_chooser.html.erb +0 -26
- data/app/views/layouts/decidim/header/_menu_breadcrumb_items.html.erb +0 -34
- data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_desktop.html.erb +0 -10
- data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_mobile.html.erb +0 -17
- data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_top_left.html.erb +0 -2
- data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +0 -33
- data/app/views/layouts/decidim/header/_mobile_language_choose.html.erb +0 -25
- data/lib/decidim/core/test/shared_examples/has_private_users.rb +0 -63
- data/lib/decidim/core/test/shared_examples/participatory_space_dropdown_metadata_cell_examples.rb +0 -81
- data/lib/decidim/has_private_users.rb +0 -57
- data/lib/decidim/maintenance/import_models/assembly_type.rb +0 -49
- data/lib/decidim/maintenance/import_models/participatory_process_type.rb +0 -21
- data/lib/decidim/query_extensions.rb +0 -64
- /data/app/cells/decidim/{participatory_space_private_user → member}/show.erb +0 -0
data/config/locales/zh-TW.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
zh-TW:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -196,10 +195,6 @@ zh-TW:
|
|
|
196
195
|
organization:
|
|
197
196
|
update: "%{user_name} 更新了組織設定"
|
|
198
197
|
update_external_domain: "%{user_name} 更新了組織外部域名"
|
|
199
|
-
participatory_space_private_user:
|
|
200
|
-
create: "%{user_name} 邀請了 %{resource_name} 成為私人參與者"
|
|
201
|
-
create_via_csv: "%{user_name} 透過 CSV 邀請了 %{resource_name} 成為私人參與者"
|
|
202
|
-
delete: "%{user_name} 將參與者 %{resource_name} 從私人參與者中移除"
|
|
203
198
|
scope:
|
|
204
199
|
create: "%{user_name} 創建了 %{resource_name} 範圍"
|
|
205
200
|
create_with_parent: "%{user_name} 在 %{parent_scope} 範圍內創建了 %{resource_name} 範圍"
|
|
@@ -293,6 +288,9 @@ zh-TW:
|
|
|
293
288
|
success: 修正案草稿成功更新。
|
|
294
289
|
withdraw:
|
|
295
290
|
success: 修正案已成功撤回.
|
|
291
|
+
wizard_step_form:
|
|
292
|
+
steps:
|
|
293
|
+
'1': 創建您的修正案
|
|
296
294
|
anonymous_user: 匿名
|
|
297
295
|
application:
|
|
298
296
|
document:
|
|
@@ -406,6 +404,7 @@ zh-TW:
|
|
|
406
404
|
global:
|
|
407
405
|
amendments_enabled: 修改功能已啟用
|
|
408
406
|
comments_enabled: 啟用評論功能
|
|
407
|
+
comments_max_length: 評論最大長度
|
|
409
408
|
dummy_global_attribute1: 虛擬屬性 1
|
|
410
409
|
dummy_global_attribute2: 虛擬屬性 2
|
|
411
410
|
dummy_global_translatable_text: 虛擬可翻譯文字
|
|
@@ -550,9 +549,13 @@ zh-TW:
|
|
|
550
549
|
affected_user:
|
|
551
550
|
email_intro: '已接受對於 %{amendable_title} 的修正案。您可以從此頁面中查看:'
|
|
552
551
|
email_outro: 你收到此通知,是因為你是%{amendable_title} 的作者。
|
|
552
|
+
email_subject: 已接受對於 %{amendable_title} 的修正案,來自於 %{emendation_author_nickname}
|
|
553
|
+
notification_title: <a href="%{emendation_path}">修正案</a>由<a href="%{emendation_author_path}">%{emendation_author_nickname}</a>創建,已被接受適用於<a href="%{amendable_path}">%{amendable_title}</a>。
|
|
553
554
|
follower:
|
|
554
555
|
email_intro: '已接受對於 %{amendable_title} 的修正案。您可以從此頁面中查看:'
|
|
555
556
|
email_outro: 您收到此通知,是因為您正在關注 %{amendable_title}。您可以使用上面的連結停止接收通知。
|
|
557
|
+
email_subject: 已接受對於 %{amendable_title} 的修正案,來自於 %{emendation_author_nickname}
|
|
558
|
+
notification_title: <a href="%{emendation_path}">修正案</a>由<a href="%{emendation_author_path}">%{emendation_author_nickname}</a>創建,已被接受適用於<a href="%{amendable_path}">%{amendable_title}</a>。
|
|
556
559
|
amendment_created:
|
|
557
560
|
affected_user:
|
|
558
561
|
email_intro: '已為 %{amendable_title} 創建一個新的修正案。您可以從此頁面查看:'
|
|
@@ -568,16 +571,24 @@ zh-TW:
|
|
|
568
571
|
affected_user:
|
|
569
572
|
email_intro: '一個被拒絕的修正案已被發佈為新的 %{amendable_type},針對 %{amendable_title}。您可以從此頁面查看:'
|
|
570
573
|
email_outro: 你收到此通知,是因為你是%{amendable_title} 的作者。
|
|
574
|
+
email_subject: 來自 %{emendation_author_nickname} 的修正案已被發佈為新的 %{amendable_type}
|
|
575
|
+
notification_title: 一個<a href="%{emendation_path}">被拒絕的修正案</a>已由<a href="%{emendation_author_path}">%{emendation_author_nickname}</a>發佈為新的 %{amendable_type},針對<a href="%{amendable_path}">%{amendable_title}</a>。
|
|
571
576
|
follower:
|
|
572
577
|
email_intro: '一個被拒絕的修正案已被發佈為新的 %{amendable_type},針對 %{amendable_title}。您可以從此頁面查看:'
|
|
573
578
|
email_outro: 您收到此通知,是因為您正在關注 %{amendable_title}。您可以使用上面的連結停止接收通知。
|
|
579
|
+
email_subject: 來自 %{emendation_author_nickname} 的修正案已被發佈為新的 %{amendable_type}
|
|
580
|
+
notification_title: 一個<a href="%{emendation_path}">被拒絕的修正案</a>已由<a href="%{emendation_author_path}">%{emendation_author_nickname}</a>發佈為新的 %{amendable_type},針對<a href="%{amendable_path}">%{amendable_title}</a>。
|
|
574
581
|
amendment_rejected:
|
|
575
582
|
affected_user:
|
|
576
583
|
email_intro: '一個修正案已被拒絕,針對 %{amendable_title}。您可以從此頁面查看:'
|
|
577
584
|
email_outro: 你收到此通知,是因為你是%{amendable_title} 的作者。
|
|
585
|
+
email_subject: 修正案由 %{emendation_author_nickname} 提交,針對 %{amendable_title},已被拒絕。
|
|
586
|
+
notification_title: <a href="%{emendation_path}">%{emendation_author_nickname}</a>創建的<a href="%{emendation_path}">修正案</a>已被拒絕,針對<a href="%{amendable_path}">%{amendable_title}</a>。
|
|
578
587
|
follower:
|
|
579
588
|
email_intro: '一個修正案已被拒絕,針對 %{amendable_title}。您可以從此頁面查看:'
|
|
580
589
|
email_outro: 您收到此通知,是因為您正在關注 %{amendable_title}。您可以使用上面的連結停止接收通知。
|
|
590
|
+
email_subject: 修正案由 %{emendation_author_nickname} 提交,針對 %{amendable_title},已被拒絕。
|
|
591
|
+
notification_title: <a href="%{emendation_path}">%{emendation_author_nickname}</a>創建的<a href="%{emendation_path}">修正案</a>已被拒絕,針對<a href="%{amendable_path}">%{amendable_title}</a>。
|
|
581
592
|
attachments:
|
|
582
593
|
attachment_created:
|
|
583
594
|
email_intro: '已新增一個文件至 %{resource_title}。您可以從此頁面查看:'
|
|
@@ -614,9 +625,16 @@ zh-TW:
|
|
|
614
625
|
notification_title: |-
|
|
615
626
|
一位管理員因為 %{report_reasons} 的舉報,移除了您的%{resource_type}。</br> <i>%{resource_content}</i>
|
|
616
627
|
users:
|
|
628
|
+
profile_updated:
|
|
629
|
+
email_intro: 你正在追蹤的 %{name}(%{nickname}) 的<a href="%{resource_path}">個人資料頁面</a>已被更新。
|
|
630
|
+
email_outro: 您收到此通知是因為您正在關注 %{nickname}。您可以點擊上方的連結停止接收通知。
|
|
631
|
+
email_subject: "%{nickname} 更新了他們的個人資料。"
|
|
632
|
+
notification_title: 你正在追蹤的 %{name}(%{nickname}) 的<a href="%{resource_path}">個人資料頁面</a>已被更新。
|
|
617
633
|
user_officialized:
|
|
634
|
+
email_intro: 參與者 %{name} (%{nickname}) 已被官方認證。
|
|
618
635
|
email_outro: 您收到此通知是因為您是該組織的管理員。
|
|
619
636
|
email_subject: "%{name} 已被官方認證。"
|
|
637
|
+
notification_title: 參與者 %{name} (%{nickname}) 已被官方認證。
|
|
620
638
|
export_mailer:
|
|
621
639
|
download_your_data_export:
|
|
622
640
|
download: 下載
|
|
@@ -702,7 +720,7 @@ zh-TW:
|
|
|
702
720
|
badges:
|
|
703
721
|
followers:
|
|
704
722
|
conditions:
|
|
705
|
-
|
|
723
|
+
- 積極參與並追蹤其他人,有助於吸引其他人追蹤您。
|
|
706
724
|
description: 當您達到一定數量的追蹤者時,將獲得此徽章。%{organization_name} 是一個社交和政治網絡,藉此平台與其他人溝通,編織您的網絡。
|
|
707
725
|
description_another: 這位參與者有 %{score} 位追隨者。
|
|
708
726
|
description_own: "這位參與者有 %{score} 位追隨者。"
|
|
@@ -774,7 +792,6 @@ zh-TW:
|
|
|
774
792
|
latlng_text: '緯度:%{latitude},經度:%{longitude}'
|
|
775
793
|
map_service_brand: 開放街圖
|
|
776
794
|
menu:
|
|
777
|
-
help: 幫助
|
|
778
795
|
home: 首頁
|
|
779
796
|
messaging:
|
|
780
797
|
conversation_mailer:
|
|
@@ -796,6 +813,7 @@ zh-TW:
|
|
|
796
813
|
create:
|
|
797
814
|
error: 對話未開始。請稍後再試。
|
|
798
815
|
error_modal:
|
|
816
|
+
close: 關閉視窗
|
|
799
817
|
correct_errors: 請修正錯誤後再試一次。
|
|
800
818
|
intro: '您的訊息有以下錯誤:'
|
|
801
819
|
ok: 好的
|
|
@@ -955,6 +973,9 @@ zh-TW:
|
|
|
955
973
|
alert: 我們已更新我們的服務條款,請您查閱。
|
|
956
974
|
body: 請花一點時間檢閱我們的服務條款更新,否則您將無法使用平台。
|
|
957
975
|
title: '必須:檢閱我們的服務條款更新'
|
|
976
|
+
participatory_space_members:
|
|
977
|
+
index:
|
|
978
|
+
members: 成員
|
|
958
979
|
passwords:
|
|
959
980
|
update:
|
|
960
981
|
error: 密碼更新時發生問題.
|
|
@@ -1161,10 +1182,8 @@ zh-TW:
|
|
|
1161
1182
|
ignore: |-
|
|
1162
1183
|
如果您不想接受邀請,請忽略此電子郵件。<br />在您使用上述連結設置您的暱稱和密碼之前,您的帳戶不會被創建。
|
|
1163
1184
|
invited_you_as_admin: "%{invited_by} 邀請您成為 %{application} 的管理員。您可以通過下面的連結接受邀請。"
|
|
1164
|
-
invited_you_as_private_user: "%{invited_by} 邀請您成為 %{application} 的私密參與者。您可以通過下面的連結接受邀請。"
|
|
1165
1185
|
someone_invited_you: 有人邀請您加入 %{application}。您可以通過下面的連結接受邀請。
|
|
1166
1186
|
someone_invited_you_as_admin: 有人邀請您成為 %{application} 的管理員,您可以通過下面的連結接受邀請。
|
|
1167
|
-
someone_invited_you_as_private_user: 有人邀請您成為 %{application} 的私人參與者,您可以通過下面的連結接受邀請。
|
|
1168
1187
|
subject: 邀請說明
|
|
1169
1188
|
invite_admin:
|
|
1170
1189
|
subject: 你已經被邀請成為 %{organization} 的管理者
|
|
@@ -1380,7 +1399,6 @@ zh-TW:
|
|
|
1380
1399
|
name_included_in_password: 與您的名字太相似
|
|
1381
1400
|
nickname_included_in_password: 與您的暱稱太相似
|
|
1382
1401
|
not_enough_unique_characters: 沒有足夠的獨特字符
|
|
1383
|
-
password_not_allowed: 不被允許
|
|
1384
1402
|
password_repeated: 不能重複使用舊密碼
|
|
1385
1403
|
password_too_common: 太常見了
|
|
1386
1404
|
password_too_long: 太長
|
data/config/routes.rb
CHANGED
|
@@ -1,47 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
Decidim::Core::Engine.routes.draw do
|
|
4
|
+
extend Decidim::Routes::LocaleRedirects
|
|
5
|
+
|
|
4
6
|
mount Decidim::Api::Engine => "/api"
|
|
5
7
|
|
|
8
|
+
get "/", to: redirect(&locale_redirector("/")), as: :root_redirect
|
|
9
|
+
|
|
6
10
|
get "/offline", to: "offline#show"
|
|
7
11
|
|
|
8
12
|
get "/favicon.ico", to: "favicon#show"
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
class_name: "Decidim::User",
|
|
12
|
-
module: :devise,
|
|
13
|
-
router_name: :decidim,
|
|
14
|
-
controllers: {
|
|
15
|
-
invitations: "decidim/devise/invitations",
|
|
16
|
-
sessions: "decidim/devise/sessions",
|
|
17
|
-
confirmations: "decidim/devise/confirmations",
|
|
18
|
-
passwords: "decidim/devise/passwords",
|
|
19
|
-
unlocks: "decidim/devise/unlocks",
|
|
20
|
-
omniauth_callbacks: "decidim/devise/omniauth_registrations"
|
|
21
|
-
},
|
|
22
|
-
skip: [:registrations]
|
|
23
|
-
|
|
24
|
-
# Manually define the registration routes because otherwise the default "edit"
|
|
25
|
-
# route would be exposed through Devise while we already have the edit and
|
|
26
|
-
# destroy routes available through the account pages.
|
|
27
|
-
resource(
|
|
28
|
-
:registration,
|
|
29
|
-
only: [:new, :create],
|
|
30
|
-
as: :user_registration,
|
|
31
|
-
path: "/users",
|
|
32
|
-
path_names: { new: "sign_up" },
|
|
33
|
-
controller: "devise/registrations"
|
|
34
|
-
) do
|
|
35
|
-
# The "cancel" route forces the session data which is usually expired after
|
|
36
|
-
# sign in to be expired now. This is useful if the user wants to cancel
|
|
37
|
-
# OAuth signing in/up in the middle of the process, removing all OAuth
|
|
38
|
-
# session data. @see [Devise::RegistrationsController#cancel]
|
|
39
|
-
get :cancel
|
|
40
|
-
end
|
|
14
|
+
get "/admin", to: redirect(&locale_redirector("/admin"))
|
|
41
15
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
16
|
+
get "/admin/*rest", to: redirect { |params, request|
|
|
17
|
+
locale_redirect(params, request, "/admin/#{params[:rest]}")
|
|
18
|
+
}
|
|
45
19
|
|
|
46
20
|
resource :manifest, only: [:show]
|
|
47
21
|
|
|
@@ -54,36 +28,47 @@ Decidim::Core::Engine.routes.draw do
|
|
|
54
28
|
end
|
|
55
29
|
|
|
56
30
|
authenticate(:user) do
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
31
|
+
scope "/:locale", **locale_scope_options do
|
|
32
|
+
devise_scope :user do
|
|
33
|
+
get "change_password" => "devise/passwords"
|
|
34
|
+
put "apply_password" => "devise/passwords"
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
resource :account, only: [:show, :update, :destroy], controller: "account" do
|
|
38
|
+
member do
|
|
39
|
+
get :delete
|
|
40
|
+
post :resend_confirmation_instructions
|
|
41
|
+
post :cancel_email_change
|
|
42
|
+
end
|
|
43
|
+
end
|
|
61
44
|
end
|
|
62
45
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
46
|
+
scope "/:locale", **locale_scope_options do
|
|
47
|
+
resource :download_your_data, only: [:show], controller: "download_your_data" do
|
|
48
|
+
member do
|
|
49
|
+
post :export
|
|
50
|
+
get "/:uuid", to: "download_your_data#download_file", as: :download
|
|
51
|
+
end
|
|
68
52
|
end
|
|
69
53
|
end
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
54
|
+
|
|
55
|
+
scope "/:locale", **locale_scope_options do
|
|
56
|
+
resources :notifications, only: [:index, :destroy] do
|
|
57
|
+
collection do
|
|
58
|
+
delete :read_all
|
|
59
|
+
end
|
|
75
60
|
end
|
|
61
|
+
|
|
62
|
+
resources :conversations, only: [:new, :create, :index, :show, :update], controller: "messaging/conversations"
|
|
63
|
+
post "/conversations/check_multiple", to: "messaging/conversations#check_multiple"
|
|
64
|
+
|
|
65
|
+
resource :notifications_settings, only: [:show, :update], controller: "notifications_settings"
|
|
76
66
|
end
|
|
77
|
-
resource :notifications_settings, only: [:show, :update], controller: "notifications_settings"
|
|
78
67
|
|
|
79
68
|
get "/newsletters_opt_in/:token", to: "newsletters_opt_in#update", as: :newsletters_opt_in
|
|
80
69
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
post :export
|
|
84
|
-
get "/:uuid", to: "download_your_data#download_file", as: :download
|
|
85
|
-
end
|
|
86
|
-
end
|
|
70
|
+
get "/download_your_data", to: redirect(&locale_redirector("/download_your_data"))
|
|
71
|
+
get "/download_your_data/:uuid", to: redirect { |params, request| locale_redirector("/download_your_data/#{params[:uuid]}").call(params, request) }
|
|
87
72
|
|
|
88
73
|
resources :notifications_subscriptions, param: :auth, only: [:create, :destroy]
|
|
89
74
|
|
|
@@ -93,14 +78,12 @@ Decidim::Core::Engine.routes.draw do
|
|
|
93
78
|
to: "free_resource_authorization_modals#show",
|
|
94
79
|
as: :free_resource_authorization_modal
|
|
95
80
|
)
|
|
96
|
-
end
|
|
97
81
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
get "
|
|
103
|
-
get "activity", to: "user_activities#index", as: "profile_activity"
|
|
82
|
+
get "/account/*rest", to: redirect { |params, request|
|
|
83
|
+
locale_redirect(params, request, "/account/#{params[:rest]}")
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
get "/account", to: redirect(&locale_redirector("/account"))
|
|
104
87
|
end
|
|
105
88
|
|
|
106
89
|
scope :timeouts do
|
|
@@ -108,9 +91,99 @@ Decidim::Core::Engine.routes.draw do
|
|
|
108
91
|
get "seconds_until_timeout", to: "timeouts#seconds_until_timeout"
|
|
109
92
|
end
|
|
110
93
|
|
|
111
|
-
|
|
94
|
+
# OmniAuth callbacks must be defined outside any dynamic segment scope
|
|
95
|
+
# because Devise does not support scoping them under /:locale.
|
|
96
|
+
devise_for :users,
|
|
97
|
+
class_name: "Decidim::User",
|
|
98
|
+
module: :devise,
|
|
99
|
+
router_name: :decidim,
|
|
100
|
+
controllers: {
|
|
101
|
+
omniauth_callbacks: "decidim/devise/omniauth_registrations"
|
|
102
|
+
},
|
|
103
|
+
only: :omniauth_callbacks
|
|
104
|
+
|
|
105
|
+
scope "/:locale", **locale_scope_options do
|
|
106
|
+
devise_for :users,
|
|
107
|
+
class_name: "Decidim::User",
|
|
108
|
+
module: :devise,
|
|
109
|
+
router_name: :decidim,
|
|
110
|
+
controllers: {
|
|
111
|
+
invitations: "decidim/devise/invitations",
|
|
112
|
+
sessions: "decidim/devise/sessions",
|
|
113
|
+
confirmations: "decidim/devise/confirmations",
|
|
114
|
+
passwords: "decidim/devise/passwords",
|
|
115
|
+
unlocks: "decidim/devise/unlocks"
|
|
116
|
+
},
|
|
117
|
+
skip: [:registrations, :omniauth_callbacks]
|
|
118
|
+
|
|
119
|
+
# Manually define the registration routes because otherwise the default "edit"
|
|
120
|
+
# route would be exposed through Devise while we already have the edit and
|
|
121
|
+
# destroy routes available through the account pages.
|
|
122
|
+
resource(
|
|
123
|
+
:registration,
|
|
124
|
+
only: [:new, :create],
|
|
125
|
+
as: :user_registration,
|
|
126
|
+
path: "/users",
|
|
127
|
+
path_names: { new: "sign_up" },
|
|
128
|
+
controller: "devise/registrations"
|
|
129
|
+
) do
|
|
130
|
+
# The "cancel" route forces the session data which is usually expired after
|
|
131
|
+
# sign in to be expired now. This is useful if the user wants to cancel
|
|
132
|
+
# OAuth signing in/up in the middle of the process, removing all OAuth
|
|
133
|
+
# session data. @see [Devise::RegistrationsController#cancel]
|
|
134
|
+
get :cancel
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
devise_scope :user do
|
|
138
|
+
post "omniauth_registrations" => "devise/omniauth_registrations#create"
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
resources :pages, only: [:index, :show], format: false
|
|
142
|
+
|
|
143
|
+
resources :profiles, only: [:show], param: :nickname, constraints: { nickname: %r{[^/]+} }, format: false
|
|
144
|
+
scope "/profiles/:nickname", format: false, constraints: { nickname: %r{[^/]+} } do
|
|
145
|
+
get "following", to: "profiles#following", as: "profile_following"
|
|
146
|
+
get "followers", to: "profiles#followers", as: "profile_followers"
|
|
147
|
+
get "badges", to: "profiles#badges", as: "profile_badges"
|
|
148
|
+
get "activity", to: "user_activities#index", as: "profile_activity"
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
get "/open-data", to: "open_data#index", as: :open_data
|
|
152
|
+
get "/open-data/download", to: "open_data#download", as: :open_data_download
|
|
153
|
+
get "/open-data/download/:resource", to: "open_data#download", as: :open_data_download_resource
|
|
154
|
+
get "/search", to: "searches#index", as: :search
|
|
155
|
+
resources :last_activities, only: [:index]
|
|
156
|
+
namespace :gamification do
|
|
157
|
+
resources :badges, only: [:index]
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
root to: "homepage#show"
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
get "/last_activities", to: redirect(&locale_redirector("/last_activities"))
|
|
164
|
+
get "/search", to: redirect(&locale_redirector("/search"))
|
|
165
|
+
get "/pages", to: redirect(&locale_redirector("/pages"))
|
|
166
|
+
get "/pages/*rest", to: redirect { |params, request| locale_redirector("/pages/#{params[:rest]}").call(params, request) }
|
|
167
|
+
get "/gamification/*rest", to: redirect { |params, request| locale_redirector("/gamification/#{params[:rest]}").call(params, request) }
|
|
168
|
+
get "/open-data/*rest", to: redirect { |params, request| locale_redirector("/open-data/#{params[:rest]}").call(params, request) }
|
|
169
|
+
get "/open-data", to: redirect(&locale_redirector("/open-data"))
|
|
170
|
+
get "/profiles/*rest", to: redirect { |params, request| locale_redirector("/profiles/#{params[:rest]}").call(params, request) }
|
|
171
|
+
get "/notifications", to: redirect(&locale_redirector("/notifications"))
|
|
172
|
+
get "/conversations", to: redirect(&locale_redirector("/conversations"))
|
|
173
|
+
get "/conversations/*rest", to: redirect { |params, request| locale_redirector("/conversations/#{params[:rest]}").call(params, request) }
|
|
174
|
+
get "/notifications_settings", to: redirect(&locale_redirector("/notifications_settings"))
|
|
175
|
+
|
|
176
|
+
get "/users/sign_in", to: redirect(&locale_redirector("/users/sign_in"))
|
|
177
|
+
get "/users/sign_up", to: redirect(&locale_redirector("/users/sign_up"))
|
|
178
|
+
get "/users/password/new", to: redirect(&locale_redirector("/users/password/new"))
|
|
179
|
+
get "/users/password/edit", to: redirect(&locale_redirector("/users/password/edit"))
|
|
180
|
+
get "/users/confirmation/new", to: redirect(&locale_redirector("/users/confirmation/new"))
|
|
181
|
+
get "/users/confirmation", to: redirect(&locale_redirector("/users/confirmation"))
|
|
182
|
+
get "/users/unlock/new", to: redirect(&locale_redirector("/users/unlock/new"))
|
|
183
|
+
get "/users/unlock", to: redirect(&locale_redirector("/users/unlock"))
|
|
184
|
+
get "/users/invitation/new", to: redirect(&locale_redirector("/users/invitation/new"))
|
|
185
|
+
get "/users/invitation/accept", to: redirect(&locale_redirector("/users/invitation/accept"))
|
|
112
186
|
|
|
113
|
-
get "/search", to: "searches#index", as: :search
|
|
114
187
|
get "/resource_autocomplete", to: "resource_autocomplete#index", as: :resource_autocomplete
|
|
115
188
|
|
|
116
189
|
get "/link", to: "links#new", as: :link
|
|
@@ -122,15 +195,11 @@ Decidim::Core::Engine.routes.draw do
|
|
|
122
195
|
match "/404", to: "errors#not_found", via: :all
|
|
123
196
|
match "/500", to: "errors#internal_server_error", via: :all
|
|
124
197
|
|
|
125
|
-
get "/open-data", to: "open_data#index", as: :open_data
|
|
126
|
-
get "/open-data/download", to: "open_data#download", as: :open_data_download
|
|
127
|
-
get "/open-data/download/:resource", to: "open_data#download", as: :open_data_download_resource
|
|
128
|
-
|
|
129
198
|
resource :follow, only: [:create, :destroy]
|
|
130
199
|
resource :report, only: [:create]
|
|
131
200
|
resource :report_user, only: [:create]
|
|
132
201
|
resources :likes, only: [:create, :destroy]
|
|
133
|
-
resources :amends, only: [:new
|
|
202
|
+
resources :amends, only: [:new], controller: :amendments do
|
|
134
203
|
collection do
|
|
135
204
|
post :create
|
|
136
205
|
end
|
|
@@ -150,18 +219,12 @@ Decidim::Core::Engine.routes.draw do
|
|
|
150
219
|
|
|
151
220
|
resources :editor_images, only: [:create]
|
|
152
221
|
|
|
153
|
-
namespace :gamification do
|
|
154
|
-
resources :badges, only: [:index]
|
|
155
|
-
end
|
|
156
|
-
|
|
157
222
|
resources :newsletters, only: [:show] do
|
|
158
223
|
get :unsubscribe, on: :collection
|
|
159
224
|
end
|
|
160
225
|
|
|
161
226
|
resources :upload_validations, only: [:create]
|
|
162
227
|
|
|
163
|
-
resources :last_activities, only: [:index]
|
|
164
|
-
|
|
165
228
|
resources :short_links, only: [:index, :show], path: "s"
|
|
166
229
|
|
|
167
230
|
use_doorkeeper do
|
|
@@ -171,6 +234,4 @@ Decidim::Core::Engine.routes.draw do
|
|
|
171
234
|
scope :oauth do
|
|
172
235
|
get "/me" => "doorkeeper/credentials#me"
|
|
173
236
|
end
|
|
174
|
-
|
|
175
|
-
root to: "homepage#show"
|
|
176
237
|
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class RenameMembersInActionLog < ActiveRecord::Migration[7.2]
|
|
4
|
+
class ActionLog < ApplicationRecord
|
|
5
|
+
self.table_name = :decidim_action_logs
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def up
|
|
9
|
+
old_resource_type = "Decidim::ParticipatorySpacePrivateUser"
|
|
10
|
+
new_resource_type = "Decidim::ParticipatorySpace::Member"
|
|
11
|
+
|
|
12
|
+
# rubocop:disable Rails/SkipsModelValidations
|
|
13
|
+
updated_count = ActionLog.where(resource_type: old_resource_type).update_all(resource_type: new_resource_type)
|
|
14
|
+
# rubocop:enable Rails/SkipsModelValidations
|
|
15
|
+
|
|
16
|
+
Rails.logger.info "Updated #{updated_count} ActionLog records from #{old_resource_type} to #{new_resource_type}"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def down
|
|
20
|
+
raise ActiveRecord::IrreversibleMigration
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class RenameSendToMembersInNewsletter < ActiveRecord::Migration[8.1]
|
|
4
|
+
class Newsletter < ApplicationRecord
|
|
5
|
+
self.table_name = :decidim_newsletters
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def up
|
|
9
|
+
Newsletter.find_each do |newsletter|
|
|
10
|
+
next unless newsletter.extended_data
|
|
11
|
+
next unless newsletter.extended_data.has_key?("send_to_private_members")
|
|
12
|
+
|
|
13
|
+
newsletter.extended_data["send_to_members"] = newsletter.extended_data.delete("send_to_private_members")
|
|
14
|
+
newsletter.save!(validate: false)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def down
|
|
19
|
+
Newsletter.find_each do |newsletter|
|
|
20
|
+
next unless newsletter.extended_data
|
|
21
|
+
next unless newsletter.extended_data.has_key?("send_to_members")
|
|
22
|
+
|
|
23
|
+
newsletter.extended_data["send_to_private_members"] = newsletter.extended_data.delete("send_to_members")
|
|
24
|
+
newsletter.save!(validate: false)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -6,23 +6,21 @@ class AddFileUploadSettingsToDecidimOrganizations < ActiveRecord::Migration[5.2]
|
|
|
6
6
|
|
|
7
7
|
reversible do |dir|
|
|
8
8
|
dir.up do
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
avatar_size = config.fetch(:maximum_avatar_size, 5.megabytes)
|
|
9
|
+
# Even when these configurations have been deleted, they are available
|
|
10
|
+
# in the config object if they are defined by the initializer.
|
|
11
|
+
attachment_size = Decidim.maximum_attachment_size || 10.megabytes
|
|
12
|
+
avatar_size = Decidim.maximum_avatar_size || 5.megabytes
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
)
|
|
14
|
+
# Update all organizations with the default file upload settings.
|
|
15
|
+
Decidim::Organization.all.each do |organization|
|
|
16
|
+
organization.update(
|
|
17
|
+
file_upload_settings: default_settings.merge(
|
|
18
|
+
"maximum_file_size" => {
|
|
19
|
+
"default" => attachment_size / 1.megabyte,
|
|
20
|
+
"avatar" => avatar_size / 1.megabyte
|
|
21
|
+
}
|
|
24
22
|
)
|
|
25
|
-
|
|
23
|
+
)
|
|
26
24
|
end
|
|
27
25
|
end
|
|
28
26
|
end
|
|
@@ -33,8 +33,8 @@ class ConvertUserGroupsIntoUsers < ActiveRecord::Migration[7.0]
|
|
|
33
33
|
def up
|
|
34
34
|
User.old_group.find_each do |group|
|
|
35
35
|
if group.email.blank? || another_user_with_same_email_in_organization?(group)
|
|
36
|
-
group.update_attribute(:extended_data, (group.extended_data || {}).merge("patched" => true, "previous_email" => group.email))
|
|
37
36
|
group.update_attribute(:email, "user_group_#{group.id}@#{group.organization.host}.invalid")
|
|
37
|
+
group.update_attribute(:extended_data, (group.extended_data || {}).merge("patched" => true, "previous_email" => group.email))
|
|
38
38
|
|
|
39
39
|
group.reload
|
|
40
40
|
end
|
|
@@ -49,8 +49,7 @@ class ConvertUserGroupsIntoUsers < ActiveRecord::Migration[7.0]
|
|
|
49
49
|
User.new_group.find_each do |group|
|
|
50
50
|
group.update_attribute(:officialized_at, nil)
|
|
51
51
|
group.update_attribute(:type, "Decidim::UserGroup")
|
|
52
|
-
group.update_attribute(:
|
|
53
|
-
group.update_attribute(:extended_data, (group.extended_data || {}).except("group", "patched", "previous_email"))
|
|
52
|
+
group.update_attribute(:extended_data, (group.extended_data || {}).except("group"))
|
|
54
53
|
end
|
|
55
54
|
end
|
|
56
55
|
# rubocop:enable Rails/SkipsModelValidations
|
|
@@ -8,7 +8,7 @@ class MoveCtaToHeroContentBlock < ActiveRecord::Migration[7.0]
|
|
|
8
8
|
def up
|
|
9
9
|
Decidim::ContentBlock.reset_column_information
|
|
10
10
|
Organization.find_each do |organization|
|
|
11
|
-
content_block = Decidim::ContentBlock.find_by(organization
|
|
11
|
+
content_block = Decidim::ContentBlock.find_by(organization:, scope_name: :homepage, manifest_name: :hero)
|
|
12
12
|
settings = {}
|
|
13
13
|
cta_button_text = organization.cta_button_text || {}
|
|
14
14
|
settings = cta_button_text.inject(settings) { |acc, (k, v)| acc.update("cta_button_text_#{k}" => v) }
|
|
@@ -11,7 +11,7 @@ class MoveHighlightedContentBannerSettingsToContentBlock < ActiveRecord::Migrati
|
|
|
11
11
|
Decidim::ContentBlock.reset_column_information
|
|
12
12
|
|
|
13
13
|
Organization.find_each do |organization|
|
|
14
|
-
content_block = Decidim::ContentBlock.find_by(organization
|
|
14
|
+
content_block = Decidim::ContentBlock.find_by(organization:, scope_name: :homepage, manifest_name: :highlighted_content_banner)
|
|
15
15
|
settings = extract_settings(organization)
|
|
16
16
|
|
|
17
17
|
# We need to do a workaround for getting the image, as ActiveStorage is polymorphic and expects that the `record_type` is the class name of the model
|
|
@@ -18,7 +18,7 @@ class ConvertPrivateExportsIdToUuid < ActiveRecord::Migration[7.0]
|
|
|
18
18
|
t.index [:uuid], name: "index_decidim_private_exports_on_uuid", unique: true
|
|
19
19
|
end
|
|
20
20
|
# Copy data from old table to new table
|
|
21
|
-
execute
|
|
21
|
+
execute <<~SQL.squish
|
|
22
22
|
INSERT INTO decidim_private_exports_new (uuid, export_type, attached_to_type, attached_to_id, file, content_type, file_size, expires_at, metadata, created_at, updated_at)
|
|
23
23
|
SELECT id, export_type, attached_to_type, attached_to_id, file, content_type, file_size, NOW(), metadata, created_at, updated_at
|
|
24
24
|
FROM decidim_private_exports
|
|
@@ -43,7 +43,7 @@ class ConvertPrivateExportsIdToUuid < ActiveRecord::Migration[7.0]
|
|
|
43
43
|
t.timestamps
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
execute
|
|
46
|
+
execute <<~SQL.squish
|
|
47
47
|
INSERT INTO decidim_private_exports_new (id, export_type, attached_to_type, attached_to_id, file, content_type, file_size, expires_at, metadata, created_at, updated_at)
|
|
48
48
|
SELECT uuid, export_type, attached_to_type, attached_to_id, file, content_type, file_size, expires_at, metadata, created_at, updated_at
|
|
49
49
|
FROM decidim_private_exports
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class RemoveLegacyImagesFromCoreModule < ActiveRecord::Migration[7.2]
|
|
4
|
+
def change
|
|
5
|
+
remove_column :decidim_organizations, :logo, :string
|
|
6
|
+
remove_column :decidim_organizations, :official_img_footer, :string
|
|
7
|
+
remove_column :decidim_organizations, :favicon, :string
|
|
8
|
+
|
|
9
|
+
remove_column :oauth_applications, :organization_logo, :string
|
|
10
|
+
|
|
11
|
+
remove_column :decidim_authorizations, :verification_attachment, :string
|
|
12
|
+
|
|
13
|
+
# The original decidim_attachments table creation was in decidim-participatory_processes
|
|
14
|
+
# and then it was made polymorphic.
|
|
15
|
+
# We need to workaround this issue as when creating new application this table may not exist
|
|
16
|
+
# when this migration is run. To be in a consistent state for new apps, we also do this in decidim-participatory_processes
|
|
17
|
+
#
|
|
18
|
+
# @see decidim-participatory_processes/db/migrate/20161116115156_create_attachments.rb
|
|
19
|
+
# @see decidim-participatory_processes/db/migrate/20170123134023_make_attachments_polymorphic.rb
|
|
20
|
+
# @see decidim-participatory-processes/db/migrate/20251203071213_remove_legacy_file_column_from_attachments_table.rb
|
|
21
|
+
remove_column :decidim_attachments, :file, :string if table_exists?(:decidim_attachments) && column_exists?(:decidim_attachments, :file)
|
|
22
|
+
|
|
23
|
+
remove_column :decidim_users, :avatar, :string
|
|
24
|
+
|
|
25
|
+
remove_column :decidim_private_exports, :file, :string
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class RenameParticipatorySpacePrivateUsersToMembers < ActiveRecord::Migration[7.0]
|
|
4
|
+
def change
|
|
5
|
+
rename_table :decidim_participatory_space_private_users, :decidim_members
|
|
6
|
+
|
|
7
|
+
rename_index :decidim_members, :index_decidim_spaces_users_on_private_user_id, :index_decidim_members_on_user_id
|
|
8
|
+
end
|
|
9
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class RenamePrivatableToToParticipatorySpaceInMembers < ActiveRecord::Migration[7.2]
|
|
4
|
+
def change
|
|
5
|
+
rename_column :decidim_members, :privatable_to_id, :participatory_space_id
|
|
6
|
+
rename_column :decidim_members, :privatable_to_type, :participatory_space_type
|
|
7
|
+
|
|
8
|
+
rename_index :decidim_members, "space_privatable_to_privatable_id", "index_decidim_members_on_participatory_space"
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class RemoveUserGroupCore < ActiveRecord::Migration[7.0]
|
|
4
|
+
def up
|
|
5
|
+
remove_index :decidim_coauthorships, :decidim_user_group_id
|
|
6
|
+
remove_column :decidim_coauthorships, :decidim_user_group_id
|
|
7
|
+
remove_index :decidim_likes, :decidim_user_group_id
|
|
8
|
+
remove_column :decidim_likes, :decidim_user_group_id
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def down
|
|
12
|
+
add_column :decidim_coauthorships, :decidim_user_group_id, :integer
|
|
13
|
+
add_index :decidim_coauthorships, :decidim_user_group_id
|
|
14
|
+
add_column :decidim_likes, :decidim_user_group_id, :integer
|
|
15
|
+
add_index :decidim_likes, :decidim_user_group_id
|
|
16
|
+
add_index :decidim_likes,
|
|
17
|
+
[:decidim_likable_id, :decidim_likable_type, :decidim_author_id, :decidim_author_type, :decidim_user_group_id],
|
|
18
|
+
name: "idx_likes_rsrcs_and_authors",
|
|
19
|
+
unique: true
|
|
20
|
+
end
|
|
21
|
+
end
|