decidim-core 0.28.5 → 0.29.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 +1 -1
- data/app/cells/decidim/activities_cell.rb +0 -1
- data/app/cells/decidim/activity_cell.rb +7 -6
- data/app/cells/decidim/address/online.erb +2 -2
- data/app/cells/decidim/address_cell.rb +3 -9
- data/app/cells/decidim/amendable/amend_button_card_cell.rb +0 -2
- data/app/cells/decidim/amendable/amendments_cell.rb +0 -2
- data/app/cells/decidim/amendable/announcement_cell.rb +10 -14
- data/app/cells/decidim/amendable/emendation_actions_cell.rb +0 -2
- data/app/cells/decidim/amendable/promote_button_card_cell.rb +0 -2
- data/app/cells/decidim/amendable/wizard_step_form_cell.rb +6 -19
- data/app/cells/decidim/announcement/show.erb +1 -1
- data/app/cells/decidim/announcement_cell.rb +6 -2
- data/app/cells/decidim/attachments_file_tab/show.erb +3 -0
- data/app/cells/decidim/attachments_file_tab_cell.rb +11 -0
- data/app/cells/decidim/attachments_link_tab/show.erb +12 -0
- data/app/cells/decidim/attachments_link_tab_cell.rb +21 -0
- data/app/cells/decidim/author/flag.erb +2 -2
- data/app/cells/decidim/author/show.erb +4 -5
- data/app/cells/decidim/author_cell.rb +0 -28
- data/app/cells/decidim/authorization_modal_cell.rb +0 -3
- data/app/cells/decidim/badge_cell.rb +0 -4
- data/app/cells/decidim/badges_cell.rb +0 -2
- data/app/cells/decidim/button_cell.rb +0 -3
- data/app/cells/decidim/card_cell.rb +1 -5
- data/app/cells/decidim/card_g/show.erb +1 -1
- data/app/cells/decidim/card_g_cell.rb +4 -7
- data/app/cells/decidim/card_l/image.erb +2 -2
- data/app/cells/decidim/card_l/space.erb +1 -1
- data/app/cells/decidim/card_l_cell.rb +3 -8
- data/app/cells/decidim/card_metadata_cell.rb +1 -5
- data/app/cells/decidim/card_s/show.erb +3 -5
- data/app/cells/decidim/card_s_cell.rb +1 -4
- data/app/cells/decidim/coauthorships_cell.rb +0 -2
- data/app/cells/decidim/comments_button_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/footer_sub_hero/show.erb +1 -1
- data/app/cells/decidim/content_blocks/footer_sub_hero_cell.rb +0 -3
- data/app/cells/decidim/content_blocks/hero/show.erb +1 -1
- data/app/cells/decidim/content_blocks/hero_cell.rb +1 -2
- data/app/cells/decidim/content_blocks/highlighted_content_banner/show.erb +1 -1
- data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/how_to_participate/show.erb +1 -1
- data/app/cells/decidim/content_blocks/how_to_participate_cell.rb +0 -1
- data/app/cells/decidim/content_blocks/participatory_space_documents/content.erb +1 -1
- data/app/cells/decidim/content_blocks/participatory_space_documents_cell.rb +17 -1
- data/app/cells/decidim/content_blocks/participatory_space_hero_cell.rb +2 -4
- data/app/cells/decidim/content_blocks/participatory_space_last_activity_cell.rb +1 -3
- data/app/cells/decidim/content_blocks/stats/show.erb +1 -1
- data/app/cells/decidim/content_blocks/stats_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/sub_hero_cell.rb +0 -3
- data/app/cells/decidim/date_range/show.erb +10 -10
- data/app/cells/decidim/date_range_cell.rb +0 -2
- data/app/cells/decidim/diff_cell.rb +0 -5
- data/app/cells/decidim/documents_panel/show.erb +4 -0
- data/app/cells/decidim/documents_panel_cell.rb +9 -1
- data/app/cells/decidim/endorsement_buttons_cell.rb +6 -14
- data/app/cells/decidim/flag_modal/flag_user.erb +3 -3
- data/app/cells/decidim/followers_cell.rb +0 -1
- data/app/cells/decidim/following_cell.rb +0 -1
- data/app/cells/decidim/footer_topics/show.erb +8 -0
- data/app/cells/decidim/footer_topics_cell.rb +39 -0
- data/app/cells/decidim/groups_cell.rb +0 -3
- data/app/cells/decidim/linked_resources_for_cell.rb +0 -3
- data/app/cells/decidim/members_cell.rb +0 -1
- data/app/cells/decidim/nav_links/show.erb +3 -3
- data/app/cells/decidim/navbar_admin_link_cell.rb +0 -2
- data/app/cells/decidim/newsletter_templates/base_cell.rb +0 -1
- data/app/cells/decidim/newsletter_templates/basic_only_text/show.erb +2 -2
- data/app/cells/decidim/newsletter_templates/image_text_cta/show.erb +2 -2
- data/app/cells/decidim/newsletter_templates/image_text_cta_cell.rb +1 -1
- data/app/cells/decidim/notification/show.erb +5 -0
- data/app/cells/decidim/notification_actions/base_cell.rb +13 -0
- data/app/cells/decidim/notification_actions/buttons/show.erb +5 -0
- data/app/cells/decidim/notification_actions/buttons_cell.rb +41 -0
- data/app/cells/decidim/notification_cell.rb +9 -3
- data/app/cells/decidim/notifications_cell.rb +0 -1
- data/app/cells/decidim/pad_iframe/show.erb +2 -2
- data/app/cells/decidim/pad_iframe_cell.rb +0 -1
- data/app/cells/decidim/participatory_space_dropdown_metadata_cell.rb +1 -2
- data/app/cells/decidim/photo_cell.rb +1 -5
- data/app/cells/decidim/photos_list_cell.rb +0 -2
- data/app/cells/decidim/profile_cell.rb +0 -2
- data/app/cells/decidim/profile_sidebar/show.erb +20 -20
- data/app/cells/decidim/profile_sidebar_cell.rb +1 -10
- data/app/cells/decidim/progress_bar/show.erb +8 -6
- data/app/cells/decidim/public_participation/show.erb +1 -1
- data/app/cells/decidim/report_button/flag_modal.erb +1 -1
- data/app/cells/decidim/resource_types_filter/show.erb +12 -11
- data/app/cells/decidim/resource_types_filter_cell.rb +0 -2
- data/app/cells/decidim/scopes_picker/show.erb +1 -1
- data/app/cells/decidim/scopes_picker_cell.rb +0 -1
- data/app/cells/decidim/search_results_cell.rb +1 -1
- data/app/cells/decidim/statistic_cell.rb +0 -2
- data/app/cells/decidim/tab_panels/show.erb +1 -1
- data/app/cells/decidim/tab_panels_cell.rb +12 -2
- data/app/cells/decidim/tags_cell.rb +0 -2
- data/app/cells/decidim/tos_page_cell.rb +0 -3
- data/app/cells/decidim/translation_bar/show.erb +2 -2
- data/app/cells/decidim/translation_bar_cell.rb +1 -3
- data/app/cells/decidim/upload_modal/files.erb +1 -1
- data/app/cells/decidim/upload_modal_cell.rb +1 -3
- data/app/cells/decidim/user_conversation/new.erb +1 -1
- data/app/cells/decidim/user_conversation/show.erb +1 -1
- data/app/cells/decidim/user_conversation_cell.rb +0 -1
- data/app/cells/decidim/user_conversations/show.erb +1 -1
- data/app/cells/decidim/user_conversations_cell.rb +0 -1
- data/app/cells/decidim/user_group_pending_invitations_list_cell.rb +0 -1
- data/app/cells/decidim/user_group_pending_requests_list_cell.rb +0 -1
- data/app/cells/decidim/user_timeline/show.erb +1 -1
- data/app/cells/decidim/version_cell.rb +3 -5
- data/app/cells/decidim/versions_list_cell.rb +1 -3
- data/app/cells/decidim/versions_list_item_cell.rb +2 -4
- data/app/cells/decidim/wizard_step_form/wizard_aside.erb +2 -2
- data/app/cells/decidim/wizard_step_form/wizard_header.erb +2 -3
- data/app/cells/decidim/wizard_step_form_cell.rb +0 -8
- data/app/commands/decidim/amendable/create_draft.rb +4 -4
- data/app/commands/decidim/amendable/promote.rb +3 -2
- data/app/commands/decidim/amendable/publish_draft.rb +3 -2
- data/app/commands/decidim/amendable/update_draft.rb +4 -3
- data/app/commands/decidim/amendable/withdraw.rb +1 -1
- data/app/commands/decidim/create_follow.rb +4 -4
- data/app/commands/decidim/create_omniauth_registration.rb +4 -10
- data/app/commands/decidim/create_report.rb +3 -3
- data/app/commands/decidim/create_user_report.rb +5 -5
- data/app/commands/decidim/delete_follow.rb +4 -4
- data/app/commands/decidim/demote_membership.rb +2 -2
- data/app/commands/decidim/destroy_account.rb +21 -22
- data/app/commands/decidim/endorse_resource.rb +1 -1
- data/app/commands/decidim/invite_user_to_group.rb +5 -4
- data/app/commands/decidim/update_account.rb +24 -22
- data/app/commands/decidim/update_notifications_settings.rb +13 -11
- data/app/commands/decidim/update_password.rb +7 -7
- data/app/commands/decidim/update_user_interests.rb +9 -7
- data/app/controllers/concerns/decidim/devise_authentication_methods.rb +1 -1
- data/app/controllers/concerns/decidim/devise_controllers.rb +2 -1
- data/app/controllers/concerns/decidim/filter_resource.rb +1 -1
- data/app/controllers/concerns/decidim/needs_rtl_direction.rb +23 -0
- data/app/controllers/concerns/decidim/paginable.rb +1 -1
- data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -23
- data/app/controllers/concerns/decidim/payload_info.rb +2 -1
- data/app/controllers/concerns/decidim/registers_permissions.rb +4 -4
- data/app/controllers/concerns/decidim/use_organization_time_zone.rb +1 -1
- data/app/controllers/concerns/decidim/withdrawable.rb +1 -1
- data/app/controllers/decidim/account_controller.rb +2 -2
- data/app/controllers/{concerns/decidim → decidim}/amendments_controller.rb +3 -16
- data/app/controllers/decidim/application_controller.rb +1 -1
- data/app/controllers/decidim/components/base_controller.rb +1 -1
- data/app/controllers/decidim/devise/invitations_controller.rb +1 -1
- data/app/controllers/decidim/devise/passwords_controller.rb +2 -2
- data/app/controllers/decidim/doorkeeper/credentials_controller.rb +1 -1
- data/app/controllers/decidim/endorsements_controller.rb +1 -1
- data/app/controllers/decidim/favicon_controller.rb +1 -1
- data/app/controllers/decidim/follows_controller.rb +2 -2
- data/app/controllers/decidim/group_invites_controller.rb +36 -9
- data/app/controllers/decidim/links_controller.rb +1 -1
- data/app/controllers/decidim/newsletters_opt_in_controller.rb +1 -1
- data/app/controllers/decidim/notifications_settings_controller.rb +1 -1
- data/app/controllers/decidim/profiles_controller.rb +0 -4
- data/app/controllers/decidim/report_users_controller.rb +1 -1
- data/app/controllers/decidim/reports_controller.rb +1 -1
- data/app/controllers/decidim/user_interests_controller.rb +1 -1
- data/app/events/decidim/change_nickname_event.rb +0 -1
- data/app/events/decidim/invited_to_group_event.rb +29 -0
- data/app/events/decidim/welcome_notification_event.rb +2 -4
- data/app/forms/decidim/form.rb +4 -0
- data/app/forms/decidim/omniauth_registration_form.rb +1 -1
- data/app/forms/decidim/upload_validation_form.rb +2 -2
- data/app/helpers/concerns/decidim/flash_helper_extensions.rb +1 -1
- data/app/helpers/decidim/amendments_helper.rb +4 -14
- data/app/helpers/decidim/application_helper.rb +8 -0
- data/app/helpers/decidim/authorization_form_helper.rb +2 -2
- data/app/helpers/decidim/breadcrumb_helper.rb +1 -1
- data/app/helpers/decidim/cells_helper.rb +1 -1
- data/app/helpers/decidim/check_boxes_tree_helper.rb +1 -1
- data/app/helpers/decidim/cta_button_helper.rb +1 -1
- data/app/helpers/decidim/datalist_select_helper.rb +1 -1
- data/app/helpers/decidim/decidim_form_helper.rb +3 -3
- data/app/helpers/decidim/filters_helper.rb +1 -1
- data/app/helpers/decidim/layout_helper.rb +1 -64
- data/app/helpers/decidim/localized_locales_helper.rb +1 -1
- data/app/helpers/decidim/map_helper.rb +1 -6
- data/app/helpers/decidim/menu_helper.rb +9 -1
- data/app/helpers/decidim/meta_tags_helper.rb +26 -23
- data/app/helpers/decidim/modal_helper.rb +1 -1
- data/app/helpers/decidim/orders_helper.rb +1 -1
- data/app/helpers/decidim/organization_helper.rb +55 -0
- data/app/helpers/decidim/paginate_helper.rb +5 -3
- data/app/helpers/decidim/resource_helper.rb +0 -7
- data/app/helpers/decidim/sanitize_helper.rb +2 -11
- data/app/helpers/decidim/scopes_helper.rb +3 -4
- data/app/helpers/decidim/searches_helper.rb +1 -1
- data/app/helpers/decidim/short_link_helper.rb +2 -2
- data/app/helpers/decidim/translations_helper.rb +2 -2
- data/app/helpers/decidim/twitter_search_helper.rb +1 -1
- data/app/helpers/decidim/user_profile_helper.rb +0 -1
- data/app/jobs/decidim/email_notifications_digest_generator_job.rb +2 -2
- data/app/mailers/decidim/application_mailer.rb +6 -2
- data/app/mailers/decidim/block_user_mailer.rb +1 -1
- data/app/mailers/decidim/decidim_devise_mailer.rb +7 -1
- data/app/mailers/decidim/newsletter_mailer.rb +1 -4
- data/app/mailers/decidim/newsletters_opt_in_mailer.rb +2 -2
- data/app/mailers/decidim/notification_mailer.rb +0 -1
- data/app/mailers/decidim/notifications_digest_mailer.rb +0 -1
- data/app/mailers/decidim/reported_mailer.rb +6 -3
- data/app/mailers/decidim/user_report_mailer.rb +1 -1
- data/app/models/decidim/action_log.rb +2 -12
- data/app/models/decidim/area_type.rb +1 -1
- data/app/models/decidim/attachment.rb +28 -4
- data/app/models/decidim/authorization.rb +1 -1
- data/app/models/decidim/authorization_transfer.rb +1 -0
- data/app/models/decidim/component.rb +3 -6
- data/app/models/decidim/content_block.rb +3 -3
- data/app/models/decidim/messaging/message.rb +2 -2
- data/app/models/decidim/newsletter.rb +9 -9
- data/app/models/decidim/notification.rb +2 -2
- data/app/models/decidim/organization.rb +23 -2
- data/app/models/decidim/push_notification_message.rb +1 -1
- data/app/models/decidim/resource_link.rb +1 -1
- data/app/models/decidim/user.rb +14 -14
- data/app/models/decidim/user_group.rb +2 -2
- data/app/packs/src/decidim/a11y.js +61 -11
- data/app/packs/src/decidim/append_redirect_url_to_modals.js +14 -24
- data/app/packs/src/decidim/attachments/file_or_link_tabs.js +55 -0
- data/app/packs/src/decidim/attachments/index.js +1 -0
- data/app/packs/src/decidim/back_to_list.js +1 -1
- data/app/packs/src/decidim/check_boxes_tree.js +1 -1
- data/app/packs/src/decidim/data_consent/consent_manager.js +1 -1
- data/app/packs/src/decidim/data_consent/consent_manager.test.js +6 -6
- data/app/packs/src/decidim/data_consent/index.js +1 -1
- data/app/packs/src/decidim/datepicker/datepicker_functions.js +243 -0
- data/app/packs/src/decidim/datepicker/datepicker_listeners.js +78 -0
- data/app/packs/src/decidim/datepicker/form_datepicker.js +91 -0
- data/app/packs/src/decidim/datepicker/generate_datepicker.js +148 -0
- data/app/packs/src/decidim/datepicker/generate_timepicker.js +298 -0
- data/app/packs/src/decidim/datepicker/test/date.test.js +118 -0
- data/app/packs/src/decidim/datepicker/test/time.test.js +227 -0
- data/app/packs/src/decidim/direct_uploads/upload_field.js +8 -21
- data/app/packs/src/decidim/direct_uploads/upload_modal.js +0 -3
- data/app/packs/src/decidim/editor/extensions/indent/index.js +1 -1
- data/app/packs/src/decidim/editor/extensions/video_embed/index.js +4 -4
- data/app/packs/src/decidim/editor/test/extensions/decidim_kit.test.js +0 -15
- data/app/packs/src/decidim/editor/test/extensions/indent.test.js +1 -1
- data/app/packs/src/decidim/editor/test/fixtures/upload_templates.js +1 -1
- data/app/packs/src/decidim/editor/test/helpers.js +1 -14
- data/app/packs/src/decidim/editor/utilities/paste_transform.js +2 -2
- data/app/packs/src/decidim/external_domain_warning.js +2 -2
- data/app/packs/src/decidim/external_domain_warning.test.js +4 -4
- data/app/packs/src/decidim/form_filter.js +4 -4
- data/app/packs/src/decidim/impersonation.js +1 -1
- data/app/packs/src/decidim/index.js +11 -8
- data/app/packs/src/decidim/input_character_counter.js +2 -2
- data/app/packs/src/decidim/input_emoji.js +171 -72
- data/app/packs/src/decidim/input_hashtags.js +1 -1
- data/app/packs/src/decidim/input_mentions.js +1 -1
- data/app/packs/src/decidim/notifications_actions.js +40 -0
- data/app/packs/src/decidim/sticky_header.js +87 -0
- data/app/packs/src/decidim/sw/sw.js +8 -6
- data/app/packs/src/decidim/toggle.js +1 -1
- data/app/packs/src/decidim/tooltips.js +23 -43
- data/app/packs/stylesheets/decidim/_buttons.scss +1 -1
- data/app/packs/stylesheets/decidim/_datepicker.scss +193 -0
- data/app/packs/stylesheets/decidim/_dropdown.scss +45 -9
- data/app/packs/stylesheets/decidim/_emoji.scss +36 -0
- data/app/packs/stylesheets/decidim/_filters.scss +4 -2
- data/app/packs/stylesheets/decidim/_flash.scss +2 -2
- data/app/packs/stylesheets/decidim/_footer.scss +1 -3
- data/app/packs/stylesheets/decidim/_forms.scss +13 -5
- data/app/packs/stylesheets/decidim/_header.scss +70 -50
- data/app/packs/stylesheets/decidim/_home.scss +1 -1
- data/app/packs/stylesheets/decidim/_layout.scss +13 -0
- data/app/packs/stylesheets/decidim/_modal.scss +1 -1
- data/app/packs/stylesheets/decidim/_modal_update.scss +1 -5
- data/app/packs/stylesheets/decidim/_notifications.scss +4 -0
- data/app/packs/stylesheets/decidim/_profile.scss +1 -1
- data/app/packs/stylesheets/decidim/_progress-bar.scss +1 -1
- data/app/packs/stylesheets/decidim/_tabs_x.scss +5 -1
- data/app/packs/stylesheets/decidim/_tooltip.scss +10 -10
- data/app/packs/stylesheets/decidim/application.scss +4 -0
- data/app/packs/stylesheets/decidim/editor.scss +1 -1
- data/app/packs/stylesheets/decidim/legacy/conference-diploma.scss +1 -2
- data/app/packs/stylesheets/decidim/legacy/leaflet.scss +1 -1
- data/app/packs/stylesheets/decidim/vendor/_datepicker_light.scss +228 -0
- data/app/permissions/decidim/default_permissions.rb +2 -2
- data/app/presenters/decidim/admin_log/organization_presenter.rb +1 -1
- data/app/presenters/decidim/admin_log/static_page_presenter.rb +1 -1
- data/app/presenters/decidim/attachment_presenter.rb +1 -1
- data/app/presenters/decidim/authorization_transfer_presenter.rb +1 -1
- data/app/presenters/decidim/component_attachment_collection_presenter.rb +81 -0
- data/app/presenters/decidim/footer_menu_presenter.rb +1 -1
- data/app/presenters/decidim/home_stats_presenter.rb +1 -1
- data/app/presenters/decidim/menu_item_presenter.rb +1 -1
- data/app/presenters/decidim/organization_presenter.rb +1 -1
- data/app/queries/decidim/last_activity.rb +5 -16
- data/app/queries/decidim/metric_measure.rb +1 -1
- data/app/queries/decidim/public_activities.rb +1 -1
- data/app/queries/decidim/user_groups/admin_memberships.rb +1 -1
- data/app/queries/decidim/user_groups/member_memberships.rb +1 -1
- data/app/services/decidim/action_logger.rb +3 -3
- data/app/services/decidim/base_diff_renderer.rb +2 -26
- data/app/services/decidim/download_your_data_exporter.rb +25 -36
- data/app/services/decidim/email_notification_generator.rb +5 -14
- data/app/services/decidim/log/diff_changeset_calculator.rb +2 -2
- data/app/services/decidim/notifications_digest_sending_decider.rb +1 -1
- data/app/services/decidim/open_data_exporter.rb +7 -8
- data/app/services/decidim/zip_stream/writer.rb +39 -0
- data/app/uploaders/decidim/organization_favicon_uploader.rb +1 -1
- data/app/uploaders/decidim/record_image_uploader.rb +2 -2
- data/app/validators/organization_present_validator.rb +1 -1
- data/app/validators/passthru_validator.rb +1 -1
- data/app/validators/uploader_image_dimensions_validator.rb +2 -2
- data/app/views/decidim/account/show.html.erb +1 -1
- data/app/views/decidim/amendments/_wizard_header.html.erb +1 -2
- data/app/views/decidim/application/_collection.html.erb +3 -1
- data/app/views/decidim/application/_component_documents.html.erb +4 -0
- data/app/views/decidim/application/_document.html.erb +23 -9
- data/app/views/decidim/block_user_mailer/notify.html.erb +2 -2
- data/app/views/decidim/devise/invitations/edit.html.erb +2 -2
- data/app/views/decidim/devise/omniauth_registrations/new.html.erb +2 -2
- data/app/views/decidim/devise/registrations/new.html.erb +1 -1
- data/app/views/decidim/devise/shared/_login_boxes.html.erb +1 -1
- data/app/views/decidim/doorkeeper/authorizations/new.html.erb +1 -1
- data/app/views/decidim/endorsements/_identity.html.erb +1 -1
- data/app/views/decidim/gamification/badges/index.html.erb +1 -1
- data/app/views/decidim/manifests/show.json.erb +4 -4
- data/app/views/decidim/messaging/conversations/_add_conversation_users.html.erb +2 -2
- data/app/views/decidim/messaging/conversations/_error_modal.html.erb +5 -5
- data/app/views/decidim/newsletter_mailer/newsletter.html.erb +1 -1
- data/app/views/decidim/newsletters/show.html.erb +1 -1
- data/app/views/decidim/newsletters_opt_in_mailer/notify.html.erb +2 -2
- data/app/views/decidim/offline/show.html.erb +1 -1
- data/app/views/decidim/pages/_tabbed.html.erb +5 -5
- data/app/views/decidim/pages/index.html.erb +1 -2
- data/app/views/decidim/reported_mailer/report.html.erb +4 -2
- data/app/views/decidim/scopes/picker.html.erb +5 -5
- data/app/views/decidim/searches/_resources_filter_block.html.erb +6 -6
- data/app/views/decidim/shared/_extended_navigation_bar.html.erb +8 -8
- data/app/views/decidim/shared/_filters.html.erb +5 -5
- data/app/views/decidim/shared/_login_modal.html.erb +1 -1
- data/app/views/decidim/shared/_orders.html.erb +2 -3
- data/app/views/decidim/shared/filters/_check_boxes_tree.html.erb +1 -1
- data/app/views/decidim/shared/filters/_collection.html.erb +1 -1
- data/app/views/decidim/user_interests/_areas.html.erb +2 -2
- data/app/views/decidim/user_report_mailer/notify.html.erb +2 -2
- data/app/views/decidim/user_update_mailer/notify.html.erb +1 -1
- data/app/views/decidim/widgets/_data_picker.html.erb +1 -1
- data/app/views/devise/mailer/invitation_instructions.html.erb +1 -1
- data/app/views/devise/mailer/invitation_instructions.text.erb +1 -1
- data/app/views/devise/mailer/invite_admin.html.erb +2 -2
- data/app/views/devise/mailer/invite_admin.text.erb +2 -2
- data/app/views/devise/mailer/invite_collaborator.html.erb +2 -2
- data/app/views/devise/mailer/invite_collaborator.text.erb +2 -2
- data/app/views/devise/mailer/invite_private_user.html.erb +2 -2
- data/app/views/devise/mailer/invite_private_user.text.erb +2 -2
- data/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb +1 -1
- data/app/views/devise/mailer/organization_admin_invitation_instructions.text.erb +1 -1
- data/app/views/layouts/decidim/_application.html.erb +3 -6
- data/app/views/layouts/decidim/_data_consent_warning.html.erb +2 -2
- data/app/views/layouts/decidim/_decidim_javascript.html.erb +1 -1
- data/app/views/layouts/decidim/_head.html.erb +1 -1
- data/app/views/layouts/decidim/_head_extra.html.erb +2 -2
- data/app/views/layouts/decidim/_impersonation_warning.html.erb +1 -1
- data/app/views/layouts/decidim/_js_configuration.html.erb +7 -2
- data/app/views/layouts/decidim/_logo.html.erb +2 -2
- data/app/views/layouts/decidim/_logo_mobile.html.erb +11 -0
- data/app/views/layouts/decidim/_mailer_logo.html.erb +2 -2
- data/app/views/layouts/decidim/_meta_tags_config.html.erb +1 -1
- data/app/views/layouts/decidim/_wrapper.html.erb +16 -9
- data/app/views/layouts/decidim/footer/_main.html.erb +2 -3
- data/app/views/layouts/decidim/footer/_main_intro.html.erb +2 -2
- data/app/views/layouts/decidim/footer/_main_legal.html.erb +2 -3
- data/app/views/layouts/decidim/footer/_main_links.html.erb +13 -11
- data/app/views/layouts/decidim/footer/_main_social_media_links.html.erb +8 -8
- data/app/views/layouts/decidim/header/_main.html.erb +9 -22
- data/app/views/layouts/decidim/header/_main_links_desktop.html.erb +4 -5
- data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +11 -4
- data/app/views/layouts/decidim/header/_main_links_mobile_item_account.html.erb +24 -0
- data/app/views/layouts/decidim/header/_main_links_mobile_search.html.erb +0 -21
- data/app/views/layouts/decidim/header/_main_menu_mobile.html.erb +12 -0
- data/app/views/layouts/decidim/header/_menu_breadcrumb_desktop.html.erb +1 -1
- data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_mobile.html.erb +17 -0
- data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_top_left.html.erb +1 -1
- data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +1 -1
- data/app/views/layouts/decidim/header/_menu_form_search_mobile.html.erb +16 -0
- data/app/views/layouts/decidim/header/_mobile_language_choose.html.erb +25 -0
- data/app/views/layouts/decidim/mailer.html.erb +2 -2
- data/app/views/layouts/decidim/shared/_layout_center.html.erb +1 -1
- data/app/views/layouts/decidim/shared/_layout_item.html.erb +0 -14
- data/app/views/layouts/decidim/shared/_layout_user_profile.html.erb +2 -2
- data/config/initializers/active_storage.rb +3 -0
- data/config/initializers/devise.rb +1 -1
- data/config/initializers/new_framework_defaults_7_0.rb +145 -0
- data/config/locales/ar.yml +3 -54
- data/config/locales/bg.yml +56 -57
- data/config/locales/ca.yml +78 -71
- data/config/locales/cs.yml +54 -63
- data/config/locales/de.yml +77 -70
- data/config/locales/el.yml +1 -32
- data/config/locales/en.yml +69 -62
- data/config/locales/es-MX.yml +69 -62
- data/config/locales/es-PY.yml +69 -62
- data/config/locales/es.yml +74 -67
- data/config/locales/eu.yml +251 -257
- data/config/locales/fi-plain.yml +70 -63
- data/config/locales/fi.yml +128 -121
- data/config/locales/fr-CA.yml +62 -61
- data/config/locales/fr.yml +56 -55
- data/config/locales/ga-IE.yml +0 -16
- data/config/locales/gl.yml +1 -22
- data/config/locales/hu.yml +38 -57
- data/config/locales/id-ID.yml +0 -18
- data/config/locales/is-IS.yml +1 -17
- data/config/locales/it.yml +0 -65
- data/config/locales/ja.yml +83 -74
- data/config/locales/lb.yml +0 -30
- data/config/locales/lt.yml +2 -49
- data/config/locales/lv.yml +0 -25
- data/config/locales/nl.yml +1 -30
- data/config/locales/no.yml +0 -30
- data/config/locales/pl.yml +69 -57
- data/config/locales/pt-BR.yml +5 -250
- data/config/locales/pt.yml +0 -36
- data/config/locales/ro-RO.yml +180 -329
- data/config/locales/ru.yml +0 -19
- data/config/locales/sk.yml +1 -26
- data/config/locales/sl.yml +0 -8
- data/config/locales/sv.yml +164 -605
- data/config/locales/tr-TR.yml +5 -33
- data/config/locales/uk.yml +1 -14
- data/config/locales/zh-CN.yml +0 -27
- data/config/locales/zh-TW.yml +1 -51
- data/config/routes.rb +0 -2
- data/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb +1 -1
- data/db/migrate/20181025082245_add_timestamps_to_components.rb +1 -5
- data/db/migrate/20240110150230_rename_external_domain_whitelist_to_external_domain_allowlist.rb +7 -0
- data/db/migrate/20240326104215_remove_show_in_footer_in_static_pages.rb +7 -0
- data/db/migrate/20240401192628_change_name_on_decidim_organizations.rb +31 -0
- data/db/seeds/avatars/001.jpg +0 -0
- data/db/seeds/avatars/002.jpg +0 -0
- data/db/seeds/avatars/003.jpg +0 -0
- data/db/seeds/avatars/004.jpg +0 -0
- data/db/seeds/avatars/005.jpg +0 -0
- data/db/seeds/avatars/006.jpg +0 -0
- data/db/seeds/avatars/007.jpg +0 -0
- data/db/seeds/avatars/008.jpg +0 -0
- data/db/seeds/avatars/009.jpg +0 -0
- data/db/seeds/avatars/010.jpg +0 -0
- data/db/seeds/avatars/011.jpg +0 -0
- data/db/seeds/avatars/012.jpg +0 -0
- data/db/seeds/avatars/013.jpg +0 -0
- data/db/seeds/avatars/014.jpg +0 -0
- data/db/seeds/avatars/015.jpg +0 -0
- data/db/seeds/avatars/016.jpg +0 -0
- data/db/seeds/avatars/017.jpg +0 -0
- data/db/seeds/avatars/018.jpg +0 -0
- data/db/seeds/avatars/019.jpg +0 -0
- data/db/seeds/avatars/020.jpg +0 -0
- data/db/seeds/avatars/021.jpg +0 -0
- data/db/seeds/avatars/022.jpg +0 -0
- data/db/seeds/avatars/023.jpg +0 -0
- data/db/seeds/avatars/024.jpg +0 -0
- data/db/seeds/avatars/025.jpg +0 -0
- data/db/seeds/avatars/026.jpg +0 -0
- data/db/seeds/avatars/027.jpg +0 -0
- data/db/seeds/avatars/028.jpg +0 -0
- data/db/seeds/avatars/029.jpg +0 -0
- data/db/seeds/avatars/030.jpg +0 -0
- data/db/seeds/avatars/031.jpg +0 -0
- data/db/seeds/avatars/032.jpg +0 -0
- data/db/seeds/avatars/033.jpg +0 -0
- data/db/seeds/avatars/034.jpg +0 -0
- data/db/seeds/avatars/035.jpg +0 -0
- data/db/seeds/avatars/036.jpg +0 -0
- data/db/seeds/avatars/037.jpg +0 -0
- data/db/seeds/avatars/038.jpg +0 -0
- data/db/seeds/avatars/039.jpg +0 -0
- data/db/seeds/avatars/040.jpg +0 -0
- data/db/seeds/avatars/041.jpg +0 -0
- data/db/seeds/avatars/042.jpg +0 -0
- data/db/seeds/avatars/043.jpg +0 -0
- data/db/seeds/avatars/044.jpg +0 -0
- data/db/seeds/avatars/045.jpg +0 -0
- data/db/seeds/avatars/046.jpg +0 -0
- data/db/seeds/avatars/047.jpg +0 -0
- data/db/seeds/avatars/048.jpg +0 -0
- data/db/seeds/avatars/049.jpg +0 -0
- data/db/seeds/avatars/050.jpg +0 -0
- data/db/seeds/avatars/051.jpg +0 -0
- data/db/seeds/avatars/052.jpg +0 -0
- data/db/seeds/avatars/053.jpg +0 -0
- data/db/seeds/avatars/054.jpg +0 -0
- data/db/seeds/avatars/055.jpg +0 -0
- data/db/seeds/avatars/056.jpg +0 -0
- data/db/seeds/avatars/057.jpg +0 -0
- data/db/seeds/avatars/058.jpg +0 -0
- data/db/seeds/avatars/059.jpg +0 -0
- data/db/seeds/avatars/060.jpg +0 -0
- data/db/seeds/avatars/061.jpg +0 -0
- data/db/seeds/avatars/062.jpg +0 -0
- data/db/seeds/avatars/063.jpg +0 -0
- data/db/seeds/avatars/064.jpg +0 -0
- data/db/seeds/avatars/065.jpg +0 -0
- data/db/seeds/avatars/066.jpg +0 -0
- data/db/seeds/avatars/067.jpg +0 -0
- data/db/seeds/avatars/068.jpg +0 -0
- data/db/seeds/avatars/069.jpg +0 -0
- data/db/seeds/avatars/070.jpg +0 -0
- data/db/seeds/avatars/071.jpg +0 -0
- data/db/seeds/avatars/072.jpg +0 -0
- data/db/seeds/avatars/073.jpg +0 -0
- data/db/seeds/avatars/074.jpg +0 -0
- data/db/seeds/avatars/075.jpg +0 -0
- data/db/seeds/avatars/076.jpg +0 -0
- data/db/seeds/avatars/077.jpg +0 -0
- data/db/seeds/avatars/078.jpg +0 -0
- data/db/seeds/avatars/079.jpg +0 -0
- data/db/seeds/avatars/080.jpg +0 -0
- data/db/seeds/avatars/081.jpg +0 -0
- data/db/seeds/avatars/082.jpg +0 -0
- data/db/seeds/avatars/083.jpg +0 -0
- data/db/seeds/avatars/084.jpg +0 -0
- data/db/seeds/avatars/085.jpg +0 -0
- data/db/seeds/avatars/086.jpg +0 -0
- data/db/seeds/avatars/087.jpg +0 -0
- data/db/seeds/avatars/088.jpg +0 -0
- data/db/seeds/avatars/089.jpg +0 -0
- data/db/seeds/avatars/090.jpg +0 -0
- data/db/seeds/avatars/091.jpg +0 -0
- data/db/seeds/avatars/092.jpg +0 -0
- data/db/seeds/avatars/093.jpg +0 -0
- data/db/seeds/avatars/094.jpg +0 -0
- data/db/seeds/avatars/095.jpg +0 -0
- data/db/seeds/avatars/096.jpg +0 -0
- data/db/seeds/avatars/097.jpg +0 -0
- data/db/seeds/avatars/098.jpg +0 -0
- data/db/seeds/avatars/099.jpg +0 -0
- data/db/seeds/avatars/100.jpg +0 -0
- data/db/seeds/avatars/CREDITS.md +114 -0
- data/db/seeds/avatars/README.md +25 -0
- data/decidim-core.gemspec +8 -9
- data/lib/decidim/acts_as_author.rb +1 -1
- data/lib/decidim/admin_filter.rb +44 -0
- data/lib/decidim/admin_filters_registry.rb +55 -0
- data/lib/decidim/amendable.rb +1 -2
- data/lib/decidim/api/functions/component_finder_base.rb +1 -1
- data/lib/decidim/api/functions/component_list.rb +1 -1
- data/lib/decidim/api/functions/needs_api_filter_and_order.rb +3 -3
- data/lib/decidim/api/functions/participatory_space_finder_base.rb +2 -12
- data/lib/decidim/api/functions/participatory_space_list_base.rb +1 -1
- data/lib/decidim/api/input_filters/user_entity_input_filter.rb +3 -3
- data/lib/decidim/api/interfaces/author_interface.rb +1 -1
- data/lib/decidim/api/interfaces/participatory_space_interface.rb +1 -1
- data/lib/decidim/api/types/component_type.rb +0 -7
- data/lib/decidim/api/types/organization_type.rb +1 -1
- data/lib/decidim/api/types/user_group_type.rb +1 -5
- data/lib/decidim/api/types/user_type.rb +1 -5
- data/lib/decidim/asset_router/pipeline.rb +2 -2
- data/lib/decidim/asset_router/storage.rb +11 -214
- data/lib/decidim/assets/tailwind/instance.rb +1 -1
- data/lib/decidim/assets/tailwind/tailwind.config.js.erb +8 -3
- data/lib/decidim/attribute_object/model.rb +2 -2
- data/lib/decidim/attribute_object/type_resolver.rb +1 -3
- data/lib/decidim/attribute_object.rb +2 -2
- data/lib/decidim/attributes/time_with_zone.rb +1 -11
- data/lib/decidim/attributes.rb +0 -6
- data/lib/decidim/authorable.rb +5 -0
- data/lib/decidim/command.rb +2 -2
- data/lib/decidim/commands/create_resource.rb +63 -0
- data/lib/decidim/commands/destroy_resource.rb +74 -0
- data/lib/decidim/commands/hook_error.rb +8 -0
- data/lib/decidim/commands/resource_handler.rb +85 -0
- data/lib/decidim/commands/update_resource.rb +64 -0
- data/lib/decidim/component_manifest.rb +3 -1
- data/lib/decidim/component_validator.rb +1 -1
- data/lib/decidim/content_blocks/has_related_components.rb +1 -1
- data/lib/decidim/content_parsers/resource_parser.rb +2 -2
- data/lib/decidim/content_parsers.rb +0 -1
- data/lib/decidim/content_processor.rb +1 -1
- data/lib/decidim/content_renderers.rb +0 -1
- data/lib/decidim/content_security_policy.rb +1 -1
- data/lib/decidim/core/engine.rb +13 -58
- data/lib/decidim/core/menu.rb +13 -3
- data/lib/decidim/core/seeds.rb +120 -147
- data/lib/decidim/core/test/factories.rb +24 -31
- data/lib/decidim/core/test/shared_examples/acts_as_author_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/amendable/withdraw_amendment_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/announcements_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/assembly_announcements_examples.rb +4 -4
- data/lib/decidim/core/test/shared_examples/attachable_interface_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/authorable_interface_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +90 -107
- data/lib/decidim/core/test/shared_examples/comments_reports_examples.rb +4 -4
- data/lib/decidim/core/test/shared_examples/digest_mail_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/edit_link_shared_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/editor_shared_examples.rb +7 -7
- data/lib/decidim/core/test/shared_examples/fingerprint_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/follows_examples.rb +6 -11
- data/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +4 -2
- data/lib/decidim/core/test/shared_examples/has_attachments.rb +3 -2
- data/lib/decidim/core/test/shared_examples/has_contextual_help.rb +4 -4
- data/lib/decidim/core/test/shared_examples/has_reference.rb +1 -1
- data/lib/decidim/core/test/shared_examples/logo_email.rb +1 -1
- data/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb +9 -9
- data/lib/decidim/core/test/shared_examples/map_examples.rb +5 -5
- data/lib/decidim/core/test/shared_examples/paginated_resource_examples.rb +7 -7
- data/lib/decidim/core/test/shared_examples/participatory_space_dropdown_metadata_cell_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/preview_component_with_share_token_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/process_announcements_examples.rb +4 -4
- data/lib/decidim/core/test/shared_examples/reports_examples.rb +5 -5
- data/lib/decidim/core/test/shared_examples/rich_text_editor_examples.rb +10 -10
- data/lib/decidim/core/test/shared_examples/searchable_participatory_space_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/searchable_results_examples.rb +8 -8
- data/lib/decidim/core/test/shared_examples/share_link_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/simple_event.rb +1 -1
- data/lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb +3 -3
- data/lib/decidim/core/test/shared_examples/system_endorse_resource_examples.rb +15 -113
- data/lib/decidim/core/test/shared_examples/translated_event_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/with_endorsable_permissions_examples.rb +1 -1
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/core.rb +24 -17
- data/lib/decidim/dependency_resolver.rb +3 -3
- data/lib/decidim/diffy_extension.rb +1 -19
- data/lib/decidim/download_your_data_serializers/download_your_data_user_serializer.rb +2 -1
- data/lib/decidim/engine_router.rb +2 -2
- data/lib/decidim/events/base_event.rb +19 -0
- data/lib/decidim/events/simple_event.rb +1 -0
- data/lib/decidim/exporters/export_manifest.rb +1 -1
- data/lib/decidim/faker/localized.rb +3 -3
- data/lib/decidim/form_builder.rb +5 -5
- data/lib/decidim/hashtag.rb +1 -1
- data/lib/decidim/jsonb_attributes.rb +4 -4
- data/lib/decidim/manifest_messages.rb +2 -2
- data/lib/decidim/map/autocomplete.rb +0 -1
- data/lib/decidim/organization_settings.rb +5 -8
- data/lib/decidim/paddable.rb +1 -1
- data/lib/decidim/participable.rb +1 -1
- data/lib/decidim/participatory_space_manifest.rb +1 -1
- data/lib/decidim/participatory_space_user.rb +0 -4
- data/lib/decidim/query_extensions.rb +26 -0
- data/lib/decidim/resourceable.rb +1 -1
- data/lib/decidim/search_resource_fields_mapper.rb +2 -2
- data/lib/decidim/searchable.rb +3 -3
- data/lib/decidim/seeds.rb +62 -0
- data/lib/decidim/settings_manifest.rb +0 -2
- data/lib/decidim/stats_registry.rb +2 -2
- data/lib/decidim/translatable_attributes.rb +4 -9
- data/lib/decidim/translatable_resource.rb +1 -1
- data/lib/decidim/view_hooks.rb +1 -1
- data/lib/decidim/view_model.rb +5 -1
- data/lib/decidim/webpacker/esbuild.config.js +14 -0
- data/lib/decidim/webpacker/shakapacker.yml +2 -2
- data/lib/decidim/webpacker/tsconfig.json +11 -0
- data/lib/decidim/webpacker/webpack/custom.js +13 -35
- data/lib/devise/models/decidim_newsletterable.rb +1 -1
- data/lib/tasks/decidim_download_your_data_tasks.rake +2 -2
- data/lib/tasks/decidim_locales_tasks.rake +1 -1
- data/lib/tasks/decidim_mailers_tasks.rake +2 -2
- data/lib/tasks/decidim_metrics_tasks.rake +6 -6
- data/lib/tasks/decidim_procfile.rake +9 -3
- data/lib/tasks/decidim_tasks.rake +5 -4
- data/lib/tasks/decidim_webpacker_tasks.rake +126 -117
- data/lib/tasks/upgrade/decidim_active_storage_migration_tasks.rake +80 -0
- data/lib/tasks/upgrade/decidim_content_blocks_tasks.rake +50 -0
- data/lib/tasks/upgrade/decidim_deduplicate_endorsements.rake +1 -1
- data/lib/tasks/upgrade/decidim_fix_categorization.rake +6 -132
- data/lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake +1 -1
- data/lib/tasks/upgrade/decidim_fix_short_url_resolver.rake +1 -1
- data/lib/tasks/upgrade/decidim_moderation_tasks.rake +1 -1
- data/lib/tasks/upgrade/decidim_user_moderation.rake +1 -1
- metadata +219 -101
- data/app/cells/decidim/content_blocks/cta/show.erb +0 -12
- data/app/cells/decidim/content_blocks/cta_cell.rb +0 -31
- data/app/cells/decidim/footer_pages/pages.erb +0 -3
- data/app/cells/decidim/footer_pages/topics.erb +0 -12
- data/app/cells/decidim/footer_pages_cell.rb +0 -68
- data/app/controllers/concerns/decidim/direct_upload.rb +0 -82
- data/app/helpers/concerns/decidim/user_role_checker.rb +0 -46
- data/app/packs/src/decidim/remote_tooltips.js +0 -38
- data/app/packs/src/decidim/vendor/modernizr.js +0 -5
- data/app/queries/decidim/similar_emendations.rb +0 -56
- data/app/uploaders/decidim/cw/application_uploader.rb +0 -77
- data/app/uploaders/decidim/cw/attachment_uploader.rb +0 -56
- data/app/uploaders/decidim/cw/avatar_uploader.rb +0 -24
- data/app/uploaders/decidim/cw/banner_image_uploader.rb +0 -7
- data/app/uploaders/decidim/cw/download_your_data_uploader.rb +0 -15
- data/app/uploaders/decidim/cw/downloader.rb +0 -9
- data/app/uploaders/decidim/cw/hero_image_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/homepage_image_uploader.rb +0 -14
- data/app/uploaders/decidim/cw/image_uploader.rb +0 -78
- data/app/uploaders/decidim/cw/newsletter_template_image_uploader.rb +0 -38
- data/app/uploaders/decidim/cw/oauth_application_logo_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/official_image_footer_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/official_image_header_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/open_data_uploader.rb +0 -23
- data/app/uploaders/decidim/cw/organization_favicon_uploader.rb +0 -18
- data/app/uploaders/decidim/cw/organization_logo_uploader.rb +0 -10
- data/app/uploaders/decidim/cw/record_image_uploader.rb +0 -15
- data/app/uploaders/decidim/downloader.rb +0 -9
- data/app/views/decidim/amendments/compare_draft.html.erb +0 -18
- data/app/views/layouts/decidim/_edit_link.html.erb +0 -0
- data/app/views/layouts/decidim/header/_main_links_mobile.html.erb +0 -36
- data/config/initializers/carrierwave.rb +0 -15
- data/config/locales/bn-BD.yml +0 -1
- data/config/locales/bs-BA.yml +0 -98
- data/lib/decidim/attributes/rich_text.rb +0 -38
- data/lib/decidim/carrier_wave_migrator_service.rb +0 -287
- data/lib/decidim/content_parsers/blob_parser.rb +0 -93
- data/lib/decidim/content_renderers/blob_renderer.rb +0 -90
- data/lib/decidim/seven_zip_wrapper.rb +0 -29
- data/lib/tasks/decidim_active_storage_migration_tasks.rake +0 -114
- data/lib/tasks/decidim_content_blocks_tasks.rake +0 -48
- data/lib/tasks/upgrade/decidim_attachments.rake +0 -14
- /data/app/views/layouts/decidim/header/{_menu_breadcrumb_main_dropdown.html.erb → _menu_breadcrumb_main_dropdown_desktop.html.erb} +0 -0
@@ -5,27 +5,27 @@ require "spec_helper"
|
|
5
5
|
shared_context "with resources to be endorsed or not" do
|
6
6
|
include_context "with a component"
|
7
7
|
|
8
|
-
# Should be
|
8
|
+
# Should be overridden and create one main resource
|
9
9
|
let!(:resource) { nil }
|
10
10
|
# the name of the resource to be clicked from the component view
|
11
11
|
let(:resource_name) { nil }
|
12
|
-
# Should be
|
12
|
+
# Should be overridden and create 3 extra resources in the current component
|
13
13
|
let!(:resources) { nil }
|
14
14
|
end
|
15
15
|
|
16
16
|
shared_examples "Endorse resource system specs" do
|
17
17
|
def expect_page_not_to_include_endorsements
|
18
|
-
expect(page).
|
19
|
-
expect(page).
|
18
|
+
expect(page).to have_no_button("Like")
|
19
|
+
expect(page).to have_no_css("#resource-#{resource.id}-endorsements-count")
|
20
20
|
end
|
21
21
|
|
22
22
|
def visit_resource
|
23
23
|
visit_component
|
24
|
-
|
24
|
+
click_on resource_name
|
25
25
|
end
|
26
26
|
|
27
27
|
context "when endorsements are not enabled" do
|
28
|
-
let(:component_traits) { [:with_endorsements_disabled] }
|
28
|
+
let(:component_traits) { [:with_votes_enabled, :with_endorsements_disabled] }
|
29
29
|
|
30
30
|
context "when the user is not logged in" do
|
31
31
|
it "does not show the endorse resource button and counts" do
|
@@ -51,17 +51,17 @@ shared_examples "Endorse resource system specs" do
|
|
51
51
|
|
52
52
|
it "shows the endorsements count and the endorse button is disabled" do
|
53
53
|
visit_resource
|
54
|
-
expect(page).to have_css("
|
54
|
+
expect(page).to have_css("[data-buttons] button[disabled='true']")
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
58
|
context "when endorsements are enabled" do
|
59
|
-
let(:component_traits) { [:with_endorsements_enabled] }
|
59
|
+
let(:component_traits) { [:with_votes_enabled, :with_endorsements_enabled] }
|
60
60
|
|
61
61
|
context "when the user is not logged in" do
|
62
62
|
it "is given the option to sign in" do
|
63
63
|
visit_resource
|
64
|
-
within "
|
64
|
+
within "[data-buttons]", match: :first do
|
65
65
|
click_on "Like"
|
66
66
|
end
|
67
67
|
|
@@ -77,7 +77,7 @@ shared_examples "Endorse resource system specs" do
|
|
77
77
|
context "when the resource is not endorsed yet" do
|
78
78
|
it "is able to endorse the resource" do
|
79
79
|
visit_resource
|
80
|
-
within "
|
80
|
+
within "[data-buttons]" do
|
81
81
|
click_on "Like"
|
82
82
|
expect(page).to have_button("Dislike")
|
83
83
|
end
|
@@ -89,15 +89,15 @@ shared_examples "Endorse resource system specs" do
|
|
89
89
|
|
90
90
|
it "is not able to endorse it again" do
|
91
91
|
visit_resource
|
92
|
-
within "
|
92
|
+
within "[data-buttons]" do
|
93
93
|
expect(page).to have_button("Dislike")
|
94
|
-
expect(page).
|
94
|
+
expect(page).to have_no_button("Like")
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
98
|
it "is able to undo the endorsement" do
|
99
99
|
visit_resource
|
100
|
-
within "
|
100
|
+
within "[data-buttons]" do
|
101
101
|
click_on "Dislike"
|
102
102
|
expect(page).to have_button("Like")
|
103
103
|
end
|
@@ -124,7 +124,7 @@ shared_examples "Endorse resource system specs" do
|
|
124
124
|
context "when user is NOT verified" do
|
125
125
|
it "is NOT able to endorse" do
|
126
126
|
visit_resource
|
127
|
-
within "
|
127
|
+
within "[data-buttons]", match: :first do
|
128
128
|
click_on "Like"
|
129
129
|
end
|
130
130
|
expect(page).to have_css("#authorizationModal", visible: :visible)
|
@@ -142,111 +142,13 @@ shared_examples "Endorse resource system specs" do
|
|
142
142
|
|
143
143
|
it "IS able to endorse", :slow do
|
144
144
|
visit_resource
|
145
|
-
within "
|
145
|
+
within "[data-buttons]", match: :first do
|
146
146
|
click_on "Like"
|
147
147
|
end
|
148
148
|
expect(page).to have_button("Dislike")
|
149
149
|
end
|
150
150
|
end
|
151
151
|
end
|
152
|
-
|
153
|
-
context "when user being a part of a group" do
|
154
|
-
let(:component_traits) { [:with_endorsements_enabled] }
|
155
|
-
let!(:user_group) do
|
156
|
-
create(
|
157
|
-
:user_group,
|
158
|
-
:verified,
|
159
|
-
name: "Tester's Organization",
|
160
|
-
nickname: "test_org",
|
161
|
-
email: "t.mail.org@example.org",
|
162
|
-
users: [user],
|
163
|
-
organization:
|
164
|
-
)
|
165
|
-
end
|
166
|
-
|
167
|
-
before do
|
168
|
-
organization.update(user_groups_enabled:)
|
169
|
-
login_as user, scope: :user
|
170
|
-
visit_resource
|
171
|
-
end
|
172
|
-
|
173
|
-
context "when organization is not allowing user groups" do
|
174
|
-
let(:user_groups_enabled) { false }
|
175
|
-
|
176
|
-
it "is able to endorse the resource" do
|
177
|
-
within "#resource-#{resource.id}-endorsement-block" do
|
178
|
-
click_on "Like"
|
179
|
-
expect(page).to have_button("Dislike")
|
180
|
-
end
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
context "when organization allows user groups" do
|
185
|
-
let(:user_groups_enabled) { true }
|
186
|
-
|
187
|
-
it "opens a modal where you select identity as a user or a group" do
|
188
|
-
click_on "Like"
|
189
|
-
expect(page).to have_content("Select identity")
|
190
|
-
expect(page).to have_content("Tester's Organization")
|
191
|
-
expect(page).to have_content(user.name)
|
192
|
-
end
|
193
|
-
|
194
|
-
def add_likes
|
195
|
-
click_on "Like"
|
196
|
-
within "#user-identities" do
|
197
|
-
click_on "Tester's Organization"
|
198
|
-
click_on user.name
|
199
|
-
click_on "Done"
|
200
|
-
end
|
201
|
-
visit_resource
|
202
|
-
click_on "Dislike"
|
203
|
-
end
|
204
|
-
|
205
|
-
context "when both identities picked" do
|
206
|
-
it "likes the post as a group and a user" do
|
207
|
-
add_likes
|
208
|
-
|
209
|
-
within ".identities-modal__list" do
|
210
|
-
expect(page).to have_css(".is-selected", count: 2)
|
211
|
-
end
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
|
-
context "when like cancelled as a user" do
|
216
|
-
it "does not cancel group like" do
|
217
|
-
add_likes
|
218
|
-
find(".is-selected", match: :first).click
|
219
|
-
click_on "Done"
|
220
|
-
visit current_path
|
221
|
-
click_on "Like"
|
222
|
-
|
223
|
-
within ".identities-modal__list" do
|
224
|
-
expect(page).to have_css(".is-selected", count: 1)
|
225
|
-
within ".is-selected" do
|
226
|
-
expect(page).to have_content("Tester's Organization")
|
227
|
-
end
|
228
|
-
end
|
229
|
-
end
|
230
|
-
end
|
231
|
-
|
232
|
-
context "when like cancelled as a group" do
|
233
|
-
it "does not cancel user like" do
|
234
|
-
add_likes
|
235
|
-
page.all(".is-selected")[1].click
|
236
|
-
click_on "Done"
|
237
|
-
visit current_path
|
238
|
-
click_on "Dislike"
|
239
|
-
|
240
|
-
within ".identities-modal__list" do
|
241
|
-
expect(page).to have_css(".is-selected", count: 1)
|
242
|
-
within ".is-selected" do
|
243
|
-
expect(page).to have_text(user.name, exact: true)
|
244
|
-
end
|
245
|
-
end
|
246
|
-
end
|
247
|
-
end
|
248
|
-
end
|
249
|
-
end
|
250
152
|
end
|
251
153
|
end
|
252
154
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
shared_examples_for "a translated event" do
|
4
|
-
context "when it is not machine
|
4
|
+
context "when it is not machine translated" do
|
5
5
|
let(:organization) { create(:organization, enable_machine_translations: false, machine_translation_display_priority: "original") }
|
6
6
|
|
7
7
|
it "does not perform translation" do
|
@@ -25,7 +25,7 @@ shared_examples_for "a translated event" do
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
context "when is machine
|
28
|
+
context "when is machine translated" do
|
29
29
|
let(:user) { create :user, organization:, locale: "ca" }
|
30
30
|
|
31
31
|
around do |example|
|
@@ -14,8 +14,8 @@ shared_examples "an uncommentable component" do
|
|
14
14
|
|
15
15
|
visit_component
|
16
16
|
|
17
|
-
resources.each do |
|
18
|
-
expect(page).
|
17
|
+
resources.each do |resource|
|
18
|
+
expect(page).to have_no_link(resource_locator(resource).path)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require "spec_helper"
|
4
4
|
|
5
|
-
# users of this test should
|
5
|
+
# users of this test should declare the `subject` variable.
|
6
6
|
shared_examples "with endorsable permissions can perform actions related to endorsable" do
|
7
7
|
let(:action_subject) { :endorsement }
|
8
8
|
let(:resource) { create :dummy_resource, component: }
|
data/lib/decidim/core/version.rb
CHANGED
data/lib/decidim/core.rb
CHANGED
@@ -53,6 +53,8 @@ module Decidim
|
|
53
53
|
autoload :Menu, "decidim/menu"
|
54
54
|
autoload :MenuItem, "decidim/menu_item"
|
55
55
|
autoload :MenuRegistry, "decidim/menu_registry"
|
56
|
+
autoload :AdminFilter, "decidim/admin_filter"
|
57
|
+
autoload :AdminFiltersRegistry, "decidim/admin_filters_registry"
|
56
58
|
autoload :ManifestRegistry, "decidim/manifest_registry"
|
57
59
|
autoload :AssetRouter, "decidim/asset_router"
|
58
60
|
autoload :EngineRouter, "decidim/engine_router"
|
@@ -102,7 +104,6 @@ module Decidim
|
|
102
104
|
autoload :ShareableWithToken, "decidim/shareable_with_token"
|
103
105
|
autoload :RecordEncryptor, "decidim/record_encryptor"
|
104
106
|
autoload :AttachmentAttributes, "decidim/attachment_attributes"
|
105
|
-
autoload :CarrierWaveMigratorService, "decidim/carrier_wave_migrator_service"
|
106
107
|
autoload :ReminderRegistry, "decidim/reminder_registry"
|
107
108
|
autoload :ReminderManifest, "decidim/reminder_manifest"
|
108
109
|
autoload :ManifestMessages, "decidim/manifest_messages"
|
@@ -124,6 +125,14 @@ module Decidim
|
|
124
125
|
autoload :IconRegistry, "decidim/icon_registry"
|
125
126
|
autoload :HasConversations, "decidim/has_conversations"
|
126
127
|
|
128
|
+
module Commands
|
129
|
+
autoload :CreateResource, "decidim/commands/create_resource"
|
130
|
+
autoload :UpdateResource, "decidim/commands/update_resource"
|
131
|
+
autoload :DestroyResource, "decidim/commands/destroy_resource"
|
132
|
+
autoload :ResourceHandler, "decidim/commands/resource_handler"
|
133
|
+
autoload :HookError, "decidim/commands/hook_error"
|
134
|
+
end
|
135
|
+
|
127
136
|
include ActiveSupport::Configurable
|
128
137
|
# Loads seeds from all engines.
|
129
138
|
def self.seed!
|
@@ -171,7 +180,7 @@ module Decidim
|
|
171
180
|
|
172
181
|
def self.seed_gamification_badges!
|
173
182
|
Gamification.badges.each do |badge|
|
174
|
-
puts "Setting random values for the \"#{badge.name}\" badge..."
|
183
|
+
puts "Setting random values for the \"#{badge.name}\" badge..." # rubocop:disable Rails/Output
|
175
184
|
User.all.find_each do |user|
|
176
185
|
Gamification::BadgeScore.find_or_create_by!(
|
177
186
|
user:,
|
@@ -305,7 +314,7 @@ module Decidim
|
|
305
314
|
end
|
306
315
|
end
|
307
316
|
|
308
|
-
# Exposes a configuration option: the
|
317
|
+
# Exposes a configuration option: the IPs that are allowed to access the system
|
309
318
|
config_accessor :system_accesslist_ips do
|
310
319
|
[]
|
311
320
|
end
|
@@ -432,7 +441,7 @@ module Decidim
|
|
432
441
|
";"
|
433
442
|
end
|
434
443
|
|
435
|
-
# Exposes a configuration option:
|
444
|
+
# Exposes a configuration option: HTTP_X_FORWARDED_HOST header follow-up.
|
436
445
|
# If a caching system is in place, it can also allow cache and log poisoning attacks,
|
437
446
|
# allowing attackers to control the contents of caches and logs that could be used for other attacks.
|
438
447
|
config_accessor :follow_http_x_forwarded_host do
|
@@ -542,17 +551,6 @@ module Decidim
|
|
542
551
|
"/"
|
543
552
|
end
|
544
553
|
|
545
|
-
# This is the maximum time that the cache will be stored. If nil, the cache will be stored indefinitely.
|
546
|
-
# Currently, cache is applied in the Cells where the method `cache_hash` is defined.
|
547
|
-
config_accessor :cache_expiry_time do
|
548
|
-
24.hours
|
549
|
-
end
|
550
|
-
|
551
|
-
# Same as before, but specifically for cell displaying stats
|
552
|
-
config_accessor :stats_cache_expiry_time do
|
553
|
-
10.minutes
|
554
|
-
end
|
555
|
-
|
556
554
|
# Enable/Disable the service worker
|
557
555
|
config_accessor :service_worker_enabled do
|
558
556
|
Rails.env.exclude?("development")
|
@@ -563,6 +561,11 @@ module Decidim
|
|
563
561
|
%w(terms-of-service)
|
564
562
|
end
|
565
563
|
|
564
|
+
# The default max last activity users to be shown
|
565
|
+
config_accessor :default_max_last_activity_users do
|
566
|
+
6
|
567
|
+
end
|
568
|
+
|
566
569
|
# List of additional content security policies to be appended to the default ones
|
567
570
|
# This is useful for adding custom CSPs for external services like Here Maps, YouTube, etc.
|
568
571
|
# Read more: https://docs.decidim.org/en/develop/configure/initializer#_content_security_policy
|
@@ -768,6 +771,10 @@ module Decidim
|
|
768
771
|
@icons ||= Decidim::IconRegistry.new
|
769
772
|
end
|
770
773
|
|
774
|
+
def self.admin_filter(name, &)
|
775
|
+
AdminFiltersRegistry.register(name.to_sym, &)
|
776
|
+
end
|
777
|
+
|
771
778
|
# Public: Stores an instance of ViewHooks
|
772
779
|
def self.view_hooks
|
773
780
|
@view_hooks ||= ViewHooks.new
|
@@ -832,11 +839,11 @@ module Decidim
|
|
832
839
|
end
|
833
840
|
|
834
841
|
def self.register_assets_path(path)
|
835
|
-
Rails.autoloaders.main.ignore(path)
|
842
|
+
Rails.autoloaders.main.ignore(path)
|
836
843
|
end
|
837
844
|
|
838
845
|
# Checks if a particular decidim gem is installed and needed by this
|
839
|
-
# particular instance.
|
846
|
+
# particular instance. Preferably this happens through bundler by inspecting
|
840
847
|
# the Gemfile of the instance but when Decidim is used without bundler, this
|
841
848
|
# will check:
|
842
849
|
# 1. If the gem is globally available or not in the loaded specs, i.e. the
|
@@ -86,7 +86,7 @@ module Decidim
|
|
86
86
|
File.exist?(path)
|
87
87
|
end
|
88
88
|
|
89
|
-
# Checks if the module for the gem
|
89
|
+
# Checks if the module for the gem specification has been loaded through
|
90
90
|
# `require "decidim/foo"`.
|
91
91
|
#
|
92
92
|
# @param spec [Bundler::LazySpecification, Gem::Specification, String] The
|
@@ -179,8 +179,8 @@ module Decidim
|
|
179
179
|
# @yield [dependency] Yields each dependency to be processed to the
|
180
180
|
# provided block to check if that dependency needs to be processed or
|
181
181
|
# not.
|
182
|
-
# @
|
183
|
-
# @
|
182
|
+
# @yield param [Gem::Dependency] The runtime dependency being processed.
|
183
|
+
# @yield return [Boolean] A boolean indicating whether this dependency
|
184
184
|
# needs to be processed or not. True indicates it needs to be processed
|
185
185
|
# and false indicates processing is not needed.
|
186
186
|
# @return [Bundler::LazySpecification, nil] The specification for the gem
|
@@ -13,24 +13,6 @@ module Decidim
|
|
13
13
|
str = wrap_lines(@diff.map { |line| wrap_line(line) })
|
14
14
|
ActionView::Base.new(ActionView::LookupContext.new(nil), {}, nil).sanitize(str, tags: TAGS)
|
15
15
|
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def wrap_line(line)
|
20
|
-
cleaned = clean_line(line)
|
21
|
-
case line
|
22
|
-
when /^(---|\+\+\+|\\\\)/
|
23
|
-
" <li class=\"diff-comment\"><div>#{line.chomp}</div></li>"
|
24
|
-
when /^\+/
|
25
|
-
" <li class=\"ins\"><ins>#{cleaned}</ins></li>"
|
26
|
-
when /^-/
|
27
|
-
" <li class=\"del\"><del>#{cleaned}</del></li>"
|
28
|
-
when /^ /
|
29
|
-
" <li class=\"unchanged\"><div>#{cleaned}</div></li>"
|
30
|
-
when /^@@/
|
31
|
-
" <li class=\"diff-block-info\"><div>#{line.chomp}</div></li>"
|
32
|
-
end
|
33
|
-
end
|
34
16
|
end
|
35
17
|
|
36
18
|
# Adding a new method to Diffy::Format so we can pass the
|
@@ -41,7 +23,7 @@ module Decidim
|
|
41
23
|
end
|
42
24
|
end
|
43
25
|
|
44
|
-
# The private "split" method SplitDiff needs to be
|
26
|
+
# The private "split" method SplitDiff needs to be overridden to take into
|
45
27
|
# account the new :unescaped_html format, and the fact that the tags
|
46
28
|
# <ins> <del> are not there anymore
|
47
29
|
Diffy::SplitDiff.module_eval do
|
@@ -5,6 +5,7 @@ module Decidim
|
|
5
5
|
module DownloadYourDataSerializers
|
6
6
|
class DownloadYourDataUserSerializer < Decidim::Exporters::Serializer
|
7
7
|
include Decidim::ResourceHelper
|
8
|
+
include Decidim::TranslatableAttributes
|
8
9
|
|
9
10
|
# Public: Exports a hash with the serialized data for this user.
|
10
11
|
def serialize
|
@@ -16,7 +17,7 @@ module Decidim
|
|
16
17
|
locale: resource.locale,
|
17
18
|
organization: {
|
18
19
|
id: resource.organization.try(:id),
|
19
|
-
name: resource.organization.try(:name)
|
20
|
+
name: translated_attribute(resource.organization.try(:name))
|
20
21
|
},
|
21
22
|
newsletter_notifications_at: resource.newsletter_notifications_at,
|
22
23
|
notifications_sending_frequency: resource.notifications_sending_frequency,
|
@@ -42,12 +42,12 @@ module Decidim
|
|
42
42
|
route_helper?(method_name) || super
|
43
43
|
end
|
44
44
|
|
45
|
-
def method_missing(method_name, *
|
45
|
+
def method_missing(method_name, *)
|
46
46
|
return super unless route_helper?(method_name)
|
47
47
|
|
48
48
|
filter_slug_params!(method_name)
|
49
49
|
|
50
|
-
send(engine).send(method_name, *
|
50
|
+
send(engine).send(method_name, *)
|
51
51
|
end
|
52
52
|
|
53
53
|
private
|
@@ -77,6 +77,25 @@ module Decidim
|
|
77
77
|
|
78
78
|
def resource_text; end
|
79
79
|
|
80
|
+
# The cell that will be used to render the action or nil if not action needs to be rendered.
|
81
|
+
#
|
82
|
+
# @return [nil] - if no action needs to be rendered
|
83
|
+
# @return [String] - if String, it is the cell to be rendered. Make it return with "decidim/notification_actions/buttons"
|
84
|
+
# in your event implementation to render the buttons cell
|
85
|
+
def action_cell; end
|
86
|
+
|
87
|
+
# The data that will be passed to the action cell
|
88
|
+
#
|
89
|
+
# @return [nil] - If no data needs to be rendered
|
90
|
+
# @return [Array<Hash{Symbol => String}>] - For the buttons cell, it should be an array of hashes with the following keys:
|
91
|
+
# - url: the URL to which the button will point
|
92
|
+
# - label: the label of the button (optional if i18n_label is present)
|
93
|
+
# - i18n_label: the i18n key of the label (optional if label is present)
|
94
|
+
# - icon: the icon of the button (optional)
|
95
|
+
# - method: the HTTP method of the request (optional)
|
96
|
+
# - class: the class of the button (optional)
|
97
|
+
def action_data; end
|
98
|
+
|
80
99
|
def organization
|
81
100
|
resource.try(:organization)
|
82
101
|
end
|
@@ -32,7 +32,7 @@ module Decidim
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# Public: Sets the +collection block+ when a block is given, or returns
|
35
|
-
# the previously
|
35
|
+
# the previously set +collection block+ if no block is provided.
|
36
36
|
#
|
37
37
|
# The +collection block+ knows how to obtain the collection of elements
|
38
38
|
# to be serialized by the +Serializer+.
|
@@ -135,9 +135,9 @@ module Decidim
|
|
135
135
|
end.with_indifferent_access
|
136
136
|
end
|
137
137
|
|
138
|
-
#
|
138
|
+
# Wraps a text build by the block with some other text.
|
139
139
|
#
|
140
|
-
# before - The String text to inject at the
|
140
|
+
# before - The String text to inject at the beginning of each value.
|
141
141
|
# after - The String text to inject at the end of each value.
|
142
142
|
# block - A Block that generates a Hash with a text for each locale.
|
143
143
|
#
|
@@ -164,7 +164,7 @@ module Decidim
|
|
164
164
|
end
|
165
165
|
|
166
166
|
# Runs the given block for each of the available locales in Decidim,
|
167
|
-
#
|
167
|
+
# momentarily setting the locale to the current one.
|
168
168
|
#
|
169
169
|
# Returns a Hash with a value for each locale.
|
170
170
|
def self.localized
|
data/lib/decidim/form_builder.rb
CHANGED
@@ -122,7 +122,7 @@ module Decidim
|
|
122
122
|
def hashtaggable_text_field(type, name, locale, options = {})
|
123
123
|
options[:hashtaggable] = true if type.to_sym == :editor
|
124
124
|
|
125
|
-
content_tag(:div
|
125
|
+
content_tag(:div) do
|
126
126
|
if options[:value]
|
127
127
|
send(type, name_with_locale(name, locale), options.merge(label: options[:label], value: options[:value][locale]))
|
128
128
|
else
|
@@ -202,7 +202,7 @@ module Decidim
|
|
202
202
|
|
203
203
|
content_tag(
|
204
204
|
:div,
|
205
|
-
class: "editor
|
205
|
+
class: "editor",
|
206
206
|
id: "#{sanitize_for_dom_selector(@object_name)}_#{sanitize_for_dom_selector(name)}"
|
207
207
|
) do
|
208
208
|
template = ""
|
@@ -390,7 +390,7 @@ module Decidim
|
|
390
390
|
# options - A Hash with options to build the field. See upload method for
|
391
391
|
# more detailed information.
|
392
392
|
def attachment(attribute, options = {})
|
393
|
-
object_attachment = object.
|
393
|
+
object_attachment = object.attachment.present?
|
394
394
|
record = object_attachment ? object.attachment : object
|
395
395
|
options = {
|
396
396
|
titled: options[:multiple],
|
@@ -416,9 +416,9 @@ module Decidim
|
|
416
416
|
# options - A Hash with options to build the field.
|
417
417
|
# * max_file_size: Maximum size for the file (If you really want to change max
|
418
418
|
# file size you should probably change it in validator).
|
419
|
-
# *
|
419
|
+
# * resource_name: Name of the resource (e.g. user)
|
420
420
|
# * resource_class: Attribute's resource class (e.g. Decidim::User)
|
421
|
-
# *
|
421
|
+
# * resource_class: Class of the resource (e.g. user)
|
422
422
|
# * required: Whether the file is required or not (false by default).
|
423
423
|
# * titled: Whether the file can have title or not.
|
424
424
|
# * show_current: Whether the current file is displayed next to the button.
|
data/lib/decidim/hashtag.rb
CHANGED
@@ -4,7 +4,7 @@ require "active_support/concern"
|
|
4
4
|
|
5
5
|
module Decidim
|
6
6
|
# A set of convenient methods to generate dynamic jsonb objects in a way is
|
7
|
-
# compatible with
|
7
|
+
# compatible with AttributeObject and ActiveModel thus making it easy to
|
8
8
|
# integrate into Rails forms and similar workflows.
|
9
9
|
module JsonbAttributes
|
10
10
|
extend ActiveSupport::Concern
|
@@ -20,15 +20,15 @@ module Decidim
|
|
20
20
|
# jsonb_attribute(:settings, [[:custom_setting, String], [:another_setting, Boolean])
|
21
21
|
# # This will generate `custom_setting`, `custom_setting=` and
|
22
22
|
# # `another_setting`, `another_setting=` and will keep them
|
23
|
-
# #
|
23
|
+
# # synchronized with a hash in `settings`:
|
24
24
|
# # settings = { "custom_setting" => "demo", "another_setting" => "demo"}
|
25
25
|
#
|
26
26
|
# Returns nothing.
|
27
|
-
def jsonb_attribute(name, fields, *
|
27
|
+
def jsonb_attribute(name, fields, *)
|
28
28
|
attribute(name, { String => Object }, default: {})
|
29
29
|
|
30
30
|
fields.each do |f, type|
|
31
|
-
attribute
|
31
|
+
attribute(f, type, *)
|
32
32
|
define_method f do
|
33
33
|
field = public_send(name) || {}
|
34
34
|
field[f.to_s] || field[f.to_sym]
|
@@ -16,8 +16,8 @@ module Decidim
|
|
16
16
|
@store[key] = block
|
17
17
|
end
|
18
18
|
|
19
|
-
def render(key, context = nil, **
|
20
|
-
context.instance_exec(
|
19
|
+
def render(key, context = nil, **)
|
20
|
+
context.instance_exec(**, &@store[key]) if @store[key]
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -79,7 +79,7 @@ module Decidim
|
|
79
79
|
# Decidim.organization_settings(org).target_config_accessor
|
80
80
|
# #=> returns the organization specific setting
|
81
81
|
#
|
82
|
-
# Decidim.organization_settings(
|
82
|
+
# Decidim.organization_settings(model_belonging_to_org).target_config_accessor
|
83
83
|
# #=> returns the organization specific setting for model's organization
|
84
84
|
#
|
85
85
|
# Decidim.organization_settings(nil).target_config_accessor
|
@@ -104,9 +104,9 @@ module Decidim
|
|
104
104
|
{
|
105
105
|
"upload" => {
|
106
106
|
"allowed_file_extensions" => {
|
107
|
-
"default" => %w(jpg jpeg png pdf rtf txt),
|
108
|
-
"admin" => %w(jpg jpeg png pdf doc docx xls xlsx ppt pptx ppx rtf txt odt ott odf otg ods ots
|
109
|
-
"image" => %w(jpg jpeg png)
|
107
|
+
"default" => %w(jpg jpeg png webp pdf rtf txt),
|
108
|
+
"admin" => %w(jpg jpeg png webp pdf doc docx xls xlsx ppt pptx ppx rtf txt odt ott odf otg ods ots),
|
109
|
+
"image" => %w(jpg jpeg png webp)
|
110
110
|
},
|
111
111
|
"allowed_content_types" => {
|
112
112
|
"default" => %w(
|
@@ -125,10 +125,7 @@ module Decidim
|
|
125
125
|
application/vnd.oasis.opendocument
|
126
126
|
application/pdf
|
127
127
|
application/rtf
|
128
|
-
application/json
|
129
|
-
text/markdown
|
130
128
|
text/plain
|
131
|
-
text/csv
|
132
129
|
)
|
133
130
|
},
|
134
131
|
"maximum_file_size" => {
|
@@ -193,7 +190,7 @@ module Decidim
|
|
193
190
|
|
194
191
|
private
|
195
192
|
|
196
|
-
# Generates a final
|
193
|
+
# Generates a final settings configuration struct from the given settings
|
197
194
|
# hash. Combines the given defaults with the settings hash.
|
198
195
|
#
|
199
196
|
# @param hash [Hash] The configurations hash.
|