decidim-core 0.28.5 → 0.29.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (714) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/cells/decidim/activities_cell.rb +0 -1
  4. data/app/cells/decidim/activity_cell.rb +7 -6
  5. data/app/cells/decidim/address/online.erb +2 -2
  6. data/app/cells/decidim/address_cell.rb +3 -9
  7. data/app/cells/decidim/amendable/amend_button_card_cell.rb +0 -2
  8. data/app/cells/decidim/amendable/amendments_cell.rb +0 -2
  9. data/app/cells/decidim/amendable/announcement_cell.rb +10 -14
  10. data/app/cells/decidim/amendable/emendation_actions_cell.rb +0 -2
  11. data/app/cells/decidim/amendable/promote_button_card_cell.rb +0 -2
  12. data/app/cells/decidim/amendable/wizard_step_form_cell.rb +6 -19
  13. data/app/cells/decidim/announcement/show.erb +1 -1
  14. data/app/cells/decidim/announcement_cell.rb +6 -2
  15. data/app/cells/decidim/attachments_file_tab/show.erb +3 -0
  16. data/app/cells/decidim/attachments_file_tab_cell.rb +11 -0
  17. data/app/cells/decidim/attachments_link_tab/show.erb +12 -0
  18. data/app/cells/decidim/attachments_link_tab_cell.rb +21 -0
  19. data/app/cells/decidim/author/flag.erb +2 -2
  20. data/app/cells/decidim/author/show.erb +4 -5
  21. data/app/cells/decidim/author_cell.rb +0 -28
  22. data/app/cells/decidim/authorization_modal_cell.rb +0 -3
  23. data/app/cells/decidim/badge_cell.rb +0 -4
  24. data/app/cells/decidim/badges_cell.rb +0 -2
  25. data/app/cells/decidim/button_cell.rb +0 -3
  26. data/app/cells/decidim/card_cell.rb +1 -5
  27. data/app/cells/decidim/card_g/show.erb +1 -1
  28. data/app/cells/decidim/card_g_cell.rb +4 -7
  29. data/app/cells/decidim/card_l/image.erb +2 -2
  30. data/app/cells/decidim/card_l/space.erb +1 -1
  31. data/app/cells/decidim/card_l_cell.rb +3 -8
  32. data/app/cells/decidim/card_metadata_cell.rb +1 -5
  33. data/app/cells/decidim/card_s/show.erb +3 -5
  34. data/app/cells/decidim/card_s_cell.rb +1 -4
  35. data/app/cells/decidim/coauthorships_cell.rb +0 -2
  36. data/app/cells/decidim/comments_button_cell.rb +0 -2
  37. data/app/cells/decidim/content_blocks/footer_sub_hero/show.erb +1 -1
  38. data/app/cells/decidim/content_blocks/footer_sub_hero_cell.rb +0 -3
  39. data/app/cells/decidim/content_blocks/hero/show.erb +1 -1
  40. data/app/cells/decidim/content_blocks/hero_cell.rb +1 -2
  41. data/app/cells/decidim/content_blocks/highlighted_content_banner/show.erb +1 -1
  42. data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +0 -2
  43. data/app/cells/decidim/content_blocks/how_to_participate/show.erb +1 -1
  44. data/app/cells/decidim/content_blocks/how_to_participate_cell.rb +0 -1
  45. data/app/cells/decidim/content_blocks/participatory_space_documents/content.erb +1 -1
  46. data/app/cells/decidim/content_blocks/participatory_space_documents_cell.rb +17 -1
  47. data/app/cells/decidim/content_blocks/participatory_space_hero_cell.rb +2 -4
  48. data/app/cells/decidim/content_blocks/participatory_space_last_activity_cell.rb +1 -3
  49. data/app/cells/decidim/content_blocks/stats/show.erb +1 -1
  50. data/app/cells/decidim/content_blocks/stats_cell.rb +1 -1
  51. data/app/cells/decidim/content_blocks/sub_hero_cell.rb +0 -3
  52. data/app/cells/decidim/date_range/show.erb +10 -10
  53. data/app/cells/decidim/date_range_cell.rb +0 -2
  54. data/app/cells/decidim/diff_cell.rb +0 -5
  55. data/app/cells/decidim/documents_panel/show.erb +4 -0
  56. data/app/cells/decidim/documents_panel_cell.rb +9 -1
  57. data/app/cells/decidim/endorsement_buttons_cell.rb +6 -14
  58. data/app/cells/decidim/flag_modal/flag_user.erb +3 -3
  59. data/app/cells/decidim/followers_cell.rb +0 -1
  60. data/app/cells/decidim/following_cell.rb +0 -1
  61. data/app/cells/decidim/footer_topics/show.erb +8 -0
  62. data/app/cells/decidim/footer_topics_cell.rb +39 -0
  63. data/app/cells/decidim/groups_cell.rb +0 -3
  64. data/app/cells/decidim/linked_resources_for_cell.rb +0 -3
  65. data/app/cells/decidim/members_cell.rb +0 -1
  66. data/app/cells/decidim/nav_links/show.erb +3 -3
  67. data/app/cells/decidim/navbar_admin_link_cell.rb +0 -2
  68. data/app/cells/decidim/newsletter_templates/base_cell.rb +0 -1
  69. data/app/cells/decidim/newsletter_templates/basic_only_text/show.erb +2 -2
  70. data/app/cells/decidim/newsletter_templates/image_text_cta/show.erb +2 -2
  71. data/app/cells/decidim/newsletter_templates/image_text_cta_cell.rb +1 -1
  72. data/app/cells/decidim/notification/show.erb +5 -0
  73. data/app/cells/decidim/notification_actions/base_cell.rb +13 -0
  74. data/app/cells/decidim/notification_actions/buttons/show.erb +5 -0
  75. data/app/cells/decidim/notification_actions/buttons_cell.rb +41 -0
  76. data/app/cells/decidim/notification_cell.rb +9 -3
  77. data/app/cells/decidim/notifications_cell.rb +0 -1
  78. data/app/cells/decidim/pad_iframe/show.erb +2 -2
  79. data/app/cells/decidim/pad_iframe_cell.rb +0 -1
  80. data/app/cells/decidim/participatory_space_dropdown_metadata_cell.rb +1 -2
  81. data/app/cells/decidim/photo_cell.rb +1 -5
  82. data/app/cells/decidim/photos_list_cell.rb +0 -2
  83. data/app/cells/decidim/profile_cell.rb +0 -2
  84. data/app/cells/decidim/profile_sidebar/show.erb +20 -20
  85. data/app/cells/decidim/profile_sidebar_cell.rb +1 -10
  86. data/app/cells/decidim/progress_bar/show.erb +8 -6
  87. data/app/cells/decidim/public_participation/show.erb +1 -1
  88. data/app/cells/decidim/report_button/flag_modal.erb +1 -1
  89. data/app/cells/decidim/resource_types_filter/show.erb +12 -11
  90. data/app/cells/decidim/resource_types_filter_cell.rb +0 -2
  91. data/app/cells/decidim/scopes_picker/show.erb +1 -1
  92. data/app/cells/decidim/scopes_picker_cell.rb +0 -1
  93. data/app/cells/decidim/search_results_cell.rb +1 -1
  94. data/app/cells/decidim/statistic_cell.rb +0 -2
  95. data/app/cells/decidim/tab_panels/show.erb +1 -1
  96. data/app/cells/decidim/tab_panels_cell.rb +12 -2
  97. data/app/cells/decidim/tags_cell.rb +0 -2
  98. data/app/cells/decidim/tos_page_cell.rb +0 -3
  99. data/app/cells/decidim/translation_bar/show.erb +2 -2
  100. data/app/cells/decidim/translation_bar_cell.rb +1 -3
  101. data/app/cells/decidim/upload_modal/files.erb +1 -1
  102. data/app/cells/decidim/upload_modal_cell.rb +1 -3
  103. data/app/cells/decidim/user_conversation/new.erb +1 -1
  104. data/app/cells/decidim/user_conversation/show.erb +1 -1
  105. data/app/cells/decidim/user_conversation_cell.rb +0 -1
  106. data/app/cells/decidim/user_conversations/show.erb +1 -1
  107. data/app/cells/decidim/user_conversations_cell.rb +0 -1
  108. data/app/cells/decidim/user_group_pending_invitations_list_cell.rb +0 -1
  109. data/app/cells/decidim/user_group_pending_requests_list_cell.rb +0 -1
  110. data/app/cells/decidim/user_timeline/show.erb +1 -1
  111. data/app/cells/decidim/version_cell.rb +3 -5
  112. data/app/cells/decidim/versions_list_cell.rb +1 -3
  113. data/app/cells/decidim/versions_list_item_cell.rb +2 -4
  114. data/app/cells/decidim/wizard_step_form/wizard_aside.erb +2 -2
  115. data/app/cells/decidim/wizard_step_form/wizard_header.erb +2 -3
  116. data/app/cells/decidim/wizard_step_form_cell.rb +0 -8
  117. data/app/commands/decidim/amendable/create_draft.rb +4 -4
  118. data/app/commands/decidim/amendable/promote.rb +3 -2
  119. data/app/commands/decidim/amendable/publish_draft.rb +3 -2
  120. data/app/commands/decidim/amendable/update_draft.rb +4 -3
  121. data/app/commands/decidim/amendable/withdraw.rb +1 -1
  122. data/app/commands/decidim/create_follow.rb +4 -4
  123. data/app/commands/decidim/create_omniauth_registration.rb +4 -10
  124. data/app/commands/decidim/create_report.rb +3 -3
  125. data/app/commands/decidim/create_user_report.rb +5 -5
  126. data/app/commands/decidim/delete_follow.rb +4 -4
  127. data/app/commands/decidim/demote_membership.rb +2 -2
  128. data/app/commands/decidim/destroy_account.rb +21 -22
  129. data/app/commands/decidim/endorse_resource.rb +1 -1
  130. data/app/commands/decidim/invite_user_to_group.rb +5 -4
  131. data/app/commands/decidim/update_account.rb +24 -22
  132. data/app/commands/decidim/update_notifications_settings.rb +13 -11
  133. data/app/commands/decidim/update_password.rb +7 -7
  134. data/app/commands/decidim/update_user_interests.rb +9 -7
  135. data/app/controllers/concerns/decidim/devise_authentication_methods.rb +1 -1
  136. data/app/controllers/concerns/decidim/devise_controllers.rb +2 -1
  137. data/app/controllers/concerns/decidim/filter_resource.rb +1 -1
  138. data/app/controllers/concerns/decidim/needs_rtl_direction.rb +23 -0
  139. data/app/controllers/concerns/decidim/paginable.rb +1 -1
  140. data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -23
  141. data/app/controllers/concerns/decidim/payload_info.rb +2 -1
  142. data/app/controllers/concerns/decidim/registers_permissions.rb +4 -4
  143. data/app/controllers/concerns/decidim/use_organization_time_zone.rb +1 -1
  144. data/app/controllers/concerns/decidim/withdrawable.rb +1 -1
  145. data/app/controllers/decidim/account_controller.rb +2 -2
  146. data/app/controllers/{concerns/decidim → decidim}/amendments_controller.rb +3 -16
  147. data/app/controllers/decidim/application_controller.rb +1 -1
  148. data/app/controllers/decidim/components/base_controller.rb +1 -1
  149. data/app/controllers/decidim/devise/invitations_controller.rb +1 -1
  150. data/app/controllers/decidim/devise/passwords_controller.rb +2 -2
  151. data/app/controllers/decidim/doorkeeper/credentials_controller.rb +1 -1
  152. data/app/controllers/decidim/endorsements_controller.rb +1 -1
  153. data/app/controllers/decidim/favicon_controller.rb +1 -1
  154. data/app/controllers/decidim/follows_controller.rb +2 -2
  155. data/app/controllers/decidim/group_invites_controller.rb +36 -9
  156. data/app/controllers/decidim/links_controller.rb +1 -1
  157. data/app/controllers/decidim/newsletters_opt_in_controller.rb +1 -1
  158. data/app/controllers/decidim/notifications_settings_controller.rb +1 -1
  159. data/app/controllers/decidim/profiles_controller.rb +0 -4
  160. data/app/controllers/decidim/report_users_controller.rb +1 -1
  161. data/app/controllers/decidim/reports_controller.rb +1 -1
  162. data/app/controllers/decidim/user_interests_controller.rb +1 -1
  163. data/app/events/decidim/change_nickname_event.rb +0 -1
  164. data/app/events/decidim/invited_to_group_event.rb +29 -0
  165. data/app/events/decidim/welcome_notification_event.rb +2 -4
  166. data/app/forms/decidim/form.rb +4 -0
  167. data/app/forms/decidim/omniauth_registration_form.rb +1 -1
  168. data/app/forms/decidim/upload_validation_form.rb +2 -2
  169. data/app/helpers/concerns/decidim/flash_helper_extensions.rb +1 -1
  170. data/app/helpers/decidim/amendments_helper.rb +4 -14
  171. data/app/helpers/decidim/application_helper.rb +8 -0
  172. data/app/helpers/decidim/authorization_form_helper.rb +2 -2
  173. data/app/helpers/decidim/breadcrumb_helper.rb +1 -1
  174. data/app/helpers/decidim/cells_helper.rb +1 -1
  175. data/app/helpers/decidim/check_boxes_tree_helper.rb +1 -1
  176. data/app/helpers/decidim/cta_button_helper.rb +1 -1
  177. data/app/helpers/decidim/datalist_select_helper.rb +1 -1
  178. data/app/helpers/decidim/decidim_form_helper.rb +3 -3
  179. data/app/helpers/decidim/filters_helper.rb +1 -1
  180. data/app/helpers/decidim/layout_helper.rb +1 -64
  181. data/app/helpers/decidim/localized_locales_helper.rb +1 -1
  182. data/app/helpers/decidim/map_helper.rb +1 -6
  183. data/app/helpers/decidim/menu_helper.rb +9 -1
  184. data/app/helpers/decidim/meta_tags_helper.rb +26 -23
  185. data/app/helpers/decidim/modal_helper.rb +1 -1
  186. data/app/helpers/decidim/orders_helper.rb +1 -1
  187. data/app/helpers/decidim/organization_helper.rb +55 -0
  188. data/app/helpers/decidim/paginate_helper.rb +5 -3
  189. data/app/helpers/decidim/resource_helper.rb +0 -7
  190. data/app/helpers/decidim/sanitize_helper.rb +2 -11
  191. data/app/helpers/decidim/scopes_helper.rb +3 -4
  192. data/app/helpers/decidim/searches_helper.rb +1 -1
  193. data/app/helpers/decidim/short_link_helper.rb +2 -2
  194. data/app/helpers/decidim/translations_helper.rb +2 -2
  195. data/app/helpers/decidim/twitter_search_helper.rb +1 -1
  196. data/app/helpers/decidim/user_profile_helper.rb +0 -1
  197. data/app/jobs/decidim/email_notifications_digest_generator_job.rb +2 -2
  198. data/app/mailers/decidim/application_mailer.rb +6 -2
  199. data/app/mailers/decidim/block_user_mailer.rb +1 -1
  200. data/app/mailers/decidim/decidim_devise_mailer.rb +7 -1
  201. data/app/mailers/decidim/newsletter_mailer.rb +1 -4
  202. data/app/mailers/decidim/newsletters_opt_in_mailer.rb +2 -2
  203. data/app/mailers/decidim/notification_mailer.rb +0 -1
  204. data/app/mailers/decidim/notifications_digest_mailer.rb +0 -1
  205. data/app/mailers/decidim/reported_mailer.rb +6 -3
  206. data/app/mailers/decidim/user_report_mailer.rb +1 -1
  207. data/app/models/decidim/action_log.rb +2 -12
  208. data/app/models/decidim/area_type.rb +1 -1
  209. data/app/models/decidim/attachment.rb +28 -4
  210. data/app/models/decidim/authorization.rb +1 -1
  211. data/app/models/decidim/authorization_transfer.rb +1 -0
  212. data/app/models/decidim/component.rb +3 -6
  213. data/app/models/decidim/content_block.rb +3 -3
  214. data/app/models/decidim/messaging/message.rb +2 -2
  215. data/app/models/decidim/newsletter.rb +9 -9
  216. data/app/models/decidim/notification.rb +2 -2
  217. data/app/models/decidim/organization.rb +23 -2
  218. data/app/models/decidim/push_notification_message.rb +1 -1
  219. data/app/models/decidim/resource_link.rb +1 -1
  220. data/app/models/decidim/user.rb +14 -14
  221. data/app/models/decidim/user_group.rb +2 -2
  222. data/app/packs/src/decidim/a11y.js +61 -11
  223. data/app/packs/src/decidim/append_redirect_url_to_modals.js +14 -24
  224. data/app/packs/src/decidim/attachments/file_or_link_tabs.js +55 -0
  225. data/app/packs/src/decidim/attachments/index.js +1 -0
  226. data/app/packs/src/decidim/back_to_list.js +1 -1
  227. data/app/packs/src/decidim/check_boxes_tree.js +1 -1
  228. data/app/packs/src/decidim/data_consent/consent_manager.js +1 -1
  229. data/app/packs/src/decidim/data_consent/consent_manager.test.js +6 -6
  230. data/app/packs/src/decidim/data_consent/index.js +1 -1
  231. data/app/packs/src/decidim/datepicker/datepicker_functions.js +243 -0
  232. data/app/packs/src/decidim/datepicker/datepicker_listeners.js +78 -0
  233. data/app/packs/src/decidim/datepicker/form_datepicker.js +91 -0
  234. data/app/packs/src/decidim/datepicker/generate_datepicker.js +148 -0
  235. data/app/packs/src/decidim/datepicker/generate_timepicker.js +298 -0
  236. data/app/packs/src/decidim/datepicker/test/date.test.js +118 -0
  237. data/app/packs/src/decidim/datepicker/test/time.test.js +227 -0
  238. data/app/packs/src/decidim/direct_uploads/upload_field.js +8 -21
  239. data/app/packs/src/decidim/direct_uploads/upload_modal.js +0 -3
  240. data/app/packs/src/decidim/editor/extensions/indent/index.js +1 -1
  241. data/app/packs/src/decidim/editor/extensions/video_embed/index.js +4 -4
  242. data/app/packs/src/decidim/editor/test/extensions/decidim_kit.test.js +0 -15
  243. data/app/packs/src/decidim/editor/test/extensions/indent.test.js +1 -1
  244. data/app/packs/src/decidim/editor/test/fixtures/upload_templates.js +1 -1
  245. data/app/packs/src/decidim/editor/test/helpers.js +1 -14
  246. data/app/packs/src/decidim/editor/utilities/paste_transform.js +2 -2
  247. data/app/packs/src/decidim/external_domain_warning.js +2 -2
  248. data/app/packs/src/decidim/external_domain_warning.test.js +4 -4
  249. data/app/packs/src/decidim/form_filter.js +4 -4
  250. data/app/packs/src/decidim/impersonation.js +1 -1
  251. data/app/packs/src/decidim/index.js +11 -8
  252. data/app/packs/src/decidim/input_character_counter.js +2 -2
  253. data/app/packs/src/decidim/input_emoji.js +171 -72
  254. data/app/packs/src/decidim/input_hashtags.js +1 -1
  255. data/app/packs/src/decidim/input_mentions.js +1 -1
  256. data/app/packs/src/decidim/notifications_actions.js +40 -0
  257. data/app/packs/src/decidim/sticky_header.js +87 -0
  258. data/app/packs/src/decidim/sw/sw.js +8 -6
  259. data/app/packs/src/decidim/toggle.js +1 -1
  260. data/app/packs/src/decidim/tooltips.js +23 -43
  261. data/app/packs/stylesheets/decidim/_buttons.scss +1 -1
  262. data/app/packs/stylesheets/decidim/_datepicker.scss +193 -0
  263. data/app/packs/stylesheets/decidim/_dropdown.scss +45 -9
  264. data/app/packs/stylesheets/decidim/_emoji.scss +36 -0
  265. data/app/packs/stylesheets/decidim/_filters.scss +4 -2
  266. data/app/packs/stylesheets/decidim/_flash.scss +2 -2
  267. data/app/packs/stylesheets/decidim/_footer.scss +1 -3
  268. data/app/packs/stylesheets/decidim/_forms.scss +13 -5
  269. data/app/packs/stylesheets/decidim/_header.scss +70 -50
  270. data/app/packs/stylesheets/decidim/_home.scss +1 -1
  271. data/app/packs/stylesheets/decidim/_layout.scss +13 -0
  272. data/app/packs/stylesheets/decidim/_modal.scss +1 -1
  273. data/app/packs/stylesheets/decidim/_modal_update.scss +1 -5
  274. data/app/packs/stylesheets/decidim/_notifications.scss +4 -0
  275. data/app/packs/stylesheets/decidim/_profile.scss +1 -1
  276. data/app/packs/stylesheets/decidim/_progress-bar.scss +1 -1
  277. data/app/packs/stylesheets/decidim/_tabs_x.scss +5 -1
  278. data/app/packs/stylesheets/decidim/_tooltip.scss +10 -10
  279. data/app/packs/stylesheets/decidim/application.scss +4 -0
  280. data/app/packs/stylesheets/decidim/editor.scss +1 -1
  281. data/app/packs/stylesheets/decidim/legacy/conference-diploma.scss +1 -2
  282. data/app/packs/stylesheets/decidim/legacy/leaflet.scss +1 -1
  283. data/app/packs/stylesheets/decidim/vendor/_datepicker_light.scss +228 -0
  284. data/app/permissions/decidim/default_permissions.rb +2 -2
  285. data/app/presenters/decidim/admin_log/organization_presenter.rb +1 -1
  286. data/app/presenters/decidim/admin_log/static_page_presenter.rb +1 -1
  287. data/app/presenters/decidim/attachment_presenter.rb +1 -1
  288. data/app/presenters/decidim/authorization_transfer_presenter.rb +1 -1
  289. data/app/presenters/decidim/component_attachment_collection_presenter.rb +81 -0
  290. data/app/presenters/decidim/footer_menu_presenter.rb +1 -1
  291. data/app/presenters/decidim/home_stats_presenter.rb +1 -1
  292. data/app/presenters/decidim/menu_item_presenter.rb +1 -1
  293. data/app/presenters/decidim/organization_presenter.rb +1 -1
  294. data/app/queries/decidim/last_activity.rb +5 -16
  295. data/app/queries/decidim/metric_measure.rb +1 -1
  296. data/app/queries/decidim/public_activities.rb +1 -1
  297. data/app/queries/decidim/user_groups/admin_memberships.rb +1 -1
  298. data/app/queries/decidim/user_groups/member_memberships.rb +1 -1
  299. data/app/services/decidim/action_logger.rb +3 -3
  300. data/app/services/decidim/base_diff_renderer.rb +2 -26
  301. data/app/services/decidim/download_your_data_exporter.rb +25 -36
  302. data/app/services/decidim/email_notification_generator.rb +5 -14
  303. data/app/services/decidim/log/diff_changeset_calculator.rb +2 -2
  304. data/app/services/decidim/notifications_digest_sending_decider.rb +1 -1
  305. data/app/services/decidim/open_data_exporter.rb +7 -8
  306. data/app/services/decidim/zip_stream/writer.rb +39 -0
  307. data/app/uploaders/decidim/organization_favicon_uploader.rb +1 -1
  308. data/app/uploaders/decidim/record_image_uploader.rb +2 -2
  309. data/app/validators/organization_present_validator.rb +1 -1
  310. data/app/validators/passthru_validator.rb +1 -1
  311. data/app/validators/uploader_image_dimensions_validator.rb +2 -2
  312. data/app/views/decidim/account/show.html.erb +1 -1
  313. data/app/views/decidim/amendments/_wizard_header.html.erb +1 -2
  314. data/app/views/decidim/application/_collection.html.erb +3 -1
  315. data/app/views/decidim/application/_component_documents.html.erb +4 -0
  316. data/app/views/decidim/application/_document.html.erb +23 -9
  317. data/app/views/decidim/block_user_mailer/notify.html.erb +2 -2
  318. data/app/views/decidim/devise/invitations/edit.html.erb +2 -2
  319. data/app/views/decidim/devise/omniauth_registrations/new.html.erb +2 -2
  320. data/app/views/decidim/devise/registrations/new.html.erb +1 -1
  321. data/app/views/decidim/devise/shared/_login_boxes.html.erb +1 -1
  322. data/app/views/decidim/doorkeeper/authorizations/new.html.erb +1 -1
  323. data/app/views/decidim/endorsements/_identity.html.erb +1 -1
  324. data/app/views/decidim/gamification/badges/index.html.erb +1 -1
  325. data/app/views/decidim/manifests/show.json.erb +4 -4
  326. data/app/views/decidim/messaging/conversations/_add_conversation_users.html.erb +2 -2
  327. data/app/views/decidim/messaging/conversations/_error_modal.html.erb +5 -5
  328. data/app/views/decidim/newsletter_mailer/newsletter.html.erb +1 -1
  329. data/app/views/decidim/newsletters/show.html.erb +1 -1
  330. data/app/views/decidim/newsletters_opt_in_mailer/notify.html.erb +2 -2
  331. data/app/views/decidim/offline/show.html.erb +1 -1
  332. data/app/views/decidim/pages/_tabbed.html.erb +5 -5
  333. data/app/views/decidim/pages/index.html.erb +1 -2
  334. data/app/views/decidim/reported_mailer/report.html.erb +4 -2
  335. data/app/views/decidim/scopes/picker.html.erb +5 -5
  336. data/app/views/decidim/searches/_resources_filter_block.html.erb +6 -6
  337. data/app/views/decidim/shared/_extended_navigation_bar.html.erb +8 -8
  338. data/app/views/decidim/shared/_filters.html.erb +5 -5
  339. data/app/views/decidim/shared/_login_modal.html.erb +1 -1
  340. data/app/views/decidim/shared/_orders.html.erb +2 -3
  341. data/app/views/decidim/shared/filters/_check_boxes_tree.html.erb +1 -1
  342. data/app/views/decidim/shared/filters/_collection.html.erb +1 -1
  343. data/app/views/decidim/user_interests/_areas.html.erb +2 -2
  344. data/app/views/decidim/user_report_mailer/notify.html.erb +2 -2
  345. data/app/views/decidim/user_update_mailer/notify.html.erb +1 -1
  346. data/app/views/decidim/widgets/_data_picker.html.erb +1 -1
  347. data/app/views/devise/mailer/invitation_instructions.html.erb +1 -1
  348. data/app/views/devise/mailer/invitation_instructions.text.erb +1 -1
  349. data/app/views/devise/mailer/invite_admin.html.erb +2 -2
  350. data/app/views/devise/mailer/invite_admin.text.erb +2 -2
  351. data/app/views/devise/mailer/invite_collaborator.html.erb +2 -2
  352. data/app/views/devise/mailer/invite_collaborator.text.erb +2 -2
  353. data/app/views/devise/mailer/invite_private_user.html.erb +2 -2
  354. data/app/views/devise/mailer/invite_private_user.text.erb +2 -2
  355. data/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb +1 -1
  356. data/app/views/devise/mailer/organization_admin_invitation_instructions.text.erb +1 -1
  357. data/app/views/layouts/decidim/_application.html.erb +3 -6
  358. data/app/views/layouts/decidim/_data_consent_warning.html.erb +2 -2
  359. data/app/views/layouts/decidim/_decidim_javascript.html.erb +1 -1
  360. data/app/views/layouts/decidim/_head.html.erb +1 -1
  361. data/app/views/layouts/decidim/_head_extra.html.erb +2 -2
  362. data/app/views/layouts/decidim/_impersonation_warning.html.erb +1 -1
  363. data/app/views/layouts/decidim/_js_configuration.html.erb +7 -2
  364. data/app/views/layouts/decidim/_logo.html.erb +2 -2
  365. data/app/views/layouts/decidim/_logo_mobile.html.erb +11 -0
  366. data/app/views/layouts/decidim/_mailer_logo.html.erb +2 -2
  367. data/app/views/layouts/decidim/_meta_tags_config.html.erb +1 -1
  368. data/app/views/layouts/decidim/_wrapper.html.erb +16 -9
  369. data/app/views/layouts/decidim/footer/_main.html.erb +2 -3
  370. data/app/views/layouts/decidim/footer/_main_intro.html.erb +2 -2
  371. data/app/views/layouts/decidim/footer/_main_legal.html.erb +2 -3
  372. data/app/views/layouts/decidim/footer/_main_links.html.erb +13 -11
  373. data/app/views/layouts/decidim/footer/_main_social_media_links.html.erb +8 -8
  374. data/app/views/layouts/decidim/header/_main.html.erb +9 -22
  375. data/app/views/layouts/decidim/header/_main_links_desktop.html.erb +4 -5
  376. data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +11 -4
  377. data/app/views/layouts/decidim/header/_main_links_mobile_item_account.html.erb +24 -0
  378. data/app/views/layouts/decidim/header/_main_links_mobile_search.html.erb +0 -21
  379. data/app/views/layouts/decidim/header/_main_menu_mobile.html.erb +12 -0
  380. data/app/views/layouts/decidim/header/_menu_breadcrumb_desktop.html.erb +1 -1
  381. data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_mobile.html.erb +17 -0
  382. data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_top_left.html.erb +1 -1
  383. data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +1 -1
  384. data/app/views/layouts/decidim/header/_menu_form_search_mobile.html.erb +16 -0
  385. data/app/views/layouts/decidim/header/_mobile_language_choose.html.erb +25 -0
  386. data/app/views/layouts/decidim/mailer.html.erb +2 -2
  387. data/app/views/layouts/decidim/shared/_layout_center.html.erb +1 -1
  388. data/app/views/layouts/decidim/shared/_layout_item.html.erb +0 -14
  389. data/app/views/layouts/decidim/shared/_layout_user_profile.html.erb +2 -2
  390. data/config/initializers/active_storage.rb +3 -0
  391. data/config/initializers/devise.rb +1 -1
  392. data/config/initializers/new_framework_defaults_7_0.rb +145 -0
  393. data/config/locales/ar.yml +3 -54
  394. data/config/locales/bg.yml +56 -57
  395. data/config/locales/ca.yml +78 -71
  396. data/config/locales/cs.yml +54 -63
  397. data/config/locales/de.yml +77 -70
  398. data/config/locales/el.yml +1 -32
  399. data/config/locales/en.yml +69 -62
  400. data/config/locales/es-MX.yml +69 -62
  401. data/config/locales/es-PY.yml +69 -62
  402. data/config/locales/es.yml +74 -67
  403. data/config/locales/eu.yml +251 -257
  404. data/config/locales/fi-plain.yml +70 -63
  405. data/config/locales/fi.yml +128 -121
  406. data/config/locales/fr-CA.yml +62 -61
  407. data/config/locales/fr.yml +56 -55
  408. data/config/locales/ga-IE.yml +0 -16
  409. data/config/locales/gl.yml +1 -22
  410. data/config/locales/hu.yml +38 -57
  411. data/config/locales/id-ID.yml +0 -18
  412. data/config/locales/is-IS.yml +1 -17
  413. data/config/locales/it.yml +0 -65
  414. data/config/locales/ja.yml +83 -74
  415. data/config/locales/lb.yml +0 -30
  416. data/config/locales/lt.yml +2 -49
  417. data/config/locales/lv.yml +0 -25
  418. data/config/locales/nl.yml +1 -30
  419. data/config/locales/no.yml +0 -30
  420. data/config/locales/pl.yml +69 -57
  421. data/config/locales/pt-BR.yml +5 -250
  422. data/config/locales/pt.yml +0 -36
  423. data/config/locales/ro-RO.yml +180 -329
  424. data/config/locales/ru.yml +0 -19
  425. data/config/locales/sk.yml +1 -26
  426. data/config/locales/sl.yml +0 -8
  427. data/config/locales/sv.yml +164 -605
  428. data/config/locales/tr-TR.yml +5 -33
  429. data/config/locales/uk.yml +1 -14
  430. data/config/locales/zh-CN.yml +0 -27
  431. data/config/locales/zh-TW.yml +1 -51
  432. data/config/routes.rb +0 -2
  433. data/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb +1 -1
  434. data/db/migrate/20181025082245_add_timestamps_to_components.rb +1 -5
  435. data/db/migrate/20240110150230_rename_external_domain_whitelist_to_external_domain_allowlist.rb +7 -0
  436. data/db/migrate/20240326104215_remove_show_in_footer_in_static_pages.rb +7 -0
  437. data/db/migrate/20240401192628_change_name_on_decidim_organizations.rb +31 -0
  438. data/db/seeds/avatars/001.jpg +0 -0
  439. data/db/seeds/avatars/002.jpg +0 -0
  440. data/db/seeds/avatars/003.jpg +0 -0
  441. data/db/seeds/avatars/004.jpg +0 -0
  442. data/db/seeds/avatars/005.jpg +0 -0
  443. data/db/seeds/avatars/006.jpg +0 -0
  444. data/db/seeds/avatars/007.jpg +0 -0
  445. data/db/seeds/avatars/008.jpg +0 -0
  446. data/db/seeds/avatars/009.jpg +0 -0
  447. data/db/seeds/avatars/010.jpg +0 -0
  448. data/db/seeds/avatars/011.jpg +0 -0
  449. data/db/seeds/avatars/012.jpg +0 -0
  450. data/db/seeds/avatars/013.jpg +0 -0
  451. data/db/seeds/avatars/014.jpg +0 -0
  452. data/db/seeds/avatars/015.jpg +0 -0
  453. data/db/seeds/avatars/016.jpg +0 -0
  454. data/db/seeds/avatars/017.jpg +0 -0
  455. data/db/seeds/avatars/018.jpg +0 -0
  456. data/db/seeds/avatars/019.jpg +0 -0
  457. data/db/seeds/avatars/020.jpg +0 -0
  458. data/db/seeds/avatars/021.jpg +0 -0
  459. data/db/seeds/avatars/022.jpg +0 -0
  460. data/db/seeds/avatars/023.jpg +0 -0
  461. data/db/seeds/avatars/024.jpg +0 -0
  462. data/db/seeds/avatars/025.jpg +0 -0
  463. data/db/seeds/avatars/026.jpg +0 -0
  464. data/db/seeds/avatars/027.jpg +0 -0
  465. data/db/seeds/avatars/028.jpg +0 -0
  466. data/db/seeds/avatars/029.jpg +0 -0
  467. data/db/seeds/avatars/030.jpg +0 -0
  468. data/db/seeds/avatars/031.jpg +0 -0
  469. data/db/seeds/avatars/032.jpg +0 -0
  470. data/db/seeds/avatars/033.jpg +0 -0
  471. data/db/seeds/avatars/034.jpg +0 -0
  472. data/db/seeds/avatars/035.jpg +0 -0
  473. data/db/seeds/avatars/036.jpg +0 -0
  474. data/db/seeds/avatars/037.jpg +0 -0
  475. data/db/seeds/avatars/038.jpg +0 -0
  476. data/db/seeds/avatars/039.jpg +0 -0
  477. data/db/seeds/avatars/040.jpg +0 -0
  478. data/db/seeds/avatars/041.jpg +0 -0
  479. data/db/seeds/avatars/042.jpg +0 -0
  480. data/db/seeds/avatars/043.jpg +0 -0
  481. data/db/seeds/avatars/044.jpg +0 -0
  482. data/db/seeds/avatars/045.jpg +0 -0
  483. data/db/seeds/avatars/046.jpg +0 -0
  484. data/db/seeds/avatars/047.jpg +0 -0
  485. data/db/seeds/avatars/048.jpg +0 -0
  486. data/db/seeds/avatars/049.jpg +0 -0
  487. data/db/seeds/avatars/050.jpg +0 -0
  488. data/db/seeds/avatars/051.jpg +0 -0
  489. data/db/seeds/avatars/052.jpg +0 -0
  490. data/db/seeds/avatars/053.jpg +0 -0
  491. data/db/seeds/avatars/054.jpg +0 -0
  492. data/db/seeds/avatars/055.jpg +0 -0
  493. data/db/seeds/avatars/056.jpg +0 -0
  494. data/db/seeds/avatars/057.jpg +0 -0
  495. data/db/seeds/avatars/058.jpg +0 -0
  496. data/db/seeds/avatars/059.jpg +0 -0
  497. data/db/seeds/avatars/060.jpg +0 -0
  498. data/db/seeds/avatars/061.jpg +0 -0
  499. data/db/seeds/avatars/062.jpg +0 -0
  500. data/db/seeds/avatars/063.jpg +0 -0
  501. data/db/seeds/avatars/064.jpg +0 -0
  502. data/db/seeds/avatars/065.jpg +0 -0
  503. data/db/seeds/avatars/066.jpg +0 -0
  504. data/db/seeds/avatars/067.jpg +0 -0
  505. data/db/seeds/avatars/068.jpg +0 -0
  506. data/db/seeds/avatars/069.jpg +0 -0
  507. data/db/seeds/avatars/070.jpg +0 -0
  508. data/db/seeds/avatars/071.jpg +0 -0
  509. data/db/seeds/avatars/072.jpg +0 -0
  510. data/db/seeds/avatars/073.jpg +0 -0
  511. data/db/seeds/avatars/074.jpg +0 -0
  512. data/db/seeds/avatars/075.jpg +0 -0
  513. data/db/seeds/avatars/076.jpg +0 -0
  514. data/db/seeds/avatars/077.jpg +0 -0
  515. data/db/seeds/avatars/078.jpg +0 -0
  516. data/db/seeds/avatars/079.jpg +0 -0
  517. data/db/seeds/avatars/080.jpg +0 -0
  518. data/db/seeds/avatars/081.jpg +0 -0
  519. data/db/seeds/avatars/082.jpg +0 -0
  520. data/db/seeds/avatars/083.jpg +0 -0
  521. data/db/seeds/avatars/084.jpg +0 -0
  522. data/db/seeds/avatars/085.jpg +0 -0
  523. data/db/seeds/avatars/086.jpg +0 -0
  524. data/db/seeds/avatars/087.jpg +0 -0
  525. data/db/seeds/avatars/088.jpg +0 -0
  526. data/db/seeds/avatars/089.jpg +0 -0
  527. data/db/seeds/avatars/090.jpg +0 -0
  528. data/db/seeds/avatars/091.jpg +0 -0
  529. data/db/seeds/avatars/092.jpg +0 -0
  530. data/db/seeds/avatars/093.jpg +0 -0
  531. data/db/seeds/avatars/094.jpg +0 -0
  532. data/db/seeds/avatars/095.jpg +0 -0
  533. data/db/seeds/avatars/096.jpg +0 -0
  534. data/db/seeds/avatars/097.jpg +0 -0
  535. data/db/seeds/avatars/098.jpg +0 -0
  536. data/db/seeds/avatars/099.jpg +0 -0
  537. data/db/seeds/avatars/100.jpg +0 -0
  538. data/db/seeds/avatars/CREDITS.md +114 -0
  539. data/db/seeds/avatars/README.md +25 -0
  540. data/decidim-core.gemspec +8 -9
  541. data/lib/decidim/acts_as_author.rb +1 -1
  542. data/lib/decidim/admin_filter.rb +44 -0
  543. data/lib/decidim/admin_filters_registry.rb +55 -0
  544. data/lib/decidim/amendable.rb +1 -2
  545. data/lib/decidim/api/functions/component_finder_base.rb +1 -1
  546. data/lib/decidim/api/functions/component_list.rb +1 -1
  547. data/lib/decidim/api/functions/needs_api_filter_and_order.rb +3 -3
  548. data/lib/decidim/api/functions/participatory_space_finder_base.rb +2 -12
  549. data/lib/decidim/api/functions/participatory_space_list_base.rb +1 -1
  550. data/lib/decidim/api/input_filters/user_entity_input_filter.rb +3 -3
  551. data/lib/decidim/api/interfaces/author_interface.rb +1 -1
  552. data/lib/decidim/api/interfaces/participatory_space_interface.rb +1 -1
  553. data/lib/decidim/api/types/component_type.rb +0 -7
  554. data/lib/decidim/api/types/organization_type.rb +1 -1
  555. data/lib/decidim/api/types/user_group_type.rb +1 -5
  556. data/lib/decidim/api/types/user_type.rb +1 -5
  557. data/lib/decidim/asset_router/pipeline.rb +2 -2
  558. data/lib/decidim/asset_router/storage.rb +11 -214
  559. data/lib/decidim/assets/tailwind/instance.rb +1 -1
  560. data/lib/decidim/assets/tailwind/tailwind.config.js.erb +8 -3
  561. data/lib/decidim/attribute_object/model.rb +2 -2
  562. data/lib/decidim/attribute_object/type_resolver.rb +1 -3
  563. data/lib/decidim/attribute_object.rb +2 -2
  564. data/lib/decidim/attributes/time_with_zone.rb +1 -11
  565. data/lib/decidim/attributes.rb +0 -6
  566. data/lib/decidim/authorable.rb +5 -0
  567. data/lib/decidim/command.rb +2 -2
  568. data/lib/decidim/commands/create_resource.rb +63 -0
  569. data/lib/decidim/commands/destroy_resource.rb +74 -0
  570. data/lib/decidim/commands/hook_error.rb +8 -0
  571. data/lib/decidim/commands/resource_handler.rb +85 -0
  572. data/lib/decidim/commands/update_resource.rb +64 -0
  573. data/lib/decidim/component_manifest.rb +3 -1
  574. data/lib/decidim/component_validator.rb +1 -1
  575. data/lib/decidim/content_blocks/has_related_components.rb +1 -1
  576. data/lib/decidim/content_parsers/resource_parser.rb +2 -2
  577. data/lib/decidim/content_parsers.rb +0 -1
  578. data/lib/decidim/content_processor.rb +1 -1
  579. data/lib/decidim/content_renderers.rb +0 -1
  580. data/lib/decidim/content_security_policy.rb +1 -1
  581. data/lib/decidim/core/engine.rb +13 -58
  582. data/lib/decidim/core/menu.rb +13 -3
  583. data/lib/decidim/core/seeds.rb +120 -147
  584. data/lib/decidim/core/test/factories.rb +24 -31
  585. data/lib/decidim/core/test/shared_examples/acts_as_author_examples.rb +1 -1
  586. data/lib/decidim/core/test/shared_examples/amendable/withdraw_amendment_examples.rb +2 -2
  587. data/lib/decidim/core/test/shared_examples/announcements_examples.rb +3 -3
  588. data/lib/decidim/core/test/shared_examples/assembly_announcements_examples.rb +4 -4
  589. data/lib/decidim/core/test/shared_examples/attachable_interface_examples.rb +1 -1
  590. data/lib/decidim/core/test/shared_examples/authorable_interface_examples.rb +1 -1
  591. data/lib/decidim/core/test/shared_examples/comments_examples.rb +90 -107
  592. data/lib/decidim/core/test/shared_examples/comments_reports_examples.rb +4 -4
  593. data/lib/decidim/core/test/shared_examples/digest_mail_examples.rb +1 -1
  594. data/lib/decidim/core/test/shared_examples/edit_link_shared_examples.rb +1 -1
  595. data/lib/decidim/core/test/shared_examples/editor_shared_examples.rb +7 -7
  596. data/lib/decidim/core/test/shared_examples/fingerprint_examples.rb +1 -1
  597. data/lib/decidim/core/test/shared_examples/follows_examples.rb +6 -11
  598. data/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +4 -2
  599. data/lib/decidim/core/test/shared_examples/has_attachments.rb +3 -2
  600. data/lib/decidim/core/test/shared_examples/has_contextual_help.rb +4 -4
  601. data/lib/decidim/core/test/shared_examples/has_reference.rb +1 -1
  602. data/lib/decidim/core/test/shared_examples/logo_email.rb +1 -1
  603. data/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb +9 -9
  604. data/lib/decidim/core/test/shared_examples/map_examples.rb +5 -5
  605. data/lib/decidim/core/test/shared_examples/paginated_resource_examples.rb +7 -7
  606. data/lib/decidim/core/test/shared_examples/participatory_space_dropdown_metadata_cell_examples.rb +3 -3
  607. data/lib/decidim/core/test/shared_examples/preview_component_with_share_token_examples.rb +3 -3
  608. data/lib/decidim/core/test/shared_examples/process_announcements_examples.rb +4 -4
  609. data/lib/decidim/core/test/shared_examples/reports_examples.rb +5 -5
  610. data/lib/decidim/core/test/shared_examples/rich_text_editor_examples.rb +10 -10
  611. data/lib/decidim/core/test/shared_examples/searchable_participatory_space_examples.rb +1 -1
  612. data/lib/decidim/core/test/shared_examples/searchable_results_examples.rb +8 -8
  613. data/lib/decidim/core/test/shared_examples/share_link_examples.rb +2 -2
  614. data/lib/decidim/core/test/shared_examples/simple_event.rb +1 -1
  615. data/lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb +3 -3
  616. data/lib/decidim/core/test/shared_examples/system_endorse_resource_examples.rb +15 -113
  617. data/lib/decidim/core/test/shared_examples/translated_event_examples.rb +2 -2
  618. data/lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb +2 -2
  619. data/lib/decidim/core/test/shared_examples/with_endorsable_permissions_examples.rb +1 -1
  620. data/lib/decidim/core/version.rb +1 -1
  621. data/lib/decidim/core.rb +24 -17
  622. data/lib/decidim/dependency_resolver.rb +3 -3
  623. data/lib/decidim/diffy_extension.rb +1 -19
  624. data/lib/decidim/download_your_data_serializers/download_your_data_user_serializer.rb +2 -1
  625. data/lib/decidim/engine_router.rb +2 -2
  626. data/lib/decidim/events/base_event.rb +19 -0
  627. data/lib/decidim/events/simple_event.rb +1 -0
  628. data/lib/decidim/exporters/export_manifest.rb +1 -1
  629. data/lib/decidim/faker/localized.rb +3 -3
  630. data/lib/decidim/form_builder.rb +5 -5
  631. data/lib/decidim/hashtag.rb +1 -1
  632. data/lib/decidim/jsonb_attributes.rb +4 -4
  633. data/lib/decidim/manifest_messages.rb +2 -2
  634. data/lib/decidim/map/autocomplete.rb +0 -1
  635. data/lib/decidim/organization_settings.rb +5 -8
  636. data/lib/decidim/paddable.rb +1 -1
  637. data/lib/decidim/participable.rb +1 -1
  638. data/lib/decidim/participatory_space_manifest.rb +1 -1
  639. data/lib/decidim/participatory_space_user.rb +0 -4
  640. data/lib/decidim/query_extensions.rb +26 -0
  641. data/lib/decidim/resourceable.rb +1 -1
  642. data/lib/decidim/search_resource_fields_mapper.rb +2 -2
  643. data/lib/decidim/searchable.rb +3 -3
  644. data/lib/decidim/seeds.rb +62 -0
  645. data/lib/decidim/settings_manifest.rb +0 -2
  646. data/lib/decidim/stats_registry.rb +2 -2
  647. data/lib/decidim/translatable_attributes.rb +4 -9
  648. data/lib/decidim/translatable_resource.rb +1 -1
  649. data/lib/decidim/view_hooks.rb +1 -1
  650. data/lib/decidim/view_model.rb +5 -1
  651. data/lib/decidim/webpacker/esbuild.config.js +14 -0
  652. data/lib/decidim/webpacker/shakapacker.yml +2 -2
  653. data/lib/decidim/webpacker/tsconfig.json +11 -0
  654. data/lib/decidim/webpacker/webpack/custom.js +13 -35
  655. data/lib/devise/models/decidim_newsletterable.rb +1 -1
  656. data/lib/tasks/decidim_download_your_data_tasks.rake +2 -2
  657. data/lib/tasks/decidim_locales_tasks.rake +1 -1
  658. data/lib/tasks/decidim_mailers_tasks.rake +2 -2
  659. data/lib/tasks/decidim_metrics_tasks.rake +6 -6
  660. data/lib/tasks/decidim_procfile.rake +9 -3
  661. data/lib/tasks/decidim_tasks.rake +5 -4
  662. data/lib/tasks/decidim_webpacker_tasks.rake +126 -117
  663. data/lib/tasks/upgrade/decidim_active_storage_migration_tasks.rake +80 -0
  664. data/lib/tasks/upgrade/decidim_content_blocks_tasks.rake +50 -0
  665. data/lib/tasks/upgrade/decidim_deduplicate_endorsements.rake +1 -1
  666. data/lib/tasks/upgrade/decidim_fix_categorization.rake +6 -132
  667. data/lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake +1 -1
  668. data/lib/tasks/upgrade/decidim_fix_short_url_resolver.rake +1 -1
  669. data/lib/tasks/upgrade/decidim_moderation_tasks.rake +1 -1
  670. data/lib/tasks/upgrade/decidim_user_moderation.rake +1 -1
  671. metadata +219 -101
  672. data/app/cells/decidim/content_blocks/cta/show.erb +0 -12
  673. data/app/cells/decidim/content_blocks/cta_cell.rb +0 -31
  674. data/app/cells/decidim/footer_pages/pages.erb +0 -3
  675. data/app/cells/decidim/footer_pages/topics.erb +0 -12
  676. data/app/cells/decidim/footer_pages_cell.rb +0 -68
  677. data/app/controllers/concerns/decidim/direct_upload.rb +0 -82
  678. data/app/helpers/concerns/decidim/user_role_checker.rb +0 -46
  679. data/app/packs/src/decidim/remote_tooltips.js +0 -38
  680. data/app/packs/src/decidim/vendor/modernizr.js +0 -5
  681. data/app/queries/decidim/similar_emendations.rb +0 -56
  682. data/app/uploaders/decidim/cw/application_uploader.rb +0 -77
  683. data/app/uploaders/decidim/cw/attachment_uploader.rb +0 -56
  684. data/app/uploaders/decidim/cw/avatar_uploader.rb +0 -24
  685. data/app/uploaders/decidim/cw/banner_image_uploader.rb +0 -7
  686. data/app/uploaders/decidim/cw/download_your_data_uploader.rb +0 -15
  687. data/app/uploaders/decidim/cw/downloader.rb +0 -9
  688. data/app/uploaders/decidim/cw/hero_image_uploader.rb +0 -10
  689. data/app/uploaders/decidim/cw/homepage_image_uploader.rb +0 -14
  690. data/app/uploaders/decidim/cw/image_uploader.rb +0 -78
  691. data/app/uploaders/decidim/cw/newsletter_template_image_uploader.rb +0 -38
  692. data/app/uploaders/decidim/cw/oauth_application_logo_uploader.rb +0 -10
  693. data/app/uploaders/decidim/cw/official_image_footer_uploader.rb +0 -10
  694. data/app/uploaders/decidim/cw/official_image_header_uploader.rb +0 -10
  695. data/app/uploaders/decidim/cw/open_data_uploader.rb +0 -23
  696. data/app/uploaders/decidim/cw/organization_favicon_uploader.rb +0 -18
  697. data/app/uploaders/decidim/cw/organization_logo_uploader.rb +0 -10
  698. data/app/uploaders/decidim/cw/record_image_uploader.rb +0 -15
  699. data/app/uploaders/decidim/downloader.rb +0 -9
  700. data/app/views/decidim/amendments/compare_draft.html.erb +0 -18
  701. data/app/views/layouts/decidim/_edit_link.html.erb +0 -0
  702. data/app/views/layouts/decidim/header/_main_links_mobile.html.erb +0 -36
  703. data/config/initializers/carrierwave.rb +0 -15
  704. data/config/locales/bn-BD.yml +0 -1
  705. data/config/locales/bs-BA.yml +0 -98
  706. data/lib/decidim/attributes/rich_text.rb +0 -38
  707. data/lib/decidim/carrier_wave_migrator_service.rb +0 -287
  708. data/lib/decidim/content_parsers/blob_parser.rb +0 -93
  709. data/lib/decidim/content_renderers/blob_renderer.rb +0 -90
  710. data/lib/decidim/seven_zip_wrapper.rb +0 -29
  711. data/lib/tasks/decidim_active_storage_migration_tasks.rake +0 -114
  712. data/lib/tasks/decidim_content_blocks_tasks.rake +0 -48
  713. data/lib/tasks/upgrade/decidim_attachments.rake +0 -14
  714. /data/app/views/layouts/decidim/header/{_menu_breadcrumb_main_dropdown.html.erb → _menu_breadcrumb_main_dropdown_desktop.html.erb} +0 -0
