decidim-core 0.28.6 → 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/show.erb +3 -5
- 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 +6 -8
- 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_activity/show.erb +1 -1
- 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 +11 -23
- 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/search.rb +0 -14
- 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 +2 -6
- data/app/controllers/decidim/report_users_controller.rb +1 -1
- data/app/controllers/decidim/reports_controller.rb +2 -2
- data/app/controllers/decidim/user_activities_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/account_form.rb +2 -5
- 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 +2 -3
- data/app/helpers/decidim/organization_helper.rb +55 -0
- data/app/helpers/decidim/paginate_helper.rb +5 -3
- data/app/helpers/decidim/participatory_space_helpers.rb +1 -1
- 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 +18 -14
- data/app/models/decidim/user_base_entity.rb +0 -4
- 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 -10
- 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/map/provider/here.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/src/decidim/vendor/leaflet-tilelayer-here.js +212 -0
- 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 -68
- 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 -1
- 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/log/user_presenter.rb +0 -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 -28
- 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/static_map_generator.rb +1 -1
- 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/last_activities/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/hide.html.erb +1 -1
- data/app/views/decidim/reported_mailer/report.html.erb +5 -3
- data/app/views/decidim/scopes/picker.html.erb +5 -5
- data/app/views/decidim/searches/_count.html.erb +1 -1
- data/app/views/decidim/searches/_filters.html.erb +38 -40
- 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 +15 -97
- data/config/locales/bg.yml +58 -68
- data/config/locales/ca.yml +85 -121
- data/config/locales/cs.yml +63 -114
- data/config/locales/de.yml +79 -115
- data/config/locales/el.yml +3 -46
- data/config/locales/en.yml +62 -98
- data/config/locales/eo.yml +0 -2
- data/config/locales/es-MX.yml +76 -112
- data/config/locales/es-PY.yml +80 -116
- data/config/locales/es.yml +86 -122
- data/config/locales/eu.yml +310 -357
- data/config/locales/fi-plain.yml +73 -101
- data/config/locales/fi.yml +135 -163
- data/config/locales/fr-CA.yml +65 -107
- data/config/locales/fr.yml +58 -100
- data/config/locales/ga-IE.yml +0 -22
- data/config/locales/gl.yml +3 -51
- data/config/locales/hu.yml +43 -69
- data/config/locales/id-ID.yml +3 -46
- data/config/locales/is-IS.yml +2 -31
- data/config/locales/it.yml +12 -107
- data/config/locales/ja.yml +86 -122
- data/config/locales/lb.yml +7 -57
- data/config/locales/lt.yml +4 -57
- data/config/locales/lv.yml +2 -47
- data/config/locales/nl.yml +6 -57
- data/config/locales/no.yml +0 -50
- data/config/locales/pl.yml +67 -64
- data/config/locales/pt-BR.yml +8 -263
- data/config/locales/pt.yml +0 -56
- data/config/locales/ro-RO.yml +253 -561
- data/config/locales/ru.yml +1 -48
- data/config/locales/sk.yml +7 -60
- data/config/locales/sl.yml +0 -12
- data/config/locales/sr-CS.yml +0 -2
- data/config/locales/sv.yml +169 -629
- data/config/locales/tr-TR.yml +12 -59
- data/config/locales/uk.yml +2 -30
- data/config/locales/zh-CN.yml +2 -49
- data/config/locales/zh-TW.yml +1 -61
- 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 +2 -16
- 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/user_parser.rb +1 -1
- 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 +11 -53
- 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 -28
- data/lib/decidim/core/test/shared_examples/versions_controller_examples.rb +0 -26
- 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/map/provider/dynamic_map/here.rb +40 -1
- data/lib/decidim/map/provider/static_map/here.rb +0 -34
- data/lib/decidim/nicknamizable.rb +1 -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/reportable.rb +2 -6
- 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 -13
- data/lib/decidim/translatable_resource.rb +1 -1
- data/lib/decidim/view_hooks.rb +1 -1
- data/lib/decidim/view_model.rb +4 -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 +20 -23
- 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 +220 -103
- 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/packs/stylesheets/decidim/_hashtags.scss +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 -100
- data/config/locales/ca-IT.yml +0 -2115
- 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 -95
- 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
@@ -21,10 +21,7 @@ module Decidim
|
|
21
21
|
|
22
22
|
validates :name, presence: true, format: { with: Decidim::User::REGEXP_NAME }
|
23
23
|
validates :email, presence: true, "valid_email_2/email": { disposable: true }
|
24
|
-
validates :nickname,
|
25
|
-
presence: true,
|
26
|
-
format: { with: Decidim::User::REGEXP_NICKNAME, message: :format },
|
27
|
-
length: { maximum: Decidim::User.nickname_max_length }
|
24
|
+
validates :nickname, presence: true, format: { with: Decidim::User::REGEXP_NICKNAME }
|
28
25
|
|
29
26
|
validates :nickname, length: { maximum: Decidim::User.nickname_max_length, allow_blank: true }
|
30
27
|
validates :password, password: { name: :name, email: :email, username: :nickname }, if: -> { password.present? }
|
@@ -69,7 +66,7 @@ module Decidim
|
|
69
66
|
|
70
67
|
def unique_nickname
|
71
68
|
return true if Decidim::UserBaseEntity.where(
|
72
|
-
"decidim_organization_id = ? AND nickname = ? ",
|
69
|
+
"decidim_organization_id = ? AND LOWER(nickname) = ? ",
|
73
70
|
context.current_organization.id,
|
74
71
|
nickname.downcase
|
75
72
|
).where.not(id: context.current_user.id).empty?
|
data/app/forms/decidim/form.rb
CHANGED
@@ -11,5 +11,9 @@ module Decidim
|
|
11
11
|
to: :context, prefix: false, allow_nil: true
|
12
12
|
|
13
13
|
delegate :available_locales, to: :current_organization, allow_nil: true
|
14
|
+
|
15
|
+
alias organization current_organization
|
16
|
+
alias component current_component
|
17
|
+
alias participatory_space current_participatory_space
|
14
18
|
end
|
15
19
|
end
|
@@ -10,7 +10,7 @@ module Decidim
|
|
10
10
|
# Property is named as attribute in upload modal and passthru validator, but
|
11
11
|
# it cannot be named as attribute here.
|
12
12
|
attribute :property, String
|
13
|
-
attribute :blob,
|
13
|
+
attribute :blob, String
|
14
14
|
attribute :form_class, String
|
15
15
|
|
16
16
|
validates :resource_class, presence: true
|
@@ -73,7 +73,7 @@ module Decidim
|
|
73
73
|
# This class provides ability to interpret the attachment context based on
|
74
74
|
# the details available within the context of this class. Normally the
|
75
75
|
# attachment context would be defined by the record to which the attachment
|
76
|
-
# are added to, e.g. proposals (participant
|
76
|
+
# are added to, e.g. proposals (participant context) or participatory
|
77
77
|
# processes (admin context). Unfortunately this information is not available
|
78
78
|
# when the parameters are passed to the upload validation.
|
79
79
|
class AttachmentContextProxy
|
@@ -43,7 +43,7 @@ module Decidim
|
|
43
43
|
#
|
44
44
|
# @param value [String] - The flash message.
|
45
45
|
# @param alert_class [String] - The foundation class of the alert message.
|
46
|
-
# @param closable [Boolean] -
|
46
|
+
# @param closable [Boolean] - Whether the close icon is added.
|
47
47
|
#
|
48
48
|
# @return [String] the HTML with the alert box
|
49
49
|
def alert_box(value, alert_class, closable, opts = {})
|
@@ -5,7 +5,7 @@ module Decidim
|
|
5
5
|
module AmendmentsHelper
|
6
6
|
include RichTextEditorHelper
|
7
7
|
|
8
|
-
TOTAL_STEPS =
|
8
|
+
TOTAL_STEPS = 2
|
9
9
|
|
10
10
|
# Renders the state of an emendation
|
11
11
|
#
|
@@ -130,14 +130,10 @@ module Decidim
|
|
130
130
|
|
131
131
|
def current_step
|
132
132
|
@current_step ||= case params[:action].to_sym
|
133
|
-
when :new, :create
|
133
|
+
when :new, :create, :edit_draft, :update_draft, :destroy_draft
|
134
134
|
1
|
135
|
-
when :compare_draft
|
136
|
-
2
|
137
|
-
when :edit_draft, :update_draft, :destroy_draft
|
138
|
-
3
|
139
135
|
when :preview_draft, :publish_draft
|
140
|
-
|
136
|
+
2
|
141
137
|
end
|
142
138
|
end
|
143
139
|
|
@@ -147,10 +143,6 @@ module Decidim
|
|
147
143
|
when 1
|
148
144
|
:new
|
149
145
|
when 2
|
150
|
-
:compare_draft
|
151
|
-
when 3
|
152
|
-
:edit_draft
|
153
|
-
when 4
|
154
146
|
:preview_draft
|
155
147
|
end
|
156
148
|
|
@@ -162,9 +154,7 @@ module Decidim
|
|
162
154
|
case current_step
|
163
155
|
when 1
|
164
156
|
Decidim::ResourceLocatorPresenter.new(amendable).path
|
165
|
-
when
|
166
|
-
Decidim::Core::Engine.routes.url_helpers.compare_draft_amend_path(amendable.amendment)
|
167
|
-
when 4
|
157
|
+
when 2
|
168
158
|
Decidim::Core::Engine.routes.url_helpers.edit_draft_amend_path(amendable.amendment)
|
169
159
|
end
|
170
160
|
end
|
@@ -105,5 +105,13 @@ module Decidim
|
|
105
105
|
def prevent_timeout_seconds
|
106
106
|
0
|
107
107
|
end
|
108
|
+
|
109
|
+
def text_initials(name)
|
110
|
+
name.split(/[\s.]+/).map(&:chr).slice(0, 2).join.upcase
|
111
|
+
end
|
112
|
+
|
113
|
+
def add_body_classes(*class_names)
|
114
|
+
content_for :body_class, class_names.map { |class_name| " #{class_name.strip}" }.join
|
115
|
+
end
|
108
116
|
end
|
109
117
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
# A
|
4
|
+
# A helper to expose an easy way to add authorization forms in a view.
|
5
5
|
module AuthorizationFormHelper
|
6
6
|
# Creates a ew authorization form in a view, accepts the same arguments as
|
7
7
|
# `form_for`.
|
8
8
|
#
|
9
|
-
# record - The record to use in the form, it
|
9
|
+
# record - The record to use in the form, it should be a descendant of
|
10
10
|
# AuthorizationHandler.
|
11
11
|
# options - An optional hash with options to pass wo the form builder.
|
12
12
|
# block - A block with the content of the form.
|
@@ -22,7 +22,7 @@ module Decidim
|
|
22
22
|
# HasBreadcrumbItems concern with the add_breadcrumb_item_from_menu
|
23
23
|
# method. The list contains the identifier of a menu to insert its items
|
24
24
|
# in the breadcrumb displaying the active element.
|
25
|
-
# * controller_breadcrumb_items: A list of additional
|
25
|
+
# * controller_breadcrumb_items: A list of additional breadcrumb items
|
26
26
|
# which is expected to receive its elements from controllers and contains
|
27
27
|
# the last items of the breadcrumb.
|
28
28
|
def breadcrumb_items(context = :public)
|
@@ -92,7 +92,7 @@ module Decidim
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def filter_global_scopes_values
|
95
|
-
filter_scopes_values_from(current_organization.scopes.top_level
|
95
|
+
filter_scopes_values_from(current_organization.scopes.top_level)
|
96
96
|
end
|
97
97
|
|
98
98
|
def filter_areas_values
|
@@ -16,7 +16,7 @@ module Decidim
|
|
16
16
|
# Finds the CTA button path to reuse it in other places.
|
17
17
|
def cta_button_path
|
18
18
|
if current_organization.cta_button_path.present?
|
19
|
-
|
19
|
+
current_organization.cta_button_path
|
20
20
|
elsif Decidim::ParticipatoryProcess.where(organization: current_organization).published.any?
|
21
21
|
decidim_participatory_processes.participatory_processes_path
|
22
22
|
elsif current_user
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Decidim
|
4
4
|
# Helper that provides a single method to create datalist select.
|
5
5
|
module DatalistSelectHelper
|
6
|
-
# Public: Creates HTML for datalist select so that you can use
|
6
|
+
# Public: Creates HTML for datalist select so that you can use separate ids and labels.
|
7
7
|
#
|
8
8
|
# items - Items in datalist, item should have id and name.
|
9
9
|
# options - a Hash with options
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
# A
|
4
|
+
# A helper to expose an easy way to add authorization forms in a view.
|
5
5
|
module DecidimFormHelper
|
6
6
|
# A custom form for that injects client side validations with Abide.
|
7
7
|
#
|
@@ -12,7 +12,7 @@ module Decidim
|
|
12
12
|
# Returns a String.
|
13
13
|
def decidim_form_for(record, options = {}, &)
|
14
14
|
options[:data] ||= {}
|
15
|
-
options[:data].update(abide
|
15
|
+
options[:data].update(:abide => true, "live-validate" => true, "validate-on-blur" => true)
|
16
16
|
|
17
17
|
options[:html] ||= {}
|
18
18
|
options[:html].update(novalidate: true) unless options[:html].has_key?(:novalidate)
|
@@ -25,7 +25,7 @@ module Decidim
|
|
25
25
|
if record.is_a?(ActiveRecord::Base)
|
26
26
|
object = record.is_a?(Array) ? record.last : record
|
27
27
|
format = options[:format]
|
28
|
-
apply_form_for_options!(
|
28
|
+
apply_form_for_options!(object, options) if object
|
29
29
|
options[:format] = format if format
|
30
30
|
end
|
31
31
|
|
@@ -34,7 +34,7 @@ module Decidim
|
|
34
34
|
|
35
35
|
private
|
36
36
|
|
37
|
-
# Creates a unique namespace for a filter form to prevent
|
37
|
+
# Creates a unique namespace for a filter form to prevent duplicate IDs in
|
38
38
|
# the DOM when multiple filter forms are rendered with the same fields (e.g.
|
39
39
|
# for desktop and mobile).
|
40
40
|
def filter_form_namespace
|
@@ -3,6 +3,7 @@
|
|
3
3
|
module Decidim
|
4
4
|
# View helpers related to the layout.
|
5
5
|
module LayoutHelper
|
6
|
+
include Decidim::OrganizationHelper
|
6
7
|
include Decidim::ModalHelper
|
7
8
|
include Decidim::TooltipHelper
|
8
9
|
|
@@ -129,28 +130,6 @@ module Decidim
|
|
129
130
|
}
|
130
131
|
end
|
131
132
|
|
132
|
-
# Renders a view with the customizable CSS variables in two flavours:
|
133
|
-
# 1. as a hexadecimal valid CSS color (ie: #ff0000)
|
134
|
-
# 2. as a disassembled RGB components (ie: 255 0 0)
|
135
|
-
#
|
136
|
-
# Example:
|
137
|
-
#
|
138
|
-
# --primary: #ff0000;
|
139
|
-
# --primary-rgb: 255 0 0
|
140
|
-
#
|
141
|
-
# Hexadecimal variables can be used as a normal CSS color:
|
142
|
-
#
|
143
|
-
# color: var(--primary)
|
144
|
-
#
|
145
|
-
# While the disassembled variant can be used where you need to manipulate
|
146
|
-
# the color somehow (ie: adding a background transparency):
|
147
|
-
#
|
148
|
-
# background-color: rgba(var(--primary-rgb), 0.5)
|
149
|
-
def organization_colors
|
150
|
-
css = current_organization.colors.each.map { |k, v| "--#{k}: #{v};--#{k}-rgb: #{v[1..2].hex} #{v[3..4].hex} #{v[5..6].hex};" }.join
|
151
|
-
render partial: "layouts/decidim/organization_colors", locals: { css: }
|
152
|
-
end
|
153
|
-
|
154
133
|
def current_user_unread_data
|
155
134
|
return {} if current_user.blank?
|
156
135
|
|
@@ -161,50 +140,8 @@ module Decidim
|
|
161
140
|
end
|
162
141
|
end
|
163
142
|
|
164
|
-
def organization_description_label
|
165
|
-
@organization_description_label ||= if empty_organization_description?
|
166
|
-
t("decidim.pages.home.footer_sub_hero.footer_sub_hero_body_html")
|
167
|
-
else
|
168
|
-
decidim_sanitize_admin(translated_attribute(current_organization.description))
|
169
|
-
end
|
170
|
-
end
|
171
|
-
|
172
|
-
def current_url(params = request.parameters)
|
173
|
-
return url_for(params) if respond_to?(:current_participatory_space) || respond_to?(:current_component)
|
174
|
-
|
175
|
-
each_decidim_engine do |helpers|
|
176
|
-
return helpers.url_for(params)
|
177
|
-
rescue ActionController::UrlGenerationError
|
178
|
-
# Continue to next engine in case the URL is not available.
|
179
|
-
end
|
180
|
-
|
181
|
-
main_app.url_for(params)
|
182
|
-
rescue ActionController::UrlGenerationError
|
183
|
-
"#{request.base_url}#{"?#{params.to_query}" unless params.empty?}"
|
184
|
-
end
|
185
|
-
|
186
143
|
private
|
187
144
|
|
188
|
-
def empty_organization_description?
|
189
|
-
organization_description = translated_attribute(current_organization.description)
|
190
|
-
|
191
|
-
organization_description.blank? || organization_description == "<p></p>"
|
192
|
-
end
|
193
|
-
|
194
|
-
def each_decidim_engine
|
195
|
-
Rails.application.railties.each do |engine|
|
196
|
-
next unless engine.is_a?(Rails::Engine)
|
197
|
-
next unless engine.isolated?
|
198
|
-
next unless engine.engine_name.start_with?("decidim_")
|
199
|
-
next unless respond_to?(engine.engine_name)
|
200
|
-
|
201
|
-
yield public_send(engine.engine_name)
|
202
|
-
end
|
203
|
-
return unless respond_to?(:decidim)
|
204
|
-
|
205
|
-
yield decidim
|
206
|
-
end
|
207
|
-
|
208
145
|
def tag_builder
|
209
146
|
@tag_builder ||= ActionView::Helpers::TagHelper::TagBuilder.new(self)
|
210
147
|
end
|
@@ -21,7 +21,7 @@ module Decidim
|
|
21
21
|
# locales.
|
22
22
|
#
|
23
23
|
# collection - an Array of Strings. By default it uses all the available
|
24
|
-
# locales in Decidim, but you can
|
24
|
+
# locales in Decidim, but you can pass another collection of locales (for
|
25
25
|
# example, the available locales for an organization)
|
26
26
|
def localized_locales(collection = Decidim.available_locales)
|
27
27
|
klass = Class.new do
|
@@ -35,12 +35,7 @@ module Decidim
|
|
35
35
|
data: { "external-link": "text-only" }
|
36
36
|
}.merge(map_html_options)
|
37
37
|
return link_to(map_url, html_options) do
|
38
|
-
|
39
|
-
image_tag decidim.static_map_path(
|
40
|
-
sgid: resource.to_sgid.to_s,
|
41
|
-
latitude: resource.latitude,
|
42
|
-
longitude: resource.longitude
|
43
|
-
), alt: "#{map_service_brand} - #{address_text}"
|
38
|
+
image_tag decidim.static_map_path(sgid: resource.to_sgid.to_s), alt: "#{map_service_brand} - #{address_text}"
|
44
39
|
end
|
45
40
|
end
|
46
41
|
end
|
@@ -43,13 +43,21 @@ module Decidim
|
|
43
43
|
)
|
44
44
|
end
|
45
45
|
|
46
|
+
def mobile_breadcrumb_root_menu
|
47
|
+
@mobile_breadcrumb_root_menu ||= ::Decidim::BreadcrumbRootMenuPresenter.new(
|
48
|
+
:mobile_menu,
|
49
|
+
self,
|
50
|
+
container_options: { class: "menu-bar__main-dropdown__menu" }
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
46
54
|
def footer_menu
|
47
55
|
@footer_menu ||= ::Decidim::FooterMenuPresenter.new(
|
48
56
|
:menu,
|
49
57
|
self,
|
50
58
|
element_class: "font-semibold underline",
|
51
59
|
active_class: "is-active",
|
52
|
-
container_options: { class: "space-y-4 break-inside-avoid"
|
60
|
+
container_options: { class: "space-y-4 break-inside-avoid" },
|
53
61
|
label: t("layouts.decidim.footer.decidim_title")
|
54
62
|
)
|
55
63
|
end
|
@@ -3,13 +3,13 @@
|
|
3
3
|
module Decidim
|
4
4
|
# Helper that provides convenient methods to deal with the page meta tags.
|
5
5
|
module MetaTagsHelper
|
6
|
-
#
|
6
|
+
# Sets the given metatags for the page. It is a wrapper for the individual
|
7
7
|
# methods, so that you can set multiple values with a single call. See the docs for
|
8
8
|
# the other methods to see how they work.
|
9
9
|
#
|
10
|
-
# tags - A Hash containing the meta tag name as keys and its content as values.
|
10
|
+
# @param [Hash] tags - A Hash containing the meta tag name as keys and its content as values.
|
11
11
|
#
|
12
|
-
#
|
12
|
+
# @return [nil]
|
13
13
|
def add_decidim_meta_tags(tags)
|
14
14
|
add_decidim_page_title(tags[:title])
|
15
15
|
add_decidim_meta_description(tags[:description])
|
@@ -18,9 +18,11 @@ module Decidim
|
|
18
18
|
add_decidim_meta_image_url(add_base_url_to(tags[:image_url]))
|
19
19
|
end
|
20
20
|
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
21
|
+
# Add base url to path if path does not include host.
|
22
|
+
#
|
23
|
+
# @parma [String] path - A String containing path (e.g. "/proposals/1" )
|
24
|
+
#
|
25
|
+
# @return [String] - a String of URL including base URL and path, or path if it is blank.
|
24
26
|
def add_base_url_to(path)
|
25
27
|
return path if path.blank?
|
26
28
|
return path if URI.parse(path).host.present?
|
@@ -28,8 +30,9 @@ module Decidim
|
|
28
30
|
"#{resolve_base_url}#{path}"
|
29
31
|
end
|
30
32
|
|
31
|
-
#
|
32
|
-
#
|
33
|
+
# Resolve base url (example: https://www.decidim.org) without url params
|
34
|
+
#
|
35
|
+
# @return [String] - a String of base URL
|
33
36
|
def resolve_base_url
|
34
37
|
return request.base_url if respond_to?(:request) && request&.base_url.present?
|
35
38
|
|
@@ -41,20 +44,20 @@ module Decidim
|
|
41
44
|
end
|
42
45
|
end
|
43
46
|
|
44
|
-
#
|
45
|
-
# are rendered inside-out, `title` is appended to an array. This way the
|
47
|
+
# Accumulates the given `title` so that they can be chained. Since Rails views
|
48
|
+
# are rendered inside-out, `title` is appended to an array. This way the beginning of
|
46
49
|
# the title will be the most specific one. Use the `decidim_page_title` method to
|
47
50
|
# render the title whenever you need to (most surely, in the `<title>` tag in the HTML
|
48
51
|
# head and in some `title` metatags).
|
49
52
|
#
|
50
|
-
#
|
53
|
+
# @example
|
51
54
|
# add_decidim_page_title("My Process")
|
52
55
|
# add_decidim_page_title("My Organization")
|
53
56
|
# decidim_page_title # => "My Process - My Organization"
|
54
57
|
#
|
55
|
-
# title - A String to be added to the title
|
58
|
+
# @param [String] title - A String to be added to the title
|
56
59
|
#
|
57
|
-
#
|
60
|
+
# @return [Array<String>]
|
58
61
|
def add_decidim_page_title(title)
|
59
62
|
@decidim_page_title ||= []
|
60
63
|
return @decidim_page_title if title.blank?
|
@@ -62,11 +65,11 @@ module Decidim
|
|
62
65
|
@decidim_page_title << title
|
63
66
|
end
|
64
67
|
|
65
|
-
#
|
68
|
+
# Renders the title for a page. Use the `add_decidim_page_title` method to
|
66
69
|
# accumulate elements for the title. Basically, it joins the elements of the title
|
67
70
|
# array with `" - "`.
|
68
71
|
#
|
69
|
-
#
|
72
|
+
# @return [String]
|
70
73
|
def decidim_page_title
|
71
74
|
(@decidim_page_title || []).join(" - ")
|
72
75
|
end
|
@@ -80,9 +83,9 @@ module Decidim
|
|
80
83
|
# is the last one to be rendered. You can put there a basic content and override it
|
81
84
|
# in other layers.
|
82
85
|
#
|
83
|
-
# description - The String to be set as description
|
86
|
+
# @param [String] description - The String to be set as description
|
84
87
|
#
|
85
|
-
#
|
88
|
+
# @return [nil]
|
86
89
|
def add_decidim_meta_description(description)
|
87
90
|
@decidim_meta_description ||= strip_tags(description)
|
88
91
|
end
|
@@ -93,9 +96,9 @@ module Decidim
|
|
93
96
|
# is the last one to be rendered. You can put there a basic content and override it
|
94
97
|
# in other layers.
|
95
98
|
#
|
96
|
-
# twitter_handler - The String to be set as Twitter handler
|
99
|
+
# @param [String] twitter_handler - The String to be set as Twitter handler
|
97
100
|
#
|
98
|
-
#
|
101
|
+
# @return [nil]
|
99
102
|
def add_decidim_meta_twitter_handler(twitter_handler)
|
100
103
|
@decidim_meta_twitter_handler ||= twitter_handler
|
101
104
|
end
|
@@ -106,9 +109,9 @@ module Decidim
|
|
106
109
|
# is the last one to be rendered. You can put there a basic content and override it
|
107
110
|
# in other layers.
|
108
111
|
#
|
109
|
-
# url - The String to be set as URL
|
112
|
+
# @param [String] url - The String to be set as URL
|
110
113
|
#
|
111
|
-
#
|
114
|
+
# @return [nil]
|
112
115
|
def add_decidim_meta_url(url)
|
113
116
|
@decidim_meta_url ||= url
|
114
117
|
end
|
@@ -119,9 +122,9 @@ module Decidim
|
|
119
122
|
# is the last one to be rendered. You can put there a basic content and override it
|
120
123
|
# in other layers.
|
121
124
|
#
|
122
|
-
# image_url - The String to be set as image URL
|
125
|
+
# @param [String] image_url - The String to be set as image URL
|
123
126
|
#
|
124
|
-
#
|
127
|
+
# @return [nil]
|
125
128
|
def add_decidim_meta_image_url(image_url)
|
126
129
|
@decidim_meta_image_url ||= image_url
|
127
130
|
end
|
@@ -8,7 +8,7 @@ module Decidim
|
|
8
8
|
# you also can add your custom close button through data-dialog-close="<seed>"
|
9
9
|
#
|
10
10
|
# Options available:
|
11
|
-
# - id: String. Unique
|
11
|
+
# - id: String. Unique identifier for the dialog, if the page has distinct modal windows (default: "")
|
12
12
|
# - class: String. CSS classes for the modal content.
|
13
13
|
# - closable: Boolean. Whether the modal can be closed or not (default: true)
|
14
14
|
module ModalHelper
|
@@ -7,14 +7,13 @@ module Decidim
|
|
7
7
|
# (Note) This method requires the javascript 'decidim/orders' to be
|
8
8
|
# present in the page.
|
9
9
|
#
|
10
|
-
# orders - An array of order
|
10
|
+
# orders - An array of order criteria
|
11
11
|
# options - An optional hash of options
|
12
12
|
# * i18n_scope - The scope of the i18n translations
|
13
13
|
def order_selector(orders, options = {})
|
14
14
|
render partial: "decidim/shared/orders", locals: {
|
15
15
|
orders:,
|
16
|
-
i18n_scope: options[:i18n_scope]
|
17
|
-
css_class: options[:css_class]
|
16
|
+
i18n_scope: options[:i18n_scope]
|
18
17
|
}
|
19
18
|
end
|
20
19
|
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
# View helpers related to the organization.
|
5
|
+
|
6
|
+
module OrganizationHelper
|
7
|
+
include Decidim::TranslatableAttributes
|
8
|
+
|
9
|
+
# Renders a view with the customizable CSS variables in two flavours:
|
10
|
+
# 1. as a hexadecimal valid CSS color (ie: #ff0000)
|
11
|
+
# 2. as a disassembled RGB components (ie: 255 0 0)
|
12
|
+
#
|
13
|
+
# Example:
|
14
|
+
#
|
15
|
+
# --primary: #ff0000;
|
16
|
+
# --primary-rgb: 255 0 0
|
17
|
+
#
|
18
|
+
# Hexadecimal variables can be used as a normal CSS color:
|
19
|
+
#
|
20
|
+
# color: var(--primary)
|
21
|
+
#
|
22
|
+
# While the disassembled variant can be used where you need to manipulate
|
23
|
+
# the color somehow (ie: adding a background transparency):
|
24
|
+
#
|
25
|
+
# background-color: rgba(var(--primary-rgb), 0.5)
|
26
|
+
def organization_colors
|
27
|
+
css = current_organization.colors.each.map { |k, v| "--#{k}: #{v};--#{k}-rgb: #{v[1..2].hex} #{v[3..4].hex} #{v[5..6].hex};" }.join
|
28
|
+
render partial: "layouts/decidim/organization_colors", locals: { css: }
|
29
|
+
end
|
30
|
+
|
31
|
+
def organization_description_label
|
32
|
+
@organization_description_label ||= if empty_organization_description?
|
33
|
+
t("decidim.pages.home.footer_sub_hero.footer_sub_hero_body_html")
|
34
|
+
else
|
35
|
+
decidim_sanitize_admin(translated_attribute(current_organization.description))
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def organization_name(organization = current_organization)
|
40
|
+
translated_attribute(organization.name, organization)
|
41
|
+
end
|
42
|
+
|
43
|
+
def current_organization_name
|
44
|
+
organization_name(current_organization)
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def empty_organization_description?
|
50
|
+
organization_description = translated_attribute(current_organization.description)
|
51
|
+
|
52
|
+
organization_description.blank? || organization_description == "<p></p>"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -11,14 +11,16 @@ module Decidim
|
|
11
11
|
def decidim_paginate(collection, paginate_params = {})
|
12
12
|
return if collection.total_pages <= 1
|
13
13
|
|
14
|
-
per_page = (params[:per_page] || paginate_params[:per_page] || Decidim::Paginable::OPTIONS.first).to_i
|
15
|
-
|
16
14
|
content_tag :div, class: "flex flex-col-reverse md:flex-row items-center justify-between gap-1 py-8 md:py-16", data: { pagination: "" } do
|
17
15
|
template = ""
|
18
|
-
template += render(partial: "decidim/shared/results_per_page",
|
16
|
+
template += render(partial: "decidim/shared/results_per_page", formats: [:html]) if collection.total_pages.positive?
|
19
17
|
template += paginate collection, window: 2, outer_window: 1, theme: "decidim", params: paginate_params
|
20
18
|
template.html_safe
|
21
19
|
end
|
22
20
|
end
|
21
|
+
|
22
|
+
def per_page
|
23
|
+
params[:per_page].to_i || Decidim::Paginable::OPTIONS.first
|
24
|
+
end
|
23
25
|
end
|
24
26
|
end
|
@@ -28,7 +28,7 @@ module Decidim
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def participatory_space_floating_help
|
31
|
-
return if help_section.blank?
|
31
|
+
return if help_section.blank?
|
32
32
|
|
33
33
|
floating_help(help_id) { translated_attribute(help_section).html_safe }
|
34
34
|
end
|
@@ -47,12 +47,5 @@ module Decidim
|
|
47
47
|
|
48
48
|
::Decidim::ResourceLocatorPresenter.new(resource)
|
49
49
|
end
|
50
|
-
|
51
|
-
# Returns a descriptive title for the resource
|
52
|
-
def resource_title(resource)
|
53
|
-
title = resource.try(:title) || resource.try(:name) || resource.try(:subject) || "#{resource.model_name.human} ##{resource.id}"
|
54
|
-
title = translated_attribute(title) if title.is_a?(Hash)
|
55
|
-
title
|
56
|
-
end
|
57
50
|
end
|
58
51
|
end
|