decidim-core 0.28.2 → 0.29.0.rc1
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,7 +1,7 @@
|
|
1
1
|
/* eslint-disable */
|
2
2
|
const { config } = require("shakapacker");
|
3
3
|
const { InjectManifest } = require("workbox-webpack-plugin");
|
4
|
-
const
|
4
|
+
const { EsbuildPlugin } = require("esbuild-loader");
|
5
5
|
|
6
6
|
module.exports = {
|
7
7
|
module: {
|
@@ -15,8 +15,8 @@ module.exports = {
|
|
15
15
|
},
|
16
16
|
{
|
17
17
|
test: /\.(js|jsx)$/,
|
18
|
-
exclude: /node_modules
|
19
|
-
loader: "
|
18
|
+
exclude: /node_modules\//,
|
19
|
+
loader: "esbuild-loader"
|
20
20
|
},
|
21
21
|
{
|
22
22
|
test: /\.(graphql|gql)$/,
|
@@ -37,14 +37,11 @@ module.exports = {
|
|
37
37
|
}
|
38
38
|
},
|
39
39
|
{
|
40
|
-
test: [
|
41
|
-
/\.md$/,
|
42
|
-
/\.odt$/,
|
43
|
-
],
|
40
|
+
test: [/\.md$/, /\.odt$/],
|
44
41
|
exclude: [/\.(js|mjs|jsx|ts|tsx)$/],
|
45
|
-
type:
|
42
|
+
type: "asset/resource",
|
46
43
|
generator: {
|
47
|
-
filename:
|
44
|
+
filename: "media/documents/[hash][ext][query]"
|
48
45
|
}
|
49
46
|
},
|
50
47
|
// Overwrite webpacker files rule to amend the filename output
|
@@ -68,9 +65,9 @@ module.exports = {
|
|
68
65
|
/\.svg$/
|
69
66
|
],
|
70
67
|
exclude: [/\.(js|mjs|jsx|ts|tsx)$/],
|
71
|
-
type:
|
68
|
+
type: "asset/resource",
|
72
69
|
generator: {
|
73
|
-
filename:
|
70
|
+
filename: "media/images/[name]-[hash][ext][query]"
|
74
71
|
}
|
75
72
|
}
|
76
73
|
]
|
@@ -81,32 +78,13 @@ module.exports = {
|
|
81
78
|
crypto: false
|
82
79
|
}
|
83
80
|
},
|
84
|
-
// https://github.com/rails/webpacker/issues/2932
|
85
|
-
// As Decidim uses multiple packs, we need to enforce a single runtime, to prevent duplication
|
86
81
|
optimization: {
|
87
82
|
minimizer: [
|
88
|
-
new
|
89
|
-
|
90
|
-
|
91
|
-
parse: {
|
92
|
-
// Let terser parse ecma 8 code but always output
|
93
|
-
// ES5 compliant code for older browsers
|
94
|
-
ecma: 8
|
95
|
-
},
|
96
|
-
compress: {
|
97
|
-
ecma: 5,
|
98
|
-
warnings: false,
|
99
|
-
comparisons: false
|
100
|
-
},
|
101
|
-
mangle: { safari10: true },
|
102
|
-
output: {
|
103
|
-
ecma: 5,
|
104
|
-
comments: false,
|
105
|
-
ascii_only: true
|
106
|
-
}
|
107
|
-
}
|
83
|
+
new EsbuildPlugin({
|
84
|
+
target: "es2015",
|
85
|
+
css: true
|
108
86
|
})
|
109
|
-
]
|
87
|
+
]
|
110
88
|
},
|
111
89
|
entry: config.entrypoints,
|
112
90
|
plugins: [
|
@@ -122,4 +100,4 @@ module.exports = {
|
|
122
100
|
swDest: "../sw.js"
|
123
101
|
})
|
124
102
|
]
|
125
|
-
}
|
103
|
+
};
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Devise
|
4
4
|
module Models
|
5
|
-
# Newsletterable adds all needed validations to
|
5
|
+
# Newsletterable adds all needed validations to accomplish GDPR standards
|
6
6
|
# in newsletter notification mailing
|
7
7
|
#
|
8
8
|
# Validates that all users with notifications activated have Opt-in in
|
@@ -32,7 +32,7 @@ namespace :decidim do
|
|
32
32
|
else
|
33
33
|
puts " #{index}/#{users_count} !! [#{user_id}] DELETING USER"
|
34
34
|
log.info " #{index}/#{users_count} !! [#{user_id}] DELETING USER"
|
35
|
-
Decidim::DestroyAccount.call(
|
35
|
+
Decidim::DestroyAccount.call(Decidim::DeleteAccountForm.from_params({}).with_context({ current_user: user })) # Delete user!
|
36
36
|
end
|
37
37
|
else
|
38
38
|
puts " #{index}/#{users_count} - [#{user_id}] User not found"
|
@@ -55,7 +55,7 @@ namespace :decidim do
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
desc "
|
58
|
+
desc "Checks and notifies users to update their newsletter notifications settings"
|
59
59
|
task check_users_newsletter_opt_in: :environment do
|
60
60
|
print %(
|
61
61
|
> This will send an email to all the users that have marked the newsletter by default. This should only be run if you were using Decidim before v0.11
|
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
namespace :decidim do
|
4
4
|
namespace :mailers do
|
5
|
-
desc "
|
5
|
+
desc "Sends the notification digest email with the daily report"
|
6
6
|
task notifications_digest_daily: :environment do
|
7
7
|
notifications_digest(:daily)
|
8
8
|
end
|
9
9
|
|
10
|
-
desc "
|
10
|
+
desc "Sends the notification digest email with the weekly report"
|
11
11
|
task notifications_digest_weekly: :environment do
|
12
12
|
notifications_digest(:weekly)
|
13
13
|
end
|
@@ -7,7 +7,7 @@ namespace :decidim do
|
|
7
7
|
# Get all metrics entities and execute its own rake task.
|
8
8
|
# It admits a date-string parameter, in a 'YYYY-MM-DD' format from
|
9
9
|
# today to all past dates
|
10
|
-
desc "
|
10
|
+
desc "Calculates all metrics"
|
11
11
|
task :all, [:day] => :environment do |_task, args|
|
12
12
|
Decidim::Organization.find_each do |organization|
|
13
13
|
Decidim.metrics_registry.all.each do |metric_manifest|
|
@@ -21,7 +21,7 @@ namespace :decidim do
|
|
21
21
|
# Execute metric calculations for just one metric
|
22
22
|
# It need a metric name and permits a date-string parameter, in a 'YYYY-MM-DD' format from
|
23
23
|
# today to all past dates
|
24
|
-
desc "
|
24
|
+
desc "Calculates one metric"
|
25
25
|
task :one, [:metric, :day] => :environment do |_task, args|
|
26
26
|
next if args.metric.blank?
|
27
27
|
|
@@ -31,7 +31,7 @@ namespace :decidim do
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
desc "
|
34
|
+
desc "Rebuilds calculations from specific day"
|
35
35
|
task :rebuild, [:metric, :day] => :environment do |_task, args|
|
36
36
|
metric = args.metric
|
37
37
|
day = args.day
|
@@ -47,10 +47,10 @@ namespace :decidim do
|
|
47
47
|
Decidim::Organization.find_each do |organization|
|
48
48
|
if metric
|
49
49
|
m_manifest = Decidim.metrics_registry.for(metric)
|
50
|
-
log_info "[#{organization.name}]: rebuilding metric [#{metric}] for day [#{current_day}]"
|
50
|
+
log_info "[#{organization.name[organization.default_locale.to_s]}]: rebuilding metric [#{metric}] for day [#{current_day}]"
|
51
51
|
call_metric_job(m_manifest, organization, current_day)
|
52
52
|
else
|
53
|
-
log_info "[#{organization.name}]: rebuilding all metrics for day [#{current_day}]"
|
53
|
+
log_info "[#{organization.name[organization.default_locale.to_s]}]: rebuilding all metrics for day [#{current_day}]"
|
54
54
|
Decidim.metrics_registry.all.each do |metric_manifest|
|
55
55
|
call_metric_job(metric_manifest, organization, current_day)
|
56
56
|
end
|
@@ -63,7 +63,7 @@ namespace :decidim do
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
desc "
|
66
|
+
desc "Shows the available metrics"
|
67
67
|
task list: :environment do
|
68
68
|
puts Decidim.metrics_registry.all.pluck :metric_name
|
69
69
|
end
|
@@ -4,7 +4,7 @@ require "thor"
|
|
4
4
|
|
5
5
|
namespace :decidim do
|
6
6
|
namespace :procfile do
|
7
|
-
desc "Generates a
|
7
|
+
desc "Generates a script for starting the development app server"
|
8
8
|
task :install do
|
9
9
|
actions :create_file, "Procfile.dev", <<~RUBY
|
10
10
|
web: bin/rails server -b 0.0.0.0 -p 3000
|
@@ -13,6 +13,12 @@ namespace :decidim do
|
|
13
13
|
|
14
14
|
actions :create_file, "bin/dev", %(#!/usr/bin/env sh
|
15
15
|
|
16
|
+
set -e
|
17
|
+
|
18
|
+
bundle check || bundle install --jobs 20 --retry 5
|
19
|
+
|
20
|
+
bin/rails decidim:upgrade db:migrate
|
21
|
+
|
16
22
|
if ! gem list foreman -i --silent; then
|
17
23
|
echo "Installing foreman..."
|
18
24
|
gem install foreman
|
@@ -29,8 +35,8 @@ exec foreman start -f Procfile.dev "$@")
|
|
29
35
|
include Thor::Actions
|
30
36
|
end
|
31
37
|
|
32
|
-
def actions(*
|
33
|
-
Actions.new.send(*
|
38
|
+
def actions(*)
|
39
|
+
Actions.new.send(*)
|
34
40
|
end
|
35
41
|
end
|
36
42
|
end
|
@@ -1,16 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
namespace :decidim do
|
4
|
-
desc "
|
4
|
+
desc "Performs upgrade tasks (migrations, node, docs )."
|
5
5
|
task upgrade: [
|
6
6
|
:choose_target_plugins,
|
7
7
|
:"decidim:upgrade_app",
|
8
8
|
:"railties:install:migrations",
|
9
|
-
:"decidim:webpacker
|
9
|
+
:"decidim:upgrade:webpacker",
|
10
10
|
:"decidim_api:generate_docs"
|
11
11
|
]
|
12
12
|
|
13
|
-
|
13
|
+
task update: [:upgrade]
|
14
|
+
|
15
|
+
desc "Sets up environment so that only decidim migrations are installed."
|
14
16
|
task :choose_target_plugins do
|
15
17
|
ENV["FROM"] = %w(
|
16
18
|
decidim
|
@@ -22,7 +24,6 @@ namespace :decidim do
|
|
22
24
|
decidim_comments
|
23
25
|
decidim_conferences
|
24
26
|
decidim_debates
|
25
|
-
decidim_elections
|
26
27
|
decidim_forms
|
27
28
|
decidim_initiatives
|
28
29
|
decidim_meetings
|
@@ -12,12 +12,13 @@ namespace :decidim do
|
|
12
12
|
remove_file_from_application "bin/yarn"
|
13
13
|
remove_file_from_application "yarn.lock"
|
14
14
|
remove_file_from_application "node_modules/.yarn-integrity"
|
15
|
-
# Babel config
|
16
|
-
copy_file_to_application "babel.config.json"
|
17
15
|
# PostCSS configuration
|
18
16
|
copy_file_to_application "decidim-core/lib/decidim/webpacker/postcss.config.js", "postcss.config.js"
|
19
17
|
|
20
|
-
|
18
|
+
copy_file_to_application "decidim-core/lib/decidim/webpacker/esbuild.config.js", "config/esbuild.config.js"
|
19
|
+
copy_file_to_application "decidim-core/lib/decidim/webpacker/tsconfig.json", "tsconfig.json"
|
20
|
+
|
21
|
+
# Remove the Webpacker config and deploy shakapacker
|
21
22
|
migrate_shakapacker
|
22
23
|
|
23
24
|
# Install JS dependencies
|
@@ -49,162 +50,173 @@ namespace :decidim do
|
|
49
50
|
# Add the Browserslist configuration to the project
|
50
51
|
add_decidim_browserslist_configuration
|
51
52
|
end
|
53
|
+
end
|
52
54
|
|
53
|
-
|
54
|
-
|
55
|
+
namespace :upgrade do
|
56
|
+
desc "Upgrades Decidim webpacker dependencies in Rails instance application"
|
57
|
+
task webpacker: :environment do
|
55
58
|
raise "Decidim gem is not installed" if decidim_path.nil?
|
56
59
|
|
57
60
|
remove_file_from_application "bin/yarn"
|
58
61
|
|
59
|
-
|
62
|
+
unless File.exist?(rails_app_path.join("config/esbuild.config.js"))
|
63
|
+
copy_file_to_application "decidim-core/lib/decidim/webpacker/esbuild.config.js",
|
64
|
+
"config/esbuild.config.js"
|
65
|
+
end
|
66
|
+
unless File.exist?(rails_app_path.join("tsconfig.json"))
|
67
|
+
copy_file_to_application "decidim-core/lib/decidim/webpacker/tsconfig.json",
|
68
|
+
"tsconfig.json"
|
69
|
+
end
|
70
|
+
|
71
|
+
# Remove the Webpacker config and deploy shakapacker
|
60
72
|
migrate_shakapacker
|
61
73
|
|
62
74
|
# Update JS dependencies
|
63
75
|
install_decidim_npm
|
64
76
|
end
|
77
|
+
end
|
65
78
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
79
|
+
def migrate_shakapacker
|
80
|
+
remove_file_from_application "config/webpacker.yml"
|
81
|
+
remove_file_from_application "bin/webpack"
|
82
|
+
remove_file_from_application "bin/webpack-dev-server"
|
70
83
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
84
|
+
unless File.exist?(rails_app_path.join("config/shakapacker.yml"))
|
85
|
+
copy_file_to_application "decidim-core/lib/decidim/webpacker/shakapacker.yml", "config/shakapacker.yml"
|
86
|
+
remove_folder_from_application "config/webpack"
|
87
|
+
end
|
75
88
|
|
76
|
-
|
89
|
+
copy_folder_to_application "decidim-core/lib/decidim/webpacker/webpack", "config"
|
77
90
|
|
78
|
-
|
91
|
+
system!("bin/rails shakapacker:binstubs") unless File.exist?(rails_app_path.join("bin/shakapacker"))
|
79
92
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
93
|
+
# Modify the webpack binstubs
|
94
|
+
add_binstub_load_path "bin/shakapacker"
|
95
|
+
add_binstub_load_path "bin/shakapacker-dev-server"
|
96
|
+
end
|
84
97
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
end
|
98
|
+
def install_decidim_npm
|
99
|
+
decidim_npm_packages.each do |type, packages|
|
100
|
+
system! "npm i --save-#{type} #{packages.join(" ")}"
|
89
101
|
end
|
102
|
+
end
|
90
103
|
|
91
|
-
|
92
|
-
|
93
|
-
|
104
|
+
def add_decidim_browserslist_configuration
|
105
|
+
package = JSON.parse(File.read(rails_app_path.join("package.json")))
|
106
|
+
return if package["browserslist"].is_a?(Array) && package["browserslist"].include?("extends @decidim/browserslist-config")
|
94
107
|
|
95
|
-
|
96
|
-
|
97
|
-
|
108
|
+
package["browserslist"] = ["extends @decidim/browserslist-config"]
|
109
|
+
File.write(rails_app_path.join("package.json"), JSON.pretty_generate(package))
|
110
|
+
end
|
98
111
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
if gem_path
|
103
|
-
package_spec = "./packages/%s"
|
104
|
-
|
105
|
-
# The packages folder needs to be copied to the application folder
|
106
|
-
# because the linked dependencies are not installed when packages
|
107
|
-
# are installed using file references outside the application root
|
108
|
-
# where the `package.json` is located at. For more information, see:
|
109
|
-
# https://github.com/npm/cli/issues/2339
|
110
|
-
FileUtils.rm_rf(rails_app_path.join("packages"))
|
111
|
-
FileUtils.cp_r(gem_path.join("packages"), rails_app_path)
|
112
|
-
else
|
113
|
-
package_spec = "@decidim/%s@~#{Decidim::GemManager.semver_friendly_version(decidim_gemspec.version.to_s)}"
|
114
|
-
end
|
112
|
+
def decidim_npm_packages
|
113
|
+
gem_path = unreleased_gem_path
|
115
114
|
|
116
|
-
|
115
|
+
if gem_path
|
116
|
+
package_spec = "./packages/%s"
|
117
|
+
|
118
|
+
# The packages folder needs to be copied to the application folder
|
119
|
+
# because the linked dependencies are not installed when packages
|
120
|
+
# are installed using file references outside the application root
|
121
|
+
# where the `package.json` is located at. For more information, see:
|
122
|
+
# https://github.com/npm/cli/issues/2339
|
123
|
+
FileUtils.rm_rf(rails_app_path.join("packages"))
|
124
|
+
FileUtils.cp_r(gem_path.join("packages"), rails_app_path)
|
125
|
+
else
|
126
|
+
package_spec = "@decidim/%s@~#{Decidim::GemManager.semver_friendly_version(decidim_gemspec.version.to_s)}"
|
117
127
|
end
|
118
128
|
|
119
|
-
|
120
|
-
|
121
|
-
return if released_version?
|
129
|
+
local_npm_dependencies.transform_values { |names| names.map { |name| format(package_spec, name) } }
|
130
|
+
end
|
122
131
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
gem_path = Pathname(ENV.fetch("BUNDLE_GEMFILE", nil)).dirname.join(gem_path) if gem_path.relative?
|
127
|
-
end
|
132
|
+
def unreleased_gem_path
|
133
|
+
if decidim_gemspec.source.is_a?(Bundler::Source::Rubygems)
|
134
|
+
return if released_version?
|
128
135
|
|
129
|
-
gem_path
|
136
|
+
gem_path = Pathname(decidim_gemspec.full_gem_path)
|
137
|
+
else
|
138
|
+
gem_path = decidim_gemspec.source.path
|
139
|
+
gem_path = Pathname(ENV.fetch("BUNDLE_GEMFILE", nil)).dirname.join(gem_path) if gem_path.relative?
|
130
140
|
end
|
131
141
|
|
132
|
-
|
133
|
-
|
134
|
-
package_json = JSON.parse(File.read(decidim_path.join("package.json")))
|
135
|
-
|
136
|
-
{
|
137
|
-
prod: local_npm_dependencies_list(package_json["dependencies"]),
|
138
|
-
dev: local_npm_dependencies_list(package_json["devDependencies"])
|
139
|
-
}.freeze
|
140
|
-
end
|
141
|
-
end
|
142
|
+
gem_path
|
143
|
+
end
|
142
144
|
|
143
|
-
|
144
|
-
|
145
|
+
def local_npm_dependencies
|
146
|
+
@local_npm_dependencies ||= begin
|
147
|
+
package_json = JSON.parse(File.read(decidim_path.join("package.json")))
|
145
148
|
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
+
{
|
150
|
+
prod: local_npm_dependencies_list(package_json["dependencies"]),
|
151
|
+
dev: local_npm_dependencies_list(package_json["devDependencies"])
|
152
|
+
}.freeze
|
149
153
|
end
|
154
|
+
end
|
150
155
|
|
151
|
-
|
152
|
-
|
153
|
-
end
|
156
|
+
def local_npm_dependencies_list(deps)
|
157
|
+
return [] unless deps
|
154
158
|
|
155
|
-
|
156
|
-
|
157
|
-
|
159
|
+
deps.values
|
160
|
+
.select { |ref| ref.starts_with?("file:packages/") }
|
161
|
+
.map { |ref| ref.delete_prefix("file:packages/") }
|
162
|
+
end
|
158
163
|
|
159
|
-
|
160
|
-
|
161
|
-
|
164
|
+
def decidim_path
|
165
|
+
@decidim_path ||= Pathname.new(decidim_gemspec.full_gem_path) if Gem.loaded_specs.has_key?("decidim")
|
166
|
+
end
|
162
167
|
|
163
|
-
|
164
|
-
|
165
|
-
|
168
|
+
def decidim_gemspec
|
169
|
+
@decidim_gemspec ||= Gem.loaded_specs["decidim"]
|
170
|
+
end
|
166
171
|
|
167
|
-
|
168
|
-
|
169
|
-
|
172
|
+
def released_version?
|
173
|
+
decidim_gemspec.version.segments.last != "dev"
|
174
|
+
end
|
170
175
|
|
171
|
-
|
172
|
-
|
173
|
-
|
176
|
+
def rails_app_path
|
177
|
+
@rails_app_path ||= Rails.root
|
178
|
+
end
|
174
179
|
|
175
|
-
|
176
|
-
|
177
|
-
|
180
|
+
def copy_file_to_application(origin_path, destination_path = origin_path)
|
181
|
+
FileUtils.cp(decidim_path.join(origin_path), rails_app_path.join(destination_path))
|
182
|
+
end
|
178
183
|
|
179
|
-
|
180
|
-
|
181
|
-
|
184
|
+
def copy_folder_to_application(origin_path, destination_path = origin_path)
|
185
|
+
FileUtils.cp_r(decidim_path.join(origin_path), rails_app_path.join(destination_path))
|
186
|
+
end
|
182
187
|
|
183
|
-
|
184
|
-
|
185
|
-
|
188
|
+
def remove_file_from_application(path)
|
189
|
+
FileUtils.rm(path, force: true)
|
190
|
+
end
|
186
191
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
).size.positive?
|
192
|
+
def remove_folder_from_application(path)
|
193
|
+
FileUtils.rm_rf(path)
|
194
|
+
end
|
191
195
|
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
next unless line =~ %r{^require "bundler/setup"$}
|
196
|
+
def add_binstub_load_path(binstub_path)
|
197
|
+
file = rails_app_path.join(binstub_path)
|
198
|
+
lines = File.readlines(file)
|
196
199
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
200
|
+
# Skip if the load path is already added
|
201
|
+
return if lines.grep(
|
202
|
+
%r{^\$LOAD_PATH.unshift "#\{Gem.loaded_specs\["decidim-core"\].full_gem_path\}/lib/gem_overrides"$}
|
203
|
+
).size.positive?
|
201
204
|
|
202
|
-
|
203
|
-
|
205
|
+
contents = ""
|
206
|
+
lines.each do |line|
|
207
|
+
contents += line
|
208
|
+
next unless line =~ %r{^require "bundler/setup"$}
|
204
209
|
|
205
|
-
|
206
|
-
|
210
|
+
contents += "\n"
|
211
|
+
contents += "# Add the Decidim override load path to override webpacker functionality\n"
|
212
|
+
contents += "$LOAD_PATH.unshift \"\#{Gem.loaded_specs[\"decidim-core\"].full_gem_path}/lib/gem_overrides\"\n"
|
207
213
|
end
|
214
|
+
|
215
|
+
File.write(file, contents)
|
216
|
+
end
|
217
|
+
|
218
|
+
def system!(command)
|
219
|
+
system("cd #{rails_app_path} && #{command}") || abort("\n== Command #{command} failed ==")
|
208
220
|
end
|
209
221
|
end
|
210
222
|
|
@@ -218,9 +230,6 @@ if (config_path = Decidim::Webpacker.configuration.configuration_file)
|
|
218
230
|
)
|
219
231
|
end
|
220
232
|
|
221
|
-
# Remove the yarn install prerequisity from assets:precompile
|
222
|
-
Rake::Task["assets:precompile"].prerequisites.delete("shakapacker:yarn_install")
|
223
|
-
|
224
233
|
# Add gem overrides path to the beginning in order to override rake tasks
|
225
234
|
# Needed because of a bug in Rails 6.0 (see the overridden task for details)
|
226
235
|
$LOAD_PATH.unshift "#{Gem.loaded_specs["decidim-core"].full_gem_path}/lib/gem_overrides"
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :decidim do
|
4
|
+
namespace :upgrade do
|
5
|
+
namespace :active_storage_migrations do
|
6
|
+
desc "Migrates inline images to ActiveStorage editor_image attachments"
|
7
|
+
task :migrate_inline_images_to_active_storage, [:admin_email] => :environment do |_t, args|
|
8
|
+
user = Decidim::User.find_by(email: args[:admin_email])
|
9
|
+
|
10
|
+
raise "Invalid admin. Please, provide the email of an admin with permissions to create editor images" unless user&.admin? && user&.admin_terms_accepted?
|
11
|
+
|
12
|
+
inline_images_available_attributes.each do |model, attributes|
|
13
|
+
puts "=== Updating model #{model.name} (attributes: #{attributes.join(", ")})..."
|
14
|
+
model.all.each do |item|
|
15
|
+
attributes.each do |attribute|
|
16
|
+
item.update(attribute => rewrite_value(item.send(attribute), user))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
puts "=== Finished update of model #{model.name}\n\n"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def rewrite_value(value, user)
|
24
|
+
if value.is_a?(Hash)
|
25
|
+
value.transform_values do |nested_value|
|
26
|
+
rewrite_value(nested_value, user)
|
27
|
+
end
|
28
|
+
else
|
29
|
+
parser = Decidim::ContentParsers::InlineImagesParser.new(value, user:)
|
30
|
+
parser.rewrite
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def inline_images_available_attributes
|
35
|
+
{
|
36
|
+
"Decidim::Accountability::Result" => %w(description),
|
37
|
+
"Decidim::Proposals::Proposal" => %w(body answer cost_report execution_period),
|
38
|
+
"Decidim::Votings::Voting" => %w(description),
|
39
|
+
"Decidim::Elections::Question" => %w(description),
|
40
|
+
"Decidim::Elections::Answer" => %w(description),
|
41
|
+
"Decidim::Elections::Election" => %w(description),
|
42
|
+
"Decidim::Initiative" => %w(description answer),
|
43
|
+
"Decidim::InitiativesType" => %w(description extra_fields_legal_information),
|
44
|
+
"Decidim::Assembly" => %w(short_description description purpose_of_action composition internal_organisation announcement closing_date_reason special_features),
|
45
|
+
"Decidim::Forms::Questionnaire" => %w(description tos),
|
46
|
+
"Decidim::Forms::Question" => %w(description),
|
47
|
+
"Decidim::Organization" => %w(
|
48
|
+
welcome_notification_body
|
49
|
+
admin_terms_of_use_body
|
50
|
+
admin_terms_of_service_body
|
51
|
+
description
|
52
|
+
highlighted_content_banner_short_description
|
53
|
+
id_documents_explanation_text
|
54
|
+
),
|
55
|
+
"Decidim::StaticPage" => %w(content),
|
56
|
+
"Decidim::ContextualHelpSection" => %w(content),
|
57
|
+
"Decidim::Category" => %w(description),
|
58
|
+
"Decidim::Blogs::Post" => %w(body),
|
59
|
+
"Decidim::Pages::Page" => %w(body),
|
60
|
+
"Decidim::Sortitions::Sortition" => %w(additional_info witnesses cancel_reason),
|
61
|
+
"Decidim::Debates::Debate" => %w(description instructions information_updates conclusions),
|
62
|
+
"Decidim::Budgets::Budget" => %w(description),
|
63
|
+
"Decidim::Budgets::Project" => %w(description),
|
64
|
+
"Decidim::ConferenceSpeaker" => %w(short_bio),
|
65
|
+
"Decidim::Conferences::RegistrationType" => %w(description),
|
66
|
+
"Decidim::Conference" => %w(short_description description objectives registration_terms),
|
67
|
+
"Decidim::ParticipatoryProcessGroup" => %w(description),
|
68
|
+
"Decidim::ParticipatoryProcess" => %w(short_description description announcement),
|
69
|
+
"Decidim::ParticipatoryProcessStep" => %w(description),
|
70
|
+
"Decidim::Meetings::AgendaItem" => %w(description),
|
71
|
+
"Decidim::Meetings::Meeting" => %w(registration_terms description registration_email_custom_content closing_report)
|
72
|
+
}.each_with_object({}) do |(main_model, attributes), hash|
|
73
|
+
hash[main_model.constantize] = attributes
|
74
|
+
rescue NameError
|
75
|
+
hash
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|