@@ -59,7 +59,7 @@ module Decidim
59
59
  @pad_id ||= [reference, token].join("-").slice(0, 50)
60
60
  end
61
61
 
62
- # compatibilize with old versions if no salt available (less secure)
62
+ # compatibility with old versions if no salt available (less secure)
63
63
  def token
64
64
  if defined?(salt) && salt.present?
65
65
  tokenizer = Decidim::Tokenizer.new(salt:)
@@ -31,7 +31,7 @@ module Decidim
31
31
 
32
32
  def mounted_params
33
33
  {
34
- host: organization.host,
34
+ :host => organization.host,
35
35
  "#{underscored_name}_slug".to_sym => slug
36
36
  }
37
37
  end
@@ -98,7 +98,7 @@ module Decidim
98
98
  #
99
99
  # Returns nothing.
100
100
  def seed!
101
- print "Creating seeds for the #{name} space...\n" unless Rails.env.test?
101
+ print "Creating seeds for the #{name} space...\n" unless Rails.env.test? # rubocop:disable Rails/Output
102
102
  @seeds&.call
103
103
  end
104
104
 
@@ -37,10 +37,6 @@ module Decidim
37
37
  raise "Not implemented"
38
38
  end
39
39
 
40
- def self.order_by_name
41
- includes(:user).order("decidim_users.name ASC")
42
- end
43
-
44
40
  private
45
41
 
46
42
  # Private: check if the process and the user have the same organization
@@ -10,6 +10,22 @@ module Decidim
10
10
  #
11
11
  # Returns nothing.
12
12
  def self.included(type)
13
+ type.field :participatory_processes,
14
+ [Decidim::ParticipatoryProcesses::ParticipatoryProcessType],
15
+ null: true,
16
+ description: "Lists all participatory_processes" do
17
+ argument :filter, Decidim::ParticipatoryProcesses::ParticipatoryProcessInputFilter, "This argument lets you filter the results", required: false
18
+ argument :order, Decidim::ParticipatoryProcesses::ParticipatoryProcessInputSort, "This argument lets you order the results", required: false
19
+ end
20
+
21
+ type.field :participatory_process,
22
+ Decidim::ParticipatoryProcesses::ParticipatoryProcessType,
23
+ null: true,
24
+ description: "Finds a participatory_process" do
25
+ argument :id, GraphQL::Types::ID, "The ID of the participatory space", required: false
26
+ argument :slug, String, "The slug of the participatory process", required: false
27
+ end
28
+
13
29
  type.field :component, Decidim::Core::ComponentInterface, null: true do
14
30
  description "Lists the components this space contains."
15
31
  argument :id, GraphQL::Types::ID, required: true, description: "The ID of the component to be found"
@@ -46,6 +62,16 @@ module Decidim
46
62
  end
47
63
  end
48
64
 
65
+ def participatory_processes(filter: {}, order: {})
66
+ manifest = Decidim.participatory_space_manifests.select { |m| m.name == :participatory_processes }.first
67
+ Decidim::Core::ParticipatorySpaceListBase.new(manifest:).call(object, { filter:, order: }, context)
68
+ end
69
+
70
+ def participatory_process(id: nil, slug: nil)
71
+ manifest = Decidim.participatory_space_manifests.select { |m| m.name == :participatory_processes }.first
72
+ Decidim::Core::ParticipatorySpaceFinderBase.new(manifest:).call(object, { id:, slug: }, context)
73
+ end
74
+
49
75
  def component(id: {})
50
76
  component = Decidim::Component.published.find_by(id:)
51
77
  component&.organization == context[:current_organization] ? component : nil
@@ -111,7 +111,7 @@ module Decidim
111
111
  end
112
112
 
113
113
  # Check only the resource visibility not its hierarchy.
114
- # This method is intended to be overriden by classes that include this module and have the
114
+ # This method is intended to be overridden by classes that include this module and have the
115
115
  # need to impose its own visibility rules.
116
116
  #
117
117
  # @return If the resource is also Publicable checks if the resource is published, otherwise returns true by default.
@@ -13,8 +13,8 @@ module Decidim
13
13
  #
14
14
  # @param declared_fields: A Hash with the mappings between a SearchableResource attributes and
15
15
  # any given model. Mapped fields are:
16
- # - scope_id: The field where the scope is setted in the model, if any.
17
- # - participatory_space: The field where the ParticipatorySpace is setted in the model.
16
+ # - scope_id: The field where the scope is set in the model, if any.
17
+ # - participatory_space: The field where the ParticipatorySpace is set in the model.
18
18
  # - datetime: The field that describes where in time the model is placed.
19
19
  # - A, B, C, D: Weighted text fields.
20
20
  #
@@ -74,7 +74,7 @@ module Decidim
74
74
  after_destroy do |searchable|
75
75
  remove_from_index(searchable) if self.class.search_resource_fields_mapper
76
76
  end
77
- # after_create and after_update callbacks are dynamically setted in `searchable_fields` method.
77
+ # after_create and after_update callbacks are dynamically set in `searchable_fields` method.
78
78
 
79
79
  # Public: after_create callback to index the model as a SearchableResource, if configured so.
80
80
  #
@@ -178,8 +178,8 @@ module Decidim
178
178
  # }
179
179
  #
180
180
  # `conditions` must be a Hash that only accepts a boolean or a Proc that will be evaluated on runtime and returns a boolean for the following keys:
181
- # - index_on_create: Whether to index, or not, the current searchabe when it is created. Defaults to true.
182
- # - index_on_update: Whether to index, or not, the current searchabe when it is updated. Defaults to true.
181
+ # - index_on_create: Whether to index, or not, the current searchable when it is created. Defaults to true.
182
+ # - index_on_update: Whether to index, or not, the current searchable when it is updated. Defaults to true.
183
183
  #
184
184
  def searchable_fields(declared_fields, conditions = {})
185
185
  @search_resource_indexable_fields = SearchResourceFieldsMapper.new(declared_fields)
data/lib/decidim/seeds.rb CHANGED
@@ -17,6 +17,27 @@ module Decidim
17
17
  @admin_user ||= Decidim::User.find_by(organization:, email: "admin@example.org")
18
18
  end
19
19
 
20
+ def find_or_initialize_user_by(email:)
21
+ user = Decidim::User.find_or_initialize_by(email:)
22
+ user.update!(
23
+ name: ::Faker::Name.name,
24
+ nickname: ::Faker::Twitter.unique.screen_name,
25
+ password: "decidim123456789",
26
+ organization:,
27
+ confirmed_at: Time.current,
28
+ locale: I18n.default_locale,
29
+ personal_url: ::Faker::Internet.url,
30
+ about: ::Faker::Lorem.paragraph(sentence_count: 2),
31
+ avatar: random_avatar,
32
+ accepted_tos_version: organization.tos_version + 1.hour,
33
+ newsletter_notifications_at: Time.current,
34
+ tos_agreement: true,
35
+ password_updated_at: Time.current
36
+ )
37
+
38
+ user
39
+ end
40
+
20
41
  def random_scope(participatory_space:)
21
42
  if participatory_space.scope
22
43
  scopes = participatory_space.scope.descendants
@@ -86,10 +107,51 @@ module Decidim
86
107
  )
87
108
  end
88
109
 
110
+ def create_report!(reportable:, current_user:)
111
+ moderation = Moderation.find_or_create_by!(reportable:, participatory_space: reportable.participatory_space)
112
+
113
+ Decidim::Report.create!(
114
+ moderation:,
115
+ user: current_user,
116
+ locale: I18n.locale,
117
+ reason: "spam",
118
+ details: "From the seeds"
119
+ )
120
+ rescue ActiveRecord::RecordInvalid
121
+ # Ignore in case we have an error in the report creation.
122
+ # Most likely is a "Validation failed: User has already been taken"
123
+ end
124
+
125
+ def hide_report!(reportable:)
126
+ moderation = Moderation.find_or_create_by!(reportable:, participatory_space: reportable.participatory_space)
127
+ moderation.update!(hidden_at: Time.zone.now)
128
+ end
129
+
130
+ def create_user_report!(reportable:, current_user:)
131
+ moderation = UserModeration.find_or_create_by!(user: reportable)
132
+
133
+ UserReport.create!(
134
+ moderation:,
135
+ user: current_user,
136
+ reason: "spam",
137
+ details: "From the seeds"
138
+ )
139
+ end
140
+
89
141
  def seed_components_manifests!(participatory_space:)
90
142
  Decidim.component_manifests.each do |manifest|
91
143
  manifest.seed!(participatory_space.reload)
92
144
  end
93
145
  end
146
+
147
+ def random_avatar
148
+ file_number = format("%03d", rand(1...100))
149
+
150
+ create_blob!(seeds_file: "avatars/#{file_number}.jpg", filename: "#{file_number}.jpg", content_type: "image/jpeg")
151
+ end
152
+
153
+ def create_follow!(user, followable)
154
+ Decidim::Follow.create!(followable:, user:)
155
+ end
94
156
  end
95
157
  end
@@ -116,8 +116,6 @@ module Decidim
116
116
  validates :type, inclusion: { in: TYPES.keys }
117
117
 
118
118
  def type_class
119
- return Decidim::Attributes::RichText if type == :text && editor == true
120
-
121
119
  TYPES[type][:klass]
122
120
  end
123
121
 
@@ -40,7 +40,7 @@ module Decidim
40
40
  # Public: Returns a number returned by executing the corresponding block.
41
41
  #
42
42
  # name - The name of the stat
43
- # context - An arbritrary context object to compute the result.
43
+ # context - An arbitrary context object to compute the result.
44
44
  # start_at - A date to filter resources created after it
45
45
  # end_at - A date to filter resources created before it.
46
46
  #
@@ -54,7 +54,7 @@ module Decidim
54
54
 
55
55
  # Public: Resolves every stat with the given context and return an enumerator
56
56
  #
57
- # context - An arbritrary context object to compute the result.
57
+ # context - An arbitrary context object to compute the result.
58
58
  # start_at - A date to filter resources created after it
59
59
  # end_at - A date to filter resources created before it
60
60
  #
@@ -17,7 +17,7 @@ module Decidim
17
17
  # type - The attribute's type
18
18
  # options - Options to send to the form class when defining the attribute.
19
19
  # block - An optional block to be called for each attribute name and
20
- # locale. The block will receive two arguments, one with the attriubte
20
+ # locale. The block will receive two arguments, one with the attribute
21
21
  # name and another with the locale.
22
22
  #
23
23
  #
@@ -34,15 +34,12 @@ module Decidim
34
34
  # end
35
35
  #
36
36
  # Returns nothing.
37
- # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
38
- def translatable_attribute(name, type, **options)
37
+ def translatable_attribute(name, type, **)
39
38
  attribute(name, { String => Object }, default: {})
40
39
 
41
40
  locales.each do |locale|
42
41
  attribute_name = "#{name}_#{locale}".gsub("-", "__")
43
- attribute attribute_name, type, **options
44
-
45
- value_type = attribute_types[attribute_name.to_s]
42
+ attribute(attribute_name, type, **)
46
43
 
47
44
  define_method attribute_name do
48
45
  field = public_send(name) || {}
@@ -54,6 +51,7 @@ module Decidim
54
51
  # changed and the old value is still stored against the record.
55
52
  field
56
53
  end
54
+ value_type = self.class.attribute_types[attribute_name.to_s]
57
55
  value_type ? value_type.cast(value) : value
58
56
  end
59
57
 
@@ -62,15 +60,12 @@ module Decidim
62
60
  final = super(value)
63
61
  return unless final # Do not set the `nil` values for the parent hash
64
62
 
65
- final = value_type.serialize(final) if value_type
66
-
67
63
  public_send("#{name}=", field.merge(locale => final))
68
64
  end
69
65
 
70
66
  yield(attribute_name, locale) if block_given?
71
67
  end
72
68
  end
73
- # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
74
69
 
75
70
  def locales
76
71
  Decidim.available_locales
@@ -19,7 +19,7 @@ module Decidim
19
19
  method_name = "#{field}="
20
20
 
21
21
  # We are overriding the attribute setter method so that we can reuse the
22
- # machine translations. This is to fix a bug encoutered when updating
22
+ # machine translations. This is to fix a bug encountered when updating
23
23
  # the resource from a FormObject. The FormObject on the `#create`
24
24
  # action in the controller does not have the machine translations loaded,
25
25
  # so they are effectively lost whenever a resource is updated.
@@ -87,7 +87,7 @@ module Decidim
87
87
  # Internal class to encapsulate each view registered on a view hook.
88
88
  class ViewHook
89
89
  # priority - a Number (Integer|Float) to sort the block.
90
- # block - a block that will bbe rendered in a view context.
90
+ # block - a block that will be rendered in a view context.
91
91
  def initialize(priority, block)
92
92
  @priority = priority
93
93
  @block = block
@@ -17,8 +17,12 @@ module Decidim
17
17
  include Decidim::MarkupHelper
18
18
  include Decidim::LayoutHelper
19
19
  include Decidim::SanitizeHelper
20
+ include Decidim::ApplicationHelper
21
+ include Decidim::IconHelper
20
22
 
23
+ delegate :helper_method, to: :controller
21
24
  delegate :current_organization, to: :controller
25
+ delegate_missing_to :view_context
22
26
 
23
27
  cache :show, if: :perform_caching?, expires_in: :cache_expiry_time do
24
28
  cache_hash
@@ -87,7 +91,7 @@ module Decidim
87
91
  end
88
92
 
89
93
  def cache_expiry_time
90
- Decidim.cache_expiry_time
94
+ nil
91
95
  end
92
96
 
93
97
  def decidim
@@ -0,0 +1,14 @@
1
+ // eslint-disable-next-line no-undef
2
+ module.exports = {
3
+ options: {
4
+ tsconfigRaw: JSON.stringify({}),
5
+ target: "es2015"
6
+ },
7
+ bundle: true,
8
+ sourcemap: true,
9
+ minify: true,
10
+ outdir: "public",
11
+ outExtension: {
12
+ ".css": ".scss"
13
+ }
14
+ };
@@ -22,12 +22,12 @@ default: &default
22
22
  cache_manifest: false
23
23
 
24
24
  # Select loader to use, available options are 'babel' (default), 'swc' or 'esbuild'
25
- webpack_loader: 'babel'
25
+ webpack_loader: 'esbuild'
26
26
 
27
27
  # Set to true to enable check for matching versions of shakapacker gem and NPM package - will raise an error if there is a mismatch or wildcard versioning is used
28
28
  ensure_consistent_versioning: true
29
29
 
30
- # Select whether the compiler will use SHA digest ('digest' option) or most most recent modified timestamp ('mtime') to determine freshness
30
+ # Select whether the compiler will use SHA digest ('digest' option) or most recent modified timestamp ('mtime') to determine freshness
31
31
  compiler_strategy: digest
32
32
 
33
33
  # Select whether the compiler will always use a content hash and not just in production
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true, /* Enable all strict type-checking options. */
4
+ "removeComments": true, /* Disable emitting comments. */
5
+ "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
6
+ "module": "commonjs", /* Specify what module code is generated. */
7
+ "incremental": true, /* Enable incremental compilation */
8
+ "target": "es6", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
9
+ "skipLibCheck": true, /* Skip type checking all .d.ts files. */
10
+ }
11
+ }
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
2
  const { config } = require("shakapacker");
3
3
  const { InjectManifest } = require("workbox-webpack-plugin");
4
- const TerserPlugin = require('terser-webpack-plugin')
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\/(?!tributejs)/,
19
- loader: "babel-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: 'asset/resource',
42
+ type: "asset/resource",
46
43
  generator: {
47
- filename: 'media/documents/[hash][ext][query]'
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: 'asset/resource',
68
+ type: "asset/resource",
72
69
  generator: {
73
- filename: 'media/images/[name]-[hash][ext][query]'
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 TerserPlugin({
89
- parallel: Number.parseInt(process.env.SHAKAPACKER_PARALLEL, 10) || true,
90
- terserOptions: {
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
- ].filter(Boolean)
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 acomplish GDPR standards
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(user, Decidim::DeleteAccountForm.from_params({})) # Delete user!
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 "Check and notify users to update their newsletter notifications settings"
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
@@ -21,7 +21,7 @@ namespace :decidim do
21
21
  end
22
22
  end
23
23
 
24
- desc "Rebuild the search index"
24
+ desc "Rebuilds the search index"
25
25
  task rebuild_search: :environment do
26
26
  Decidim::SearchableResource.destroy_all
27
27
  total = Decidim::Searchable.searchable_resources.count
@@ -2,12 +2,12 @@
2
2
 
3
3
  namespace :decidim do
4
4
  namespace :mailers do
5
- desc "Task to send the notification digest email with the daily report"
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 "Task to send the notification digest email with the weekly report"
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 "Execute all metrics calculation methods"
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 "Execute one metric calculation method"
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 "Rebuild calculations from specific day"
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 "Show available metrics"
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 dummy app for testing in external installations"
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(*args)
33
- Actions.new.send(*args)
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 "Install migrations from Decidim to the app."
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:upgrade",
9
+ :"decidim:upgrade:webpacker",
10
10
  :"decidim_api:generate_docs"
11
11
  ]
12
12
 
13
- desc "Setup environment so that only decidim migrations are installed."
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