decidim-core 0.28.2 → 0.29.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- 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 +5 -7
- data/app/cells/decidim/address_cell.rb +3 -5
- 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_cell.rb +0 -2
- 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_cell.rb +2 -2
- data/app/cells/decidim/card_l/space.erb +1 -1
- data/app/cells/decidim/card_l_cell.rb +1 -3
- data/app/cells/decidim/card_metadata_cell.rb +1 -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 +0 -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 +0 -2
- 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/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 -1
- 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 +5 -13
- 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/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/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_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 +1 -1
- data/app/cells/decidim/translation_bar_cell.rb +0 -2
- 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 -3
- 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_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 -19
- 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_controllers.rb +2 -0
- 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/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 -0
- 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/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/newsletters_opt_in_controller.rb +1 -1
- data/app/controllers/decidim/notifications_settings_controller.rb +1 -1
- 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 +1 -1
- 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/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 -36
- data/app/helpers/decidim/localized_locales_helper.rb +1 -1
- data/app/helpers/decidim/menu_helper.rb +8 -0
- 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 +1 -1
- data/app/helpers/decidim/resource_helper.rb +0 -7
- data/app/helpers/decidim/scopes_helper.rb +4 -2
- 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 +1 -1
- data/app/models/decidim/area_type.rb +1 -1
- data/app/models/decidim/attachment.rb +26 -2
- data/app/models/decidim/authorization.rb +1 -1
- data/app/models/decidim/authorization_transfer.rb +1 -0
- data/app/models/decidim/component.rb +2 -2
- data/app/models/decidim/content_block.rb +1 -1
- 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 +2 -2
- data/app/models/decidim/user_group.rb +2 -2
- data/app/packs/src/decidim/a11y.js +46 -0
- 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/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 -5
- data/app/packs/src/decidim/input_character_counter.js +1 -1
- 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/tooltips.js +1 -1
- data/app/packs/stylesheets/decidim/_datepicker.scss +193 -0
- data/app/packs/stylesheets/decidim/_dropdown.scss +36 -0
- 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 +9 -1
- 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 -1
- data/app/packs/stylesheets/decidim/_notifications.scss +4 -0
- data/app/packs/stylesheets/decidim/_tabs_x.scss +5 -1
- data/app/packs/stylesheets/decidim/application.scss +4 -0
- 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/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/organization_presenter.rb +1 -1
- 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/log/diff_changeset_calculator.rb +2 -2
- data/app/services/decidim/notifications_digest_sending_decider.rb +1 -1
- 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 +1 -1
- 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/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/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/_login_modal.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_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 +3 -4
- data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +10 -3
- 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/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 +2 -42
- data/config/locales/bg.yml +55 -57
- data/config/locales/ca.yml +65 -54
- data/config/locales/cs.yml +53 -55
- data/config/locales/de.yml +63 -52
- data/config/locales/el.yml +0 -29
- data/config/locales/en.yml +68 -57
- data/config/locales/es-MX.yml +67 -56
- data/config/locales/es-PY.yml +67 -56
- data/config/locales/es.yml +66 -55
- data/config/locales/eu.yml +67 -56
- data/config/locales/fi-plain.yml +66 -55
- data/config/locales/fi.yml +65 -54
- data/config/locales/fr-CA.yml +60 -55
- data/config/locales/fr.yml +55 -50
- data/config/locales/ga-IE.yml +0 -11
- data/config/locales/gl.yml +0 -18
- data/config/locales/hu.yml +36 -56
- data/config/locales/id-ID.yml +0 -14
- data/config/locales/is-IS.yml +0 -10
- data/config/locales/it.yml +0 -25
- data/config/locales/ja.yml +67 -56
- data/config/locales/lb.yml +0 -25
- data/config/locales/lt.yml +0 -48
- data/config/locales/lv.yml +0 -21
- data/config/locales/nl.yml +0 -24
- data/config/locales/no.yml +0 -25
- data/config/locales/pl.yml +67 -56
- data/config/locales/pt-BR.yml +4 -51
- data/config/locales/pt.yml +0 -25
- data/config/locales/ro-RO.yml +1 -28
- data/config/locales/ru.yml +0 -15
- data/config/locales/sk.yml +0 -21
- data/config/locales/sl.yml +0 -8
- data/config/locales/sv.yml +0 -33
- data/config/locales/tr-TR.yml +4 -27
- data/config/locales/uk.yml +0 -10
- data/config/locales/zh-CN.yml +0 -22
- data/config/locales/zh-TW.yml +0 -47
- data/config/routes.rb +0 -1
- data/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb +1 -1
- 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 +6 -5
- 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/needs_api_filter_and_order.rb +3 -3
- data/lib/decidim/api/functions/participatory_space_finder_base.rb +1 -1
- 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/types/organization_type.rb +1 -1
- data/lib/decidim/api/types/user_group_type.rb +1 -1
- data/lib/decidim/api/types/user_type.rb +1 -1
- data/lib/decidim/asset_router/pipeline.rb +2 -2
- 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.rb +0 -4
- 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_processor.rb +1 -1
- data/lib/decidim/content_security_policy.rb +1 -1
- data/lib/decidim/core/engine.rb +12 -15
- data/lib/decidim/core/menu.rb +13 -3
- data/lib/decidim/core/seeds.rb +120 -147
- data/lib/decidim/core/test/factories.rb +24 -3
- 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/comments_examples.rb +88 -82
- 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 +3 -3
- 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 +2 -2
- 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 +11 -11
- 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 -6
- data/lib/decidim/dependency_resolver.rb +3 -3
- data/lib/decidim/diffy_extension.rb +1 -1
- 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 +4 -4
- 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/organization_settings.rb +5 -5
- 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/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/stats_registry.rb +2 -2
- data/lib/decidim/translatable_attributes.rb +3 -3
- data/lib/decidim/translatable_resource.rb +1 -1
- data/lib/decidim/view_hooks.rb +1 -1
- data/lib/decidim/view_model.rb +4 -0
- 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 +1 -1
- 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 +202 -75
- 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/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/lib/decidim/carrier_wave_migrator_service.rb +0 -287
- data/lib/tasks/decidim_active_storage_migration_tasks.rake +0 -114
- data/lib/tasks/decidim_content_blocks_tasks.rake +0 -48
- /data/app/views/layouts/decidim/header/{_menu_breadcrumb_main_dropdown.html.erb → _menu_breadcrumb_main_dropdown_desktop.html.erb} +0 -0
@@ -1,68 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "cell/partial"
|
4
|
-
|
5
|
-
module Decidim
|
6
|
-
# This cell renders the pages in the footer. It has 2 types of pages with
|
7
|
-
# different layouts:
|
8
|
-
# * Pages of topics: To appear in the footer both the topic and the page must
|
9
|
-
# be marked to appear in footer. The topic will be shown as the title and
|
10
|
-
# all the pages marked will appear below
|
11
|
-
# * Pages without topic. The pages marked to appear in footer which do not
|
12
|
-
# belong to a topic will be shown as a list
|
13
|
-
#
|
14
|
-
# Example:
|
15
|
-
#
|
16
|
-
# cell("decidim/footer_pages", :topics)
|
17
|
-
class FooterPagesCell < Decidim::ViewModel
|
18
|
-
include ApplicationHelper
|
19
|
-
|
20
|
-
OPTIONS = [:topics, :pages].freeze
|
21
|
-
|
22
|
-
def show
|
23
|
-
return unless model.present? && OPTIONS.include?(model.to_sym)
|
24
|
-
return if pages.blank?
|
25
|
-
|
26
|
-
render model
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
def pages
|
32
|
-
@pages = case model.to_sym
|
33
|
-
when :topics
|
34
|
-
organization_topics
|
35
|
-
when :pages
|
36
|
-
organization_pages
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def organization_pages
|
41
|
-
current_organization
|
42
|
-
.static_pages_accessible_for(current_user)
|
43
|
-
.where(show_in_footer: true, topic_id: nil)
|
44
|
-
.where.not(slug: "terms-and-conditions").map do |page|
|
45
|
-
{ title: decidim_escape_translated(page.title), path: decidim.page_path(page) }
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def organization_topics
|
50
|
-
current_organization.static_page_topics.where(show_in_footer: true).map do |topic|
|
51
|
-
next if (topic_pages = topic.accessible_pages_for(current_user).where(show_in_footer: true)).blank?
|
52
|
-
|
53
|
-
{
|
54
|
-
title: decidim_escape_translated(topic.title),
|
55
|
-
pages: topic_pages.map do |page|
|
56
|
-
{ title: decidim_escape_translated(page.title), path: decidim.page_path(page) }
|
57
|
-
end
|
58
|
-
}
|
59
|
-
end.compact
|
60
|
-
end
|
61
|
-
|
62
|
-
def page_item(page_data, opts = {})
|
63
|
-
content_tag(:li, **opts.slice(:class)) do
|
64
|
-
link_to page_data[:title], page_data[:path]
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/* eslint-disable */
|
2
|
-
|
3
|
-
/*! modernizr 3.3.1 (Custom Build) | MIT *
|
4
|
-
* https://modernizr.com/download/?-setclasses !*/
|
5
|
-
!function(n,e,s){function o(n,e){return typeof n===e}function a(){var n,e,s,a,i,l,r;for(var c in f)if(f.hasOwnProperty(c)){if(n=[],e=f[c],e.name&&(n.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(s=0;s<e.options.aliases.length;s++)n.push(e.options.aliases[s].toLowerCase());for(a=o(e.fn,"function")?e.fn():e.fn,i=0;i<n.length;i++)l=n[i],r=l.split("."),1===r.length?Modernizr[r[0]]=a:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=a),t.push((a?"":"no-")+r.join("-"))}}function i(n){var e=r.className,s=Modernizr._config.classPrefix||"";if(c&&(e=e.baseVal),Modernizr._config.enableJSClass){var o=new RegExp("(^|\\s)"+s+"no-js(\\s|$)");e=e.replace(o,"$1"+s+"js$2")}Modernizr._config.enableClasses&&(e+=" "+s+n.join(" "+s),c?r.className.baseVal=e:r.className=e)}var t=[],f=[],l={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(n,e){var s=this;setTimeout(function(){e(s[n])},0)},addTest:function(n,e,s){f.push({name:n,fn:e,options:s})},addAsyncTest:function(n){f.push({name:null,fn:n})}},Modernizr=function(){};Modernizr.prototype=l,Modernizr=new Modernizr;var r=e.documentElement,c="svg"===r.nodeName.toLowerCase();a(),i(t),delete l.addTest,delete l.addAsyncTest;for(var u=0;u<Modernizr._q.length;u++)Modernizr._q[u]();n.Modernizr=Modernizr}(window,document);
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
# Class used to retrieve similar emendations, scoped to the current component.
|
5
|
-
class SimilarEmendations < Decidim::Query
|
6
|
-
include Decidim::TranslationsHelper
|
7
|
-
|
8
|
-
# Syntactic sugar to initialize the class and return the queried objects.
|
9
|
-
#
|
10
|
-
# amendment - Decidim::Amendment
|
11
|
-
def self.for(amendment)
|
12
|
-
new(amendment).query
|
13
|
-
end
|
14
|
-
|
15
|
-
# Initializes the class.
|
16
|
-
#
|
17
|
-
# amendment - Decidim::Amendment
|
18
|
-
def initialize(amendment)
|
19
|
-
@component = amendment.amendable.component
|
20
|
-
@emendation = amendment.emendation
|
21
|
-
@amender = amendment.amender
|
22
|
-
end
|
23
|
-
|
24
|
-
# Retrieves similar emendations
|
25
|
-
def query
|
26
|
-
emendation.class
|
27
|
-
.where(component:)
|
28
|
-
.only_visible_emendations_for(amender, component)
|
29
|
-
.published
|
30
|
-
.not_hidden
|
31
|
-
.where(
|
32
|
-
Arel.sql("GREATEST(#{title_similarity}, #{body_similarity}) >= ?").to_s,
|
33
|
-
translated_attribute(emendation.title),
|
34
|
-
translated_attribute(emendation.body),
|
35
|
-
amendable_module.similarity_threshold
|
36
|
-
)
|
37
|
-
.limit(amendable_module.similarity_limit)
|
38
|
-
end
|
39
|
-
|
40
|
-
private
|
41
|
-
|
42
|
-
attr_reader :component, :emendation, :amender
|
43
|
-
|
44
|
-
def amendable_module
|
45
|
-
emendation.class.module_parent
|
46
|
-
end
|
47
|
-
|
48
|
-
def title_similarity
|
49
|
-
"similarity(title::text, ?)"
|
50
|
-
end
|
51
|
-
|
52
|
-
def body_similarity
|
53
|
-
"similarity(body::text, ?)"
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading files to Decidim. It is intended to just
|
5
|
-
# hold the uploads configuration, so you should inherit from this class and
|
6
|
-
# then tweak any configuration you need.
|
7
|
-
class ApplicationUploader < CarrierWave::Uploader::Base
|
8
|
-
include CarrierWave::MiniMagick
|
9
|
-
attr_reader :validable_dimensions
|
10
|
-
|
11
|
-
delegate :variants, to: :class
|
12
|
-
|
13
|
-
# Override the directory where uploaded files will be stored.
|
14
|
-
# This is a sensible default for uploaders that are meant to be mounted:
|
15
|
-
def store_dir
|
16
|
-
default_path = "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
17
|
-
|
18
|
-
return File.join(Decidim.base_uploads_path, default_path) if Decidim.base_uploads_path.present?
|
19
|
-
|
20
|
-
default_path
|
21
|
-
end
|
22
|
-
|
23
|
-
# As of Carrierwave 2.0 fog_provider method has been deprecated, and is throwing RuntimeError
|
24
|
-
# RuntimeError: Carrierwave fog_provider not supported: DEPRECATION WARNING: #fog_provider is deprecated...
|
25
|
-
# We are attempting to fetch the provider from credentials, if not we consider to be file
|
26
|
-
def provider
|
27
|
-
fog_credentials.fetch(:provider, "file").downcase
|
28
|
-
end
|
29
|
-
|
30
|
-
# We overwrite the downloader to be able to fetch some elements from URL.
|
31
|
-
def downloader
|
32
|
-
Decidim::Downloader
|
33
|
-
end
|
34
|
-
|
35
|
-
def variant(key)
|
36
|
-
if key && variants[key].present?
|
37
|
-
model.send(mounted_as).variant(variants[key])
|
38
|
-
else
|
39
|
-
model.send(mounted_as)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
protected
|
44
|
-
|
45
|
-
# Checks if the file is an image based on the content type. We need this so
|
46
|
-
# we only create different versions of the file when it is an image.
|
47
|
-
#
|
48
|
-
# new_file - The uploaded file.
|
49
|
-
#
|
50
|
-
# Returns a Boolean.
|
51
|
-
def image?(new_file)
|
52
|
-
content_type = model.try(:content_type) || new_file.content_type
|
53
|
-
content_type.to_s.start_with? "image"
|
54
|
-
end
|
55
|
-
|
56
|
-
class << self
|
57
|
-
# Each class inherits variants from parents and can define their own
|
58
|
-
# variants with the set_variants class method which calss the version
|
59
|
-
# CarrierWave macro to define versions from variants
|
60
|
-
def variants
|
61
|
-
@variants ||= superclass.respond_to?(:variants) ? superclass.variants.dup : {}
|
62
|
-
end
|
63
|
-
|
64
|
-
def set_variants
|
65
|
-
return unless block_given?
|
66
|
-
|
67
|
-
variants.merge!(yield)
|
68
|
-
|
69
|
-
variants.each do |key, value|
|
70
|
-
version key, if: :image? do
|
71
|
-
process value
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading attachments to a participatory space.
|
5
|
-
class AttachmentUploader < ApplicationUploader
|
6
|
-
process :validate_dimensions
|
7
|
-
process :strip
|
8
|
-
|
9
|
-
def validable_dimensions
|
10
|
-
true
|
11
|
-
end
|
12
|
-
|
13
|
-
set_variants do
|
14
|
-
{
|
15
|
-
thumbnail: { resize_to_fit: [nil, 237] },
|
16
|
-
big: { resize_to_limit: [nil, 1000] }
|
17
|
-
}
|
18
|
-
end
|
19
|
-
|
20
|
-
def max_image_height_or_width
|
21
|
-
8000
|
22
|
-
end
|
23
|
-
|
24
|
-
protected
|
25
|
-
|
26
|
-
# Strips out all embedded information from the image
|
27
|
-
def strip
|
28
|
-
return unless image?(self)
|
29
|
-
|
30
|
-
manipulate! do |img|
|
31
|
-
img.strip
|
32
|
-
img
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def upload_context
|
37
|
-
return :participant unless model.respond_to?(:context)
|
38
|
-
|
39
|
-
model.context
|
40
|
-
end
|
41
|
-
|
42
|
-
# A simple check to avoid DoS with maliciously crafted images, or just to
|
43
|
-
# avoid reckless users that upload gigapixels images.
|
44
|
-
#
|
45
|
-
# See https://hackerone.com/reports/390
|
46
|
-
def validate_dimensions
|
47
|
-
return unless image?(self)
|
48
|
-
|
49
|
-
manipulate! do |image|
|
50
|
-
raise CarrierWave::IntegrityError, I18n.t("carrierwave.errors.file_resolution_too_large") if image.dimensions.any? { |dimension| dimension > max_image_height_or_width }
|
51
|
-
|
52
|
-
image
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading avatars to a User.
|
5
|
-
class AvatarUploader < ImageUploader
|
6
|
-
set_variants do
|
7
|
-
{
|
8
|
-
profile: { resize_to_fill: [536, 640] },
|
9
|
-
big: { resize_to_fit: [80, 80] },
|
10
|
-
thumb: { resize_to_fit: [40, 40] }
|
11
|
-
}
|
12
|
-
end
|
13
|
-
|
14
|
-
process :validate_dimensions
|
15
|
-
|
16
|
-
def default_url(*)
|
17
|
-
ActionController::Base.helpers.asset_path("decidim/default-avatar.svg")
|
18
|
-
end
|
19
|
-
|
20
|
-
def default_multiuser_url(*)
|
21
|
-
ActionController::Base.helpers.asset_path("decidim/avatar-multiuser.png")
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with saving download your data Zip Files to App
|
5
|
-
class DownloadYourDataUploader < ApplicationUploader
|
6
|
-
# Override the directory where uploaded files will be stored.
|
7
|
-
def store_dir
|
8
|
-
default_path = "uploads/download-your-data/"
|
9
|
-
|
10
|
-
return File.join(Decidim.base_uploads_path, default_path) if Decidim.base_uploads_path.present?
|
11
|
-
|
12
|
-
default_path
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading hero images to organizations.
|
5
|
-
class HomepageImageUploader < RecordImageUploader
|
6
|
-
set_variants do
|
7
|
-
{ big: { resize_to_fill: [1920, 666] } }
|
8
|
-
end
|
9
|
-
|
10
|
-
def max_image_height_or_width
|
11
|
-
8000
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading hero images to ParticipatoryProcesses.
|
5
|
-
class ImageUploader < ApplicationUploader
|
6
|
-
process :validate_size, :validate_dimensions, :strip
|
7
|
-
process quality: Decidim.image_uploader_quality
|
8
|
-
|
9
|
-
def validable_dimensions
|
10
|
-
true
|
11
|
-
end
|
12
|
-
|
13
|
-
# CarrierWave automatically calls this method and validates the content
|
14
|
-
# type fo the temp file to match against any of these options.
|
15
|
-
def content_type_allowlist
|
16
|
-
extension_allowlist.map { |ext| "image/#{ext}" }
|
17
|
-
end
|
18
|
-
|
19
|
-
# Strips out all embedded information from the image
|
20
|
-
def strip
|
21
|
-
manipulate! do |img|
|
22
|
-
img.strip
|
23
|
-
img
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
# Fetches info about different variants, their processors and dimensions
|
28
|
-
def dimensions_info
|
29
|
-
return if variants.blank?
|
30
|
-
|
31
|
-
variants.transform_values do |variant|
|
32
|
-
{
|
33
|
-
processor: variant.keys.first,
|
34
|
-
dimensions: variant.values.first
|
35
|
-
}
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
# Add a white list of extensions which are allowed to be uploaded.
|
40
|
-
# For images you might use something like this:
|
41
|
-
def extension_allowlist
|
42
|
-
Decidim.organization_settings(model).upload_allowed_file_extensions_image
|
43
|
-
end
|
44
|
-
|
45
|
-
# A simple check to avoid DoS with maliciously crafted images, or just to
|
46
|
-
# avoid reckless users that upload gigapixels images.
|
47
|
-
#
|
48
|
-
# See https://hackerone.com/reports/390
|
49
|
-
def validate_dimensions
|
50
|
-
manipulate! do |image|
|
51
|
-
validation_error!(I18n.t("carrierwave.errors.file_resolution_too_large")) if image.dimensions.any? { |dimension| dimension > max_image_height_or_width }
|
52
|
-
image
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def validate_size
|
57
|
-
manipulate! do |image|
|
58
|
-
validation_error!(I18n.t("carrierwave.errors.file_size_too_large")) if image.size > maximum_upload_size
|
59
|
-
image
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
def max_image_height_or_width
|
64
|
-
3840
|
65
|
-
end
|
66
|
-
|
67
|
-
private
|
68
|
-
|
69
|
-
def validation_error!(text)
|
70
|
-
model.errors.add(mounted_as, text)
|
71
|
-
raise CarrierWave::IntegrityError, text
|
72
|
-
end
|
73
|
-
|
74
|
-
def maximum_upload_size
|
75
|
-
Decidim.organization_settings(model).upload_maximum_file_size
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading images to newsletters.
|
5
|
-
class NewsletterTemplateImageUploader < ImageUploader
|
6
|
-
set_variants do
|
7
|
-
{ default: { resize_to_fit: [550, 300] } }
|
8
|
-
end
|
9
|
-
|
10
|
-
def max_image_height_or_width
|
11
|
-
8000
|
12
|
-
end
|
13
|
-
|
14
|
-
# Overwrite: If the content block is in preview mode, then we show the
|
15
|
-
# preview image. Otherwise, we use the default behavior.
|
16
|
-
def url(*args)
|
17
|
-
return preview_url if in_preview?
|
18
|
-
|
19
|
-
super
|
20
|
-
end
|
21
|
-
|
22
|
-
def preview_url(*_args)
|
23
|
-
manifest_images = model.content_block.manifest.images
|
24
|
-
image = manifest_images.find { |manifest_image| manifest_image[:name] == mounted_as } || {}
|
25
|
-
preview = image[:preview]
|
26
|
-
|
27
|
-
if preview && preview.respond_to?(:call)
|
28
|
-
preview.call
|
29
|
-
else
|
30
|
-
preview
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def in_preview?
|
35
|
-
model.content_block.in_preview
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading hero images to ParticipatoryProcesses.
|
5
|
-
class OAuthApplicationLogoUploader < RecordImageUploader
|
6
|
-
set_variants do
|
7
|
-
{ default: { resize_to_fit: [75, 75] } }
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading hero images to ParticipatoryProcesses.
|
5
|
-
class OfficialImageFooterUploader < RecordImageUploader
|
6
|
-
set_variants do
|
7
|
-
{ default: { resize_to_fit: [600, 180] } }
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading hero images to ParticipatoryProcesses.
|
5
|
-
class OfficialImageHeaderUploader < RecordImageUploader
|
6
|
-
set_variants do
|
7
|
-
{ default: { resize_to_fit: [160, 160] } }
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading open data.
|
5
|
-
class OpenDataUploader < ApplicationUploader
|
6
|
-
protected
|
7
|
-
|
8
|
-
# Override the directory where uploaded files will be stored. We only want one copy of the Open Data
|
9
|
-
# export.
|
10
|
-
def store_dir
|
11
|
-
default_path = "uploads/open-data"
|
12
|
-
|
13
|
-
return File.join(Decidim.base_uploads_path, default_path) if Decidim.base_uploads_path.present?
|
14
|
-
|
15
|
-
default_path
|
16
|
-
end
|
17
|
-
|
18
|
-
# Sets the validation that the associated model is always within an organization to true
|
19
|
-
def validate_inside_organization
|
20
|
-
true
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading an organization's favicon.
|
5
|
-
class OrganizationFaviconUploader < ImageUploader
|
6
|
-
SIZES = {
|
7
|
-
big: 152,
|
8
|
-
medium: 64,
|
9
|
-
small: 32
|
10
|
-
}.freeze
|
11
|
-
|
12
|
-
set_variants do
|
13
|
-
SIZES.transform_values do |value|
|
14
|
-
{ resize_and_pad: [value, value] }
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim::Cw
|
4
|
-
# This class deals with uploading record specific images that have more
|
5
|
-
# limited content types than the defaults.
|
6
|
-
class RecordImageUploader < ImageUploader
|
7
|
-
def content_type_allowlist
|
8
|
-
%w(image/jpeg image/png)
|
9
|
-
end
|
10
|
-
|
11
|
-
def extension_allowlist
|
12
|
-
%w(jpeg jpg png)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<%= render layout: "layouts/decidim/shared/layout_center" do %>
|
2
|
-
|
3
|
-
<%= render partial: "wizard_header", locals: { similar_resources_count: similar_emendations.size } %>
|
4
|
-
|
5
|
-
<div class="space-y-8 my-10">
|
6
|
-
<% similar_emendations.each do |emendation| %>
|
7
|
-
<%= card_for emendation %>
|
8
|
-
<% end %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
12
|
-
<%= link_to edit_draft_amend_path(amendment), class: "button button__sm md:button__lg button__secondary ml-auto" do %>
|
13
|
-
<span><%= t("continue", scope: "decidim.amendments.compare_draft") %></span>
|
14
|
-
<%= icon "arrow-right-line" %>
|
15
|
-
<% end %>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
<% end %>
|
File without changes
|
@@ -1,36 +0,0 @@
|
|
1
|
-
<%= link_to decidim.root_url, class: "main-bar__links-mobile__item" do %>
|
2
|
-
<%= icon "home-2-line" %><span><%= t("decidim.menu.home") %></span>
|
3
|
-
<% end %>
|
4
|
-
|
5
|
-
<button id="dropdown-trigger-links-mobile-search" class="main-bar__links-mobile__item" data-component="dropdown" data-target="dropdown-menu-search-mobile" data-autofocus="input-search-mobile">
|
6
|
-
<%= icon "search-line" %><span><%= t("decidim.search.term_input_placeholder") %></span>
|
7
|
-
</button>
|
8
|
-
|
9
|
-
<%= link_to decidim.last_activities_path, class: "main-bar__links-mobile__item" do %>
|
10
|
-
<%= icon "bubble-chart-line" %><span><%= t("decidim.profiles.show.activity") %></span>
|
11
|
-
<% end %>
|
12
|
-
|
13
|
-
<% if current_user %>
|
14
|
-
<button id="dropdown-trigger-links-mobile" class="main-bar__links-mobile__item" data-component="dropdown" data-target="dropdown-menu-account-mobile">
|
15
|
-
<% if current_user.notifications.any? %>
|
16
|
-
<span class="main-bar__notification"></span>
|
17
|
-
<% end %>
|
18
|
-
|
19
|
-
<% if current_user.avatar.attached? %>
|
20
|
-
<span class="main-bar__avatar">
|
21
|
-
<%= image_tag(
|
22
|
-
current_user.attached_uploader(:avatar).path(variant: :thumb),
|
23
|
-
alt: t("decidim.author.avatar", name: decidim_sanitize(current_user.avatar.name))
|
24
|
-
) %>
|
25
|
-
</span>
|
26
|
-
<% else %>
|
27
|
-
<%= icon "user-smile-line" %>
|
28
|
-
<% end %>
|
29
|
-
|
30
|
-
<span><%= t("layouts.decidim.user_profile.account") %></span>
|
31
|
-
</button>
|
32
|
-
<% else %>
|
33
|
-
<%= link_to decidim.new_user_session_path, class: "main-bar__links-mobile__item" do %>
|
34
|
-
<%= icon "login-box-line" %><span><%= t("layouts.decidim.header.log_in") %></span>
|
35
|
-
<% end %>
|
36
|
-
<% end %>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module CarrierWave
|
4
|
-
module MiniMagick
|
5
|
-
# this method allow us to specify a quality for our image
|
6
|
-
# e.g. <process quality: 60>
|
7
|
-
def quality(percentage)
|
8
|
-
manipulate! do |img|
|
9
|
-
img.quality(percentage.to_s)
|
10
|
-
img = yield(img) if block_given?
|
11
|
-
img
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|