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.
Files changed (644) 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 +5 -7
  5. data/app/cells/decidim/address_cell.rb +3 -5
  6. data/app/cells/decidim/amendable/amend_button_card_cell.rb +0 -2
  7. data/app/cells/decidim/amendable/amendments_cell.rb +0 -2
  8. data/app/cells/decidim/amendable/announcement_cell.rb +10 -14
  9. data/app/cells/decidim/amendable/emendation_actions_cell.rb +0 -2
  10. data/app/cells/decidim/amendable/promote_button_card_cell.rb +0 -2
  11. data/app/cells/decidim/amendable/wizard_step_form_cell.rb +6 -19
  12. data/app/cells/decidim/announcement/show.erb +1 -1
  13. data/app/cells/decidim/announcement_cell.rb +6 -2
  14. data/app/cells/decidim/attachments_file_tab/show.erb +3 -0
  15. data/app/cells/decidim/attachments_file_tab_cell.rb +11 -0
  16. data/app/cells/decidim/attachments_link_tab/show.erb +12 -0
  17. data/app/cells/decidim/attachments_link_tab_cell.rb +21 -0
  18. data/app/cells/decidim/author/flag.erb +2 -2
  19. data/app/cells/decidim/author_cell.rb +0 -2
  20. data/app/cells/decidim/authorization_modal_cell.rb +0 -3
  21. data/app/cells/decidim/badge_cell.rb +0 -4
  22. data/app/cells/decidim/badges_cell.rb +0 -2
  23. data/app/cells/decidim/button_cell.rb +0 -3
  24. data/app/cells/decidim/card_cell.rb +1 -5
  25. data/app/cells/decidim/card_g_cell.rb +2 -2
  26. data/app/cells/decidim/card_l/space.erb +1 -1
  27. data/app/cells/decidim/card_l_cell.rb +1 -3
  28. data/app/cells/decidim/card_metadata_cell.rb +1 -5
  29. data/app/cells/decidim/card_s_cell.rb +1 -4
  30. data/app/cells/decidim/coauthorships_cell.rb +0 -2
  31. data/app/cells/decidim/comments_button_cell.rb +0 -2
  32. data/app/cells/decidim/content_blocks/footer_sub_hero/show.erb +1 -1
  33. data/app/cells/decidim/content_blocks/footer_sub_hero_cell.rb +0 -3
  34. data/app/cells/decidim/content_blocks/hero/show.erb +1 -1
  35. data/app/cells/decidim/content_blocks/hero_cell.rb +0 -1
  36. data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +0 -2
  37. data/app/cells/decidim/content_blocks/how_to_participate/show.erb +1 -1
  38. data/app/cells/decidim/content_blocks/how_to_participate_cell.rb +0 -1
  39. data/app/cells/decidim/content_blocks/participatory_space_documents/content.erb +1 -1
  40. data/app/cells/decidim/content_blocks/participatory_space_documents_cell.rb +17 -1
  41. data/app/cells/decidim/content_blocks/participatory_space_hero_cell.rb +0 -2
  42. data/app/cells/decidim/content_blocks/participatory_space_last_activity_cell.rb +1 -3
  43. data/app/cells/decidim/content_blocks/stats/show.erb +1 -1
  44. data/app/cells/decidim/content_blocks/sub_hero_cell.rb +0 -3
  45. data/app/cells/decidim/date_range/show.erb +10 -10
  46. data/app/cells/decidim/date_range_cell.rb +0 -2
  47. data/app/cells/decidim/diff_cell.rb +0 -1
  48. data/app/cells/decidim/documents_panel/show.erb +4 -0
  49. data/app/cells/decidim/documents_panel_cell.rb +9 -1
  50. data/app/cells/decidim/endorsement_buttons_cell.rb +5 -13
  51. data/app/cells/decidim/flag_modal/flag_user.erb +3 -3
  52. data/app/cells/decidim/followers_cell.rb +0 -1
  53. data/app/cells/decidim/following_cell.rb +0 -1
  54. data/app/cells/decidim/footer_topics/show.erb +8 -0
  55. data/app/cells/decidim/footer_topics_cell.rb +39 -0
  56. data/app/cells/decidim/groups_cell.rb +0 -3
  57. data/app/cells/decidim/linked_resources_for_cell.rb +0 -3
  58. data/app/cells/decidim/members_cell.rb +0 -1
  59. data/app/cells/decidim/navbar_admin_link_cell.rb +0 -2
  60. data/app/cells/decidim/newsletter_templates/base_cell.rb +0 -1
  61. data/app/cells/decidim/newsletter_templates/basic_only_text/show.erb +2 -2
  62. data/app/cells/decidim/newsletter_templates/image_text_cta/show.erb +2 -2
  63. data/app/cells/decidim/notification/show.erb +5 -0
  64. data/app/cells/decidim/notification_actions/base_cell.rb +13 -0
  65. data/app/cells/decidim/notification_actions/buttons/show.erb +5 -0
  66. data/app/cells/decidim/notification_actions/buttons_cell.rb +41 -0
  67. data/app/cells/decidim/notification_cell.rb +9 -3
  68. data/app/cells/decidim/notifications_cell.rb +0 -1
  69. data/app/cells/decidim/pad_iframe/show.erb +2 -2
  70. data/app/cells/decidim/pad_iframe_cell.rb +0 -1
  71. data/app/cells/decidim/participatory_space_dropdown_metadata_cell.rb +1 -2
  72. data/app/cells/decidim/photo_cell.rb +1 -5
  73. data/app/cells/decidim/photos_list_cell.rb +0 -2
  74. data/app/cells/decidim/profile_cell.rb +0 -2
  75. data/app/cells/decidim/profile_sidebar/show.erb +20 -20
  76. data/app/cells/decidim/profile_sidebar_cell.rb +1 -10
  77. data/app/cells/decidim/progress_bar/show.erb +8 -6
  78. data/app/cells/decidim/public_participation/show.erb +1 -1
  79. data/app/cells/decidim/report_button/flag_modal.erb +1 -1
  80. data/app/cells/decidim/resource_types_filter_cell.rb +0 -2
  81. data/app/cells/decidim/scopes_picker/show.erb +1 -1
  82. data/app/cells/decidim/scopes_picker_cell.rb +0 -1
  83. data/app/cells/decidim/search_results_cell.rb +1 -1
  84. data/app/cells/decidim/statistic_cell.rb +0 -2
  85. data/app/cells/decidim/tab_panels/show.erb +1 -1
  86. data/app/cells/decidim/tab_panels_cell.rb +12 -2
  87. data/app/cells/decidim/tags_cell.rb +0 -2
  88. data/app/cells/decidim/tos_page_cell.rb +0 -3
  89. data/app/cells/decidim/translation_bar/show.erb +1 -1
  90. data/app/cells/decidim/translation_bar_cell.rb +0 -2
  91. data/app/cells/decidim/upload_modal/files.erb +1 -1
  92. data/app/cells/decidim/upload_modal_cell.rb +1 -3
  93. data/app/cells/decidim/user_conversation/new.erb +1 -1
  94. data/app/cells/decidim/user_conversation/show.erb +1 -1
  95. data/app/cells/decidim/user_conversation_cell.rb +0 -1
  96. data/app/cells/decidim/user_conversations/show.erb +1 -1
  97. data/app/cells/decidim/user_conversations_cell.rb +0 -1
  98. data/app/cells/decidim/user_group_pending_invitations_list_cell.rb +0 -1
  99. data/app/cells/decidim/user_group_pending_requests_list_cell.rb +0 -1
  100. data/app/cells/decidim/user_timeline/show.erb +1 -1
  101. data/app/cells/decidim/version_cell.rb +3 -5
  102. data/app/cells/decidim/versions_list_cell.rb +1 -3
  103. data/app/cells/decidim/versions_list_item_cell.rb +2 -4
  104. data/app/cells/decidim/wizard_step_form/wizard_aside.erb +2 -2
  105. data/app/cells/decidim/wizard_step_form/wizard_header.erb +2 -3
  106. data/app/cells/decidim/wizard_step_form_cell.rb +0 -8
  107. data/app/commands/decidim/amendable/create_draft.rb +4 -3
  108. data/app/commands/decidim/amendable/promote.rb +3 -2
  109. data/app/commands/decidim/amendable/publish_draft.rb +3 -2
  110. data/app/commands/decidim/amendable/update_draft.rb +4 -3
  111. data/app/commands/decidim/amendable/withdraw.rb +1 -1
  112. data/app/commands/decidim/create_follow.rb +4 -4
  113. data/app/commands/decidim/create_report.rb +3 -3
  114. data/app/commands/decidim/create_user_report.rb +5 -5
  115. data/app/commands/decidim/delete_follow.rb +4 -4
  116. data/app/commands/decidim/demote_membership.rb +2 -2
  117. data/app/commands/decidim/destroy_account.rb +21 -19
  118. data/app/commands/decidim/endorse_resource.rb +1 -1
  119. data/app/commands/decidim/invite_user_to_group.rb +5 -4
  120. data/app/commands/decidim/update_account.rb +24 -22
  121. data/app/commands/decidim/update_notifications_settings.rb +13 -11
  122. data/app/commands/decidim/update_password.rb +7 -7
  123. data/app/commands/decidim/update_user_interests.rb +9 -7
  124. data/app/controllers/concerns/decidim/devise_controllers.rb +2 -0
  125. data/app/controllers/concerns/decidim/filter_resource.rb +1 -1
  126. data/app/controllers/concerns/decidim/needs_rtl_direction.rb +23 -0
  127. data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -23
  128. data/app/controllers/concerns/decidim/payload_info.rb +2 -1
  129. data/app/controllers/concerns/decidim/registers_permissions.rb +4 -4
  130. data/app/controllers/concerns/decidim/use_organization_time_zone.rb +1 -1
  131. data/app/controllers/concerns/decidim/withdrawable.rb +1 -1
  132. data/app/controllers/decidim/account_controller.rb +2 -2
  133. data/app/controllers/{concerns/decidim → decidim}/amendments_controller.rb +3 -16
  134. data/app/controllers/decidim/application_controller.rb +1 -0
  135. data/app/controllers/decidim/components/base_controller.rb +1 -1
  136. data/app/controllers/decidim/devise/invitations_controller.rb +1 -1
  137. data/app/controllers/decidim/devise/passwords_controller.rb +2 -2
  138. data/app/controllers/decidim/endorsements_controller.rb +1 -1
  139. data/app/controllers/decidim/favicon_controller.rb +1 -1
  140. data/app/controllers/decidim/follows_controller.rb +2 -2
  141. data/app/controllers/decidim/group_invites_controller.rb +36 -9
  142. data/app/controllers/decidim/newsletters_opt_in_controller.rb +1 -1
  143. data/app/controllers/decidim/notifications_settings_controller.rb +1 -1
  144. data/app/controllers/decidim/report_users_controller.rb +1 -1
  145. data/app/controllers/decidim/reports_controller.rb +1 -1
  146. data/app/controllers/decidim/user_interests_controller.rb +1 -1
  147. data/app/events/decidim/change_nickname_event.rb +0 -1
  148. data/app/events/decidim/invited_to_group_event.rb +29 -0
  149. data/app/events/decidim/welcome_notification_event.rb +2 -4
  150. data/app/forms/decidim/form.rb +4 -0
  151. data/app/forms/decidim/omniauth_registration_form.rb +1 -1
  152. data/app/forms/decidim/upload_validation_form.rb +1 -1
  153. data/app/helpers/concerns/decidim/flash_helper_extensions.rb +1 -1
  154. data/app/helpers/decidim/amendments_helper.rb +4 -14
  155. data/app/helpers/decidim/application_helper.rb +8 -0
  156. data/app/helpers/decidim/authorization_form_helper.rb +2 -2
  157. data/app/helpers/decidim/breadcrumb_helper.rb +1 -1
  158. data/app/helpers/decidim/cells_helper.rb +1 -1
  159. data/app/helpers/decidim/check_boxes_tree_helper.rb +1 -1
  160. data/app/helpers/decidim/datalist_select_helper.rb +1 -1
  161. data/app/helpers/decidim/decidim_form_helper.rb +3 -3
  162. data/app/helpers/decidim/filters_helper.rb +1 -1
  163. data/app/helpers/decidim/layout_helper.rb +1 -36
  164. data/app/helpers/decidim/localized_locales_helper.rb +1 -1
  165. data/app/helpers/decidim/menu_helper.rb +8 -0
  166. data/app/helpers/decidim/meta_tags_helper.rb +26 -23
  167. data/app/helpers/decidim/modal_helper.rb +1 -1
  168. data/app/helpers/decidim/orders_helper.rb +1 -1
  169. data/app/helpers/decidim/organization_helper.rb +55 -0
  170. data/app/helpers/decidim/paginate_helper.rb +1 -1
  171. data/app/helpers/decidim/resource_helper.rb +0 -7
  172. data/app/helpers/decidim/scopes_helper.rb +4 -2
  173. data/app/helpers/decidim/searches_helper.rb +1 -1
  174. data/app/helpers/decidim/short_link_helper.rb +2 -2
  175. data/app/helpers/decidim/translations_helper.rb +2 -2
  176. data/app/helpers/decidim/twitter_search_helper.rb +1 -1
  177. data/app/helpers/decidim/user_profile_helper.rb +0 -1
  178. data/app/jobs/decidim/email_notifications_digest_generator_job.rb +2 -2
  179. data/app/mailers/decidim/application_mailer.rb +6 -2
  180. data/app/mailers/decidim/block_user_mailer.rb +1 -1
  181. data/app/mailers/decidim/decidim_devise_mailer.rb +7 -1
  182. data/app/mailers/decidim/newsletter_mailer.rb +1 -4
  183. data/app/mailers/decidim/newsletters_opt_in_mailer.rb +2 -2
  184. data/app/mailers/decidim/notification_mailer.rb +0 -1
  185. data/app/mailers/decidim/notifications_digest_mailer.rb +0 -1
  186. data/app/mailers/decidim/reported_mailer.rb +6 -3
  187. data/app/mailers/decidim/user_report_mailer.rb +1 -1
  188. data/app/models/decidim/action_log.rb +1 -1
  189. data/app/models/decidim/area_type.rb +1 -1
  190. data/app/models/decidim/attachment.rb +26 -2
  191. data/app/models/decidim/authorization.rb +1 -1
  192. data/app/models/decidim/authorization_transfer.rb +1 -0
  193. data/app/models/decidim/component.rb +2 -2
  194. data/app/models/decidim/content_block.rb +1 -1
  195. data/app/models/decidim/messaging/message.rb +2 -2
  196. data/app/models/decidim/newsletter.rb +9 -9
  197. data/app/models/decidim/notification.rb +2 -2
  198. data/app/models/decidim/organization.rb +23 -2
  199. data/app/models/decidim/push_notification_message.rb +1 -1
  200. data/app/models/decidim/resource_link.rb +1 -1
  201. data/app/models/decidim/user.rb +2 -2
  202. data/app/models/decidim/user_group.rb +2 -2
  203. data/app/packs/src/decidim/a11y.js +46 -0
  204. data/app/packs/src/decidim/attachments/file_or_link_tabs.js +55 -0
  205. data/app/packs/src/decidim/attachments/index.js +1 -0
  206. data/app/packs/src/decidim/back_to_list.js +1 -1
  207. data/app/packs/src/decidim/check_boxes_tree.js +1 -1
  208. data/app/packs/src/decidim/data_consent/consent_manager.js +1 -1
  209. data/app/packs/src/decidim/data_consent/consent_manager.test.js +6 -6
  210. data/app/packs/src/decidim/data_consent/index.js +1 -1
  211. data/app/packs/src/decidim/datepicker/datepicker_functions.js +243 -0
  212. data/app/packs/src/decidim/datepicker/datepicker_listeners.js +78 -0
  213. data/app/packs/src/decidim/datepicker/form_datepicker.js +91 -0
  214. data/app/packs/src/decidim/datepicker/generate_datepicker.js +148 -0
  215. data/app/packs/src/decidim/datepicker/generate_timepicker.js +298 -0
  216. data/app/packs/src/decidim/datepicker/test/date.test.js +118 -0
  217. data/app/packs/src/decidim/datepicker/test/time.test.js +227 -0
  218. data/app/packs/src/decidim/editor/extensions/indent/index.js +1 -1
  219. data/app/packs/src/decidim/editor/extensions/video_embed/index.js +4 -4
  220. data/app/packs/src/decidim/editor/test/extensions/decidim_kit.test.js +0 -15
  221. data/app/packs/src/decidim/editor/test/extensions/indent.test.js +1 -1
  222. data/app/packs/src/decidim/editor/test/fixtures/upload_templates.js +1 -1
  223. data/app/packs/src/decidim/editor/test/helpers.js +1 -14
  224. data/app/packs/src/decidim/editor/utilities/paste_transform.js +2 -2
  225. data/app/packs/src/decidim/external_domain_warning.js +2 -2
  226. data/app/packs/src/decidim/external_domain_warning.test.js +4 -4
  227. data/app/packs/src/decidim/form_filter.js +4 -4
  228. data/app/packs/src/decidim/impersonation.js +1 -1
  229. data/app/packs/src/decidim/index.js +11 -5
  230. data/app/packs/src/decidim/input_character_counter.js +1 -1
  231. data/app/packs/src/decidim/input_emoji.js +171 -72
  232. data/app/packs/src/decidim/input_hashtags.js +1 -1
  233. data/app/packs/src/decidim/input_mentions.js +1 -1
  234. data/app/packs/src/decidim/notifications_actions.js +40 -0
  235. data/app/packs/src/decidim/sticky_header.js +87 -0
  236. data/app/packs/src/decidim/sw/sw.js +8 -6
  237. data/app/packs/src/decidim/tooltips.js +1 -1
  238. data/app/packs/stylesheets/decidim/_datepicker.scss +193 -0
  239. data/app/packs/stylesheets/decidim/_dropdown.scss +36 -0
  240. data/app/packs/stylesheets/decidim/_emoji.scss +36 -0
  241. data/app/packs/stylesheets/decidim/_filters.scss +4 -2
  242. data/app/packs/stylesheets/decidim/_flash.scss +2 -2
  243. data/app/packs/stylesheets/decidim/_footer.scss +1 -3
  244. data/app/packs/stylesheets/decidim/_forms.scss +9 -1
  245. data/app/packs/stylesheets/decidim/_header.scss +70 -50
  246. data/app/packs/stylesheets/decidim/_home.scss +1 -1
  247. data/app/packs/stylesheets/decidim/_layout.scss +13 -0
  248. data/app/packs/stylesheets/decidim/_modal.scss +1 -1
  249. data/app/packs/stylesheets/decidim/_modal_update.scss +1 -1
  250. data/app/packs/stylesheets/decidim/_notifications.scss +4 -0
  251. data/app/packs/stylesheets/decidim/_tabs_x.scss +5 -1
  252. data/app/packs/stylesheets/decidim/application.scss +4 -0
  253. data/app/packs/stylesheets/decidim/legacy/leaflet.scss +1 -1
  254. data/app/packs/stylesheets/decidim/vendor/_datepicker_light.scss +228 -0
  255. data/app/permissions/decidim/default_permissions.rb +2 -2
  256. data/app/presenters/decidim/admin_log/organization_presenter.rb +1 -1
  257. data/app/presenters/decidim/admin_log/static_page_presenter.rb +1 -1
  258. data/app/presenters/decidim/authorization_transfer_presenter.rb +1 -1
  259. data/app/presenters/decidim/component_attachment_collection_presenter.rb +81 -0
  260. data/app/presenters/decidim/footer_menu_presenter.rb +1 -1
  261. data/app/presenters/decidim/home_stats_presenter.rb +1 -1
  262. data/app/presenters/decidim/organization_presenter.rb +1 -1
  263. data/app/queries/decidim/metric_measure.rb +1 -1
  264. data/app/queries/decidim/public_activities.rb +1 -1
  265. data/app/queries/decidim/user_groups/admin_memberships.rb +1 -1
  266. data/app/queries/decidim/user_groups/member_memberships.rb +1 -1
  267. data/app/services/decidim/action_logger.rb +3 -3
  268. data/app/services/decidim/log/diff_changeset_calculator.rb +2 -2
  269. data/app/services/decidim/notifications_digest_sending_decider.rb +1 -1
  270. data/app/uploaders/decidim/organization_favicon_uploader.rb +1 -1
  271. data/app/uploaders/decidim/record_image_uploader.rb +2 -2
  272. data/app/validators/organization_present_validator.rb +1 -1
  273. data/app/validators/passthru_validator.rb +1 -1
  274. data/app/validators/uploader_image_dimensions_validator.rb +2 -2
  275. data/app/views/decidim/account/show.html.erb +1 -1
  276. data/app/views/decidim/amendments/_wizard_header.html.erb +1 -2
  277. data/app/views/decidim/application/_collection.html.erb +3 -1
  278. data/app/views/decidim/application/_component_documents.html.erb +4 -0
  279. data/app/views/decidim/application/_document.html.erb +23 -9
  280. data/app/views/decidim/block_user_mailer/notify.html.erb +2 -2
  281. data/app/views/decidim/devise/invitations/edit.html.erb +2 -2
  282. data/app/views/decidim/devise/omniauth_registrations/new.html.erb +1 -1
  283. data/app/views/decidim/devise/registrations/new.html.erb +1 -1
  284. data/app/views/decidim/devise/shared/_login_boxes.html.erb +1 -1
  285. data/app/views/decidim/doorkeeper/authorizations/new.html.erb +1 -1
  286. data/app/views/decidim/endorsements/_identity.html.erb +1 -1
  287. data/app/views/decidim/gamification/badges/index.html.erb +1 -1
  288. data/app/views/decidim/messaging/conversations/_add_conversation_users.html.erb +2 -2
  289. data/app/views/decidim/messaging/conversations/_error_modal.html.erb +5 -5
  290. data/app/views/decidim/newsletter_mailer/newsletter.html.erb +1 -1
  291. data/app/views/decidim/newsletters/show.html.erb +1 -1
  292. data/app/views/decidim/newsletters_opt_in_mailer/notify.html.erb +2 -2
  293. data/app/views/decidim/pages/index.html.erb +1 -2
  294. data/app/views/decidim/reported_mailer/report.html.erb +4 -2
  295. data/app/views/decidim/scopes/picker.html.erb +5 -5
  296. data/app/views/decidim/searches/_resources_filter_block.html.erb +6 -6
  297. data/app/views/decidim/shared/_extended_navigation_bar.html.erb +8 -8
  298. data/app/views/decidim/shared/_login_modal.html.erb +1 -1
  299. data/app/views/decidim/user_interests/_areas.html.erb +2 -2
  300. data/app/views/decidim/user_report_mailer/notify.html.erb +2 -2
  301. data/app/views/decidim/user_update_mailer/notify.html.erb +1 -1
  302. data/app/views/decidim/widgets/_data_picker.html.erb +1 -1
  303. data/app/views/devise/mailer/invitation_instructions.html.erb +1 -1
  304. data/app/views/devise/mailer/invitation_instructions.text.erb +1 -1
  305. data/app/views/devise/mailer/invite_admin.html.erb +2 -2
  306. data/app/views/devise/mailer/invite_admin.text.erb +2 -2
  307. data/app/views/devise/mailer/invite_collaborator.html.erb +2 -2
  308. data/app/views/devise/mailer/invite_collaborator.text.erb +2 -2
  309. data/app/views/devise/mailer/invite_private_user.html.erb +2 -2
  310. data/app/views/devise/mailer/invite_private_user.text.erb +2 -2
  311. data/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb +1 -1
  312. data/app/views/devise/mailer/organization_admin_invitation_instructions.text.erb +1 -1
  313. data/app/views/layouts/decidim/_application.html.erb +3 -6
  314. data/app/views/layouts/decidim/_data_consent_warning.html.erb +2 -2
  315. data/app/views/layouts/decidim/_decidim_javascript.html.erb +1 -1
  316. data/app/views/layouts/decidim/_head_extra.html.erb +2 -2
  317. data/app/views/layouts/decidim/_impersonation_warning.html.erb +1 -1
  318. data/app/views/layouts/decidim/_js_configuration.html.erb +7 -2
  319. data/app/views/layouts/decidim/_logo.html.erb +2 -2
  320. data/app/views/layouts/decidim/_logo_mobile.html.erb +11 -0
  321. data/app/views/layouts/decidim/_mailer_logo.html.erb +2 -2
  322. data/app/views/layouts/decidim/_meta_tags_config.html.erb +1 -1
  323. data/app/views/layouts/decidim/_wrapper.html.erb +16 -9
  324. data/app/views/layouts/decidim/footer/_main.html.erb +2 -3
  325. data/app/views/layouts/decidim/footer/_main_intro.html.erb +2 -2
  326. data/app/views/layouts/decidim/footer/_main_legal.html.erb +2 -3
  327. data/app/views/layouts/decidim/footer/_main_links.html.erb +13 -11
  328. data/app/views/layouts/decidim/footer/_main_social_media_links.html.erb +8 -8
  329. data/app/views/layouts/decidim/header/_main.html.erb +9 -22
  330. data/app/views/layouts/decidim/header/_main_links_desktop.html.erb +3 -4
  331. data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +10 -3
  332. data/app/views/layouts/decidim/header/_main_links_mobile_item_account.html.erb +24 -0
  333. data/app/views/layouts/decidim/header/_main_links_mobile_search.html.erb +0 -21
  334. data/app/views/layouts/decidim/header/_main_menu_mobile.html.erb +12 -0
  335. data/app/views/layouts/decidim/header/_menu_breadcrumb_desktop.html.erb +1 -1
  336. data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_mobile.html.erb +17 -0
  337. data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_top_left.html.erb +1 -1
  338. data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +1 -1
  339. data/app/views/layouts/decidim/header/_menu_form_search_mobile.html.erb +16 -0
  340. data/app/views/layouts/decidim/header/_mobile_language_choose.html.erb +25 -0
  341. data/app/views/layouts/decidim/mailer.html.erb +2 -2
  342. data/app/views/layouts/decidim/shared/_layout_center.html.erb +1 -1
  343. data/app/views/layouts/decidim/shared/_layout_item.html.erb +0 -14
  344. data/config/initializers/active_storage.rb +3 -0
  345. data/config/initializers/devise.rb +1 -1
  346. data/config/initializers/new_framework_defaults_7_0.rb +145 -0
  347. data/config/locales/ar.yml +2 -42
  348. data/config/locales/bg.yml +55 -57
  349. data/config/locales/ca.yml +65 -54
  350. data/config/locales/cs.yml +53 -55
  351. data/config/locales/de.yml +63 -52
  352. data/config/locales/el.yml +0 -29
  353. data/config/locales/en.yml +68 -57
  354. data/config/locales/es-MX.yml +67 -56
  355. data/config/locales/es-PY.yml +67 -56
  356. data/config/locales/es.yml +66 -55
  357. data/config/locales/eu.yml +67 -56
  358. data/config/locales/fi-plain.yml +66 -55
  359. data/config/locales/fi.yml +65 -54
  360. data/config/locales/fr-CA.yml +60 -55
  361. data/config/locales/fr.yml +55 -50
  362. data/config/locales/ga-IE.yml +0 -11
  363. data/config/locales/gl.yml +0 -18
  364. data/config/locales/hu.yml +36 -56
  365. data/config/locales/id-ID.yml +0 -14
  366. data/config/locales/is-IS.yml +0 -10
  367. data/config/locales/it.yml +0 -25
  368. data/config/locales/ja.yml +67 -56
  369. data/config/locales/lb.yml +0 -25
  370. data/config/locales/lt.yml +0 -48
  371. data/config/locales/lv.yml +0 -21
  372. data/config/locales/nl.yml +0 -24
  373. data/config/locales/no.yml +0 -25
  374. data/config/locales/pl.yml +67 -56
  375. data/config/locales/pt-BR.yml +4 -51
  376. data/config/locales/pt.yml +0 -25
  377. data/config/locales/ro-RO.yml +1 -28
  378. data/config/locales/ru.yml +0 -15
  379. data/config/locales/sk.yml +0 -21
  380. data/config/locales/sl.yml +0 -8
  381. data/config/locales/sv.yml +0 -33
  382. data/config/locales/tr-TR.yml +4 -27
  383. data/config/locales/uk.yml +0 -10
  384. data/config/locales/zh-CN.yml +0 -22
  385. data/config/locales/zh-TW.yml +0 -47
  386. data/config/routes.rb +0 -1
  387. data/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb +1 -1
  388. data/db/migrate/20240110150230_rename_external_domain_whitelist_to_external_domain_allowlist.rb +7 -0
  389. data/db/migrate/20240326104215_remove_show_in_footer_in_static_pages.rb +7 -0
  390. data/db/migrate/20240401192628_change_name_on_decidim_organizations.rb +31 -0
  391. data/db/seeds/avatars/001.jpg +0 -0
  392. data/db/seeds/avatars/002.jpg +0 -0
  393. data/db/seeds/avatars/003.jpg +0 -0
  394. data/db/seeds/avatars/004.jpg +0 -0
  395. data/db/seeds/avatars/005.jpg +0 -0
  396. data/db/seeds/avatars/006.jpg +0 -0
  397. data/db/seeds/avatars/007.jpg +0 -0
  398. data/db/seeds/avatars/008.jpg +0 -0
  399. data/db/seeds/avatars/009.jpg +0 -0
  400. data/db/seeds/avatars/010.jpg +0 -0
  401. data/db/seeds/avatars/011.jpg +0 -0
  402. data/db/seeds/avatars/012.jpg +0 -0
  403. data/db/seeds/avatars/013.jpg +0 -0
  404. data/db/seeds/avatars/014.jpg +0 -0
  405. data/db/seeds/avatars/015.jpg +0 -0
  406. data/db/seeds/avatars/016.jpg +0 -0
  407. data/db/seeds/avatars/017.jpg +0 -0
  408. data/db/seeds/avatars/018.jpg +0 -0
  409. data/db/seeds/avatars/019.jpg +0 -0
  410. data/db/seeds/avatars/020.jpg +0 -0
  411. data/db/seeds/avatars/021.jpg +0 -0
  412. data/db/seeds/avatars/022.jpg +0 -0
  413. data/db/seeds/avatars/023.jpg +0 -0
  414. data/db/seeds/avatars/024.jpg +0 -0
  415. data/db/seeds/avatars/025.jpg +0 -0
  416. data/db/seeds/avatars/026.jpg +0 -0
  417. data/db/seeds/avatars/027.jpg +0 -0
  418. data/db/seeds/avatars/028.jpg +0 -0
  419. data/db/seeds/avatars/029.jpg +0 -0
  420. data/db/seeds/avatars/030.jpg +0 -0
  421. data/db/seeds/avatars/031.jpg +0 -0
  422. data/db/seeds/avatars/032.jpg +0 -0
  423. data/db/seeds/avatars/033.jpg +0 -0
  424. data/db/seeds/avatars/034.jpg +0 -0
  425. data/db/seeds/avatars/035.jpg +0 -0
  426. data/db/seeds/avatars/036.jpg +0 -0
  427. data/db/seeds/avatars/037.jpg +0 -0
  428. data/db/seeds/avatars/038.jpg +0 -0
  429. data/db/seeds/avatars/039.jpg +0 -0
  430. data/db/seeds/avatars/040.jpg +0 -0
  431. data/db/seeds/avatars/041.jpg +0 -0
  432. data/db/seeds/avatars/042.jpg +0 -0
  433. data/db/seeds/avatars/043.jpg +0 -0
  434. data/db/seeds/avatars/044.jpg +0 -0
  435. data/db/seeds/avatars/045.jpg +0 -0
  436. data/db/seeds/avatars/046.jpg +0 -0
  437. data/db/seeds/avatars/047.jpg +0 -0
  438. data/db/seeds/avatars/048.jpg +0 -0
  439. data/db/seeds/avatars/049.jpg +0 -0
  440. data/db/seeds/avatars/050.jpg +0 -0
  441. data/db/seeds/avatars/051.jpg +0 -0
  442. data/db/seeds/avatars/052.jpg +0 -0
  443. data/db/seeds/avatars/053.jpg +0 -0
  444. data/db/seeds/avatars/054.jpg +0 -0
  445. data/db/seeds/avatars/055.jpg +0 -0
  446. data/db/seeds/avatars/056.jpg +0 -0
  447. data/db/seeds/avatars/057.jpg +0 -0
  448. data/db/seeds/avatars/058.jpg +0 -0
  449. data/db/seeds/avatars/059.jpg +0 -0
  450. data/db/seeds/avatars/060.jpg +0 -0
  451. data/db/seeds/avatars/061.jpg +0 -0
  452. data/db/seeds/avatars/062.jpg +0 -0
  453. data/db/seeds/avatars/063.jpg +0 -0
  454. data/db/seeds/avatars/064.jpg +0 -0
  455. data/db/seeds/avatars/065.jpg +0 -0
  456. data/db/seeds/avatars/066.jpg +0 -0
  457. data/db/seeds/avatars/067.jpg +0 -0
  458. data/db/seeds/avatars/068.jpg +0 -0
  459. data/db/seeds/avatars/069.jpg +0 -0
  460. data/db/seeds/avatars/070.jpg +0 -0
  461. data/db/seeds/avatars/071.jpg +0 -0
  462. data/db/seeds/avatars/072.jpg +0 -0
  463. data/db/seeds/avatars/073.jpg +0 -0
  464. data/db/seeds/avatars/074.jpg +0 -0
  465. data/db/seeds/avatars/075.jpg +0 -0
  466. data/db/seeds/avatars/076.jpg +0 -0
  467. data/db/seeds/avatars/077.jpg +0 -0
  468. data/db/seeds/avatars/078.jpg +0 -0
  469. data/db/seeds/avatars/079.jpg +0 -0
  470. data/db/seeds/avatars/080.jpg +0 -0
  471. data/db/seeds/avatars/081.jpg +0 -0
  472. data/db/seeds/avatars/082.jpg +0 -0
  473. data/db/seeds/avatars/083.jpg +0 -0
  474. data/db/seeds/avatars/084.jpg +0 -0
  475. data/db/seeds/avatars/085.jpg +0 -0
  476. data/db/seeds/avatars/086.jpg +0 -0
  477. data/db/seeds/avatars/087.jpg +0 -0
  478. data/db/seeds/avatars/088.jpg +0 -0
  479. data/db/seeds/avatars/089.jpg +0 -0
  480. data/db/seeds/avatars/090.jpg +0 -0
  481. data/db/seeds/avatars/091.jpg +0 -0
  482. data/db/seeds/avatars/092.jpg +0 -0
  483. data/db/seeds/avatars/093.jpg +0 -0
  484. data/db/seeds/avatars/094.jpg +0 -0
  485. data/db/seeds/avatars/095.jpg +0 -0
  486. data/db/seeds/avatars/096.jpg +0 -0
  487. data/db/seeds/avatars/097.jpg +0 -0
  488. data/db/seeds/avatars/098.jpg +0 -0
  489. data/db/seeds/avatars/099.jpg +0 -0
  490. data/db/seeds/avatars/100.jpg +0 -0
  491. data/db/seeds/avatars/CREDITS.md +114 -0
  492. data/db/seeds/avatars/README.md +25 -0
  493. data/decidim-core.gemspec +6 -5
  494. data/lib/decidim/acts_as_author.rb +1 -1
  495. data/lib/decidim/admin_filter.rb +44 -0
  496. data/lib/decidim/admin_filters_registry.rb +55 -0
  497. data/lib/decidim/amendable.rb +1 -2
  498. data/lib/decidim/api/functions/component_finder_base.rb +1 -1
  499. data/lib/decidim/api/functions/needs_api_filter_and_order.rb +3 -3
  500. data/lib/decidim/api/functions/participatory_space_finder_base.rb +1 -1
  501. data/lib/decidim/api/functions/participatory_space_list_base.rb +1 -1
  502. data/lib/decidim/api/input_filters/user_entity_input_filter.rb +3 -3
  503. data/lib/decidim/api/interfaces/author_interface.rb +1 -1
  504. data/lib/decidim/api/types/organization_type.rb +1 -1
  505. data/lib/decidim/api/types/user_group_type.rb +1 -1
  506. data/lib/decidim/api/types/user_type.rb +1 -1
  507. data/lib/decidim/asset_router/pipeline.rb +2 -2
  508. data/lib/decidim/assets/tailwind/instance.rb +1 -1
  509. data/lib/decidim/assets/tailwind/tailwind.config.js.erb +8 -3
  510. data/lib/decidim/attribute_object/model.rb +2 -2
  511. data/lib/decidim/attribute_object/type_resolver.rb +1 -3
  512. data/lib/decidim/attribute_object.rb +2 -2
  513. data/lib/decidim/attributes.rb +0 -4
  514. data/lib/decidim/authorable.rb +5 -0
  515. data/lib/decidim/command.rb +2 -2
  516. data/lib/decidim/commands/create_resource.rb +63 -0
  517. data/lib/decidim/commands/destroy_resource.rb +74 -0
  518. data/lib/decidim/commands/hook_error.rb +8 -0
  519. data/lib/decidim/commands/resource_handler.rb +85 -0
  520. data/lib/decidim/commands/update_resource.rb +64 -0
  521. data/lib/decidim/component_manifest.rb +3 -1
  522. data/lib/decidim/component_validator.rb +1 -1
  523. data/lib/decidim/content_blocks/has_related_components.rb +1 -1
  524. data/lib/decidim/content_parsers/resource_parser.rb +2 -2
  525. data/lib/decidim/content_processor.rb +1 -1
  526. data/lib/decidim/content_security_policy.rb +1 -1
  527. data/lib/decidim/core/engine.rb +12 -15
  528. data/lib/decidim/core/menu.rb +13 -3
  529. data/lib/decidim/core/seeds.rb +120 -147
  530. data/lib/decidim/core/test/factories.rb +24 -3
  531. data/lib/decidim/core/test/shared_examples/acts_as_author_examples.rb +1 -1
  532. data/lib/decidim/core/test/shared_examples/amendable/withdraw_amendment_examples.rb +2 -2
  533. data/lib/decidim/core/test/shared_examples/announcements_examples.rb +3 -3
  534. data/lib/decidim/core/test/shared_examples/assembly_announcements_examples.rb +4 -4
  535. data/lib/decidim/core/test/shared_examples/comments_examples.rb +88 -82
  536. data/lib/decidim/core/test/shared_examples/comments_reports_examples.rb +4 -4
  537. data/lib/decidim/core/test/shared_examples/digest_mail_examples.rb +1 -1
  538. data/lib/decidim/core/test/shared_examples/edit_link_shared_examples.rb +1 -1
  539. data/lib/decidim/core/test/shared_examples/editor_shared_examples.rb +7 -7
  540. data/lib/decidim/core/test/shared_examples/fingerprint_examples.rb +1 -1
  541. data/lib/decidim/core/test/shared_examples/follows_examples.rb +3 -3
  542. data/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +4 -2
  543. data/lib/decidim/core/test/shared_examples/has_attachments.rb +3 -2
  544. data/lib/decidim/core/test/shared_examples/has_contextual_help.rb +4 -4
  545. data/lib/decidim/core/test/shared_examples/has_reference.rb +1 -1
  546. data/lib/decidim/core/test/shared_examples/logo_email.rb +1 -1
  547. data/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb +9 -9
  548. data/lib/decidim/core/test/shared_examples/map_examples.rb +5 -5
  549. data/lib/decidim/core/test/shared_examples/paginated_resource_examples.rb +2 -2
  550. data/lib/decidim/core/test/shared_examples/participatory_space_dropdown_metadata_cell_examples.rb +3 -3
  551. data/lib/decidim/core/test/shared_examples/preview_component_with_share_token_examples.rb +3 -3
  552. data/lib/decidim/core/test/shared_examples/process_announcements_examples.rb +4 -4
  553. data/lib/decidim/core/test/shared_examples/reports_examples.rb +5 -5
  554. data/lib/decidim/core/test/shared_examples/rich_text_editor_examples.rb +10 -10
  555. data/lib/decidim/core/test/shared_examples/searchable_participatory_space_examples.rb +1 -1
  556. data/lib/decidim/core/test/shared_examples/searchable_results_examples.rb +8 -8
  557. data/lib/decidim/core/test/shared_examples/share_link_examples.rb +2 -2
  558. data/lib/decidim/core/test/shared_examples/simple_event.rb +1 -1
  559. data/lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb +3 -3
  560. data/lib/decidim/core/test/shared_examples/system_endorse_resource_examples.rb +11 -11
  561. data/lib/decidim/core/test/shared_examples/translated_event_examples.rb +2 -2
  562. data/lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb +2 -2
  563. data/lib/decidim/core/test/shared_examples/with_endorsable_permissions_examples.rb +1 -1
  564. data/lib/decidim/core/version.rb +1 -1
  565. data/lib/decidim/core.rb +24 -6
  566. data/lib/decidim/dependency_resolver.rb +3 -3
  567. data/lib/decidim/diffy_extension.rb +1 -1
  568. data/lib/decidim/download_your_data_serializers/download_your_data_user_serializer.rb +2 -1
  569. data/lib/decidim/engine_router.rb +2 -2
  570. data/lib/decidim/events/base_event.rb +19 -0
  571. data/lib/decidim/events/simple_event.rb +1 -0
  572. data/lib/decidim/exporters/export_manifest.rb +1 -1
  573. data/lib/decidim/faker/localized.rb +3 -3
  574. data/lib/decidim/form_builder.rb +4 -4
  575. data/lib/decidim/hashtag.rb +1 -1
  576. data/lib/decidim/jsonb_attributes.rb +4 -4
  577. data/lib/decidim/manifest_messages.rb +2 -2
  578. data/lib/decidim/organization_settings.rb +5 -5
  579. data/lib/decidim/paddable.rb +1 -1
  580. data/lib/decidim/participable.rb +1 -1
  581. data/lib/decidim/participatory_space_manifest.rb +1 -1
  582. data/lib/decidim/resourceable.rb +1 -1
  583. data/lib/decidim/search_resource_fields_mapper.rb +2 -2
  584. data/lib/decidim/searchable.rb +3 -3
  585. data/lib/decidim/seeds.rb +62 -0
  586. data/lib/decidim/stats_registry.rb +2 -2
  587. data/lib/decidim/translatable_attributes.rb +3 -3
  588. data/lib/decidim/translatable_resource.rb +1 -1
  589. data/lib/decidim/view_hooks.rb +1 -1
  590. data/lib/decidim/view_model.rb +4 -0
  591. data/lib/decidim/webpacker/esbuild.config.js +14 -0
  592. data/lib/decidim/webpacker/shakapacker.yml +2 -2
  593. data/lib/decidim/webpacker/tsconfig.json +11 -0
  594. data/lib/decidim/webpacker/webpack/custom.js +13 -35
  595. data/lib/devise/models/decidim_newsletterable.rb +1 -1
  596. data/lib/tasks/decidim_download_your_data_tasks.rake +2 -2
  597. data/lib/tasks/decidim_locales_tasks.rake +1 -1
  598. data/lib/tasks/decidim_mailers_tasks.rake +2 -2
  599. data/lib/tasks/decidim_metrics_tasks.rake +6 -6
  600. data/lib/tasks/decidim_procfile.rake +9 -3
  601. data/lib/tasks/decidim_tasks.rake +5 -4
  602. data/lib/tasks/decidim_webpacker_tasks.rake +126 -117
  603. data/lib/tasks/upgrade/decidim_active_storage_migration_tasks.rake +80 -0
  604. data/lib/tasks/upgrade/decidim_content_blocks_tasks.rake +50 -0
  605. data/lib/tasks/upgrade/decidim_deduplicate_endorsements.rake +1 -1
  606. data/lib/tasks/upgrade/decidim_fix_categorization.rake +1 -1
  607. data/lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake +1 -1
  608. data/lib/tasks/upgrade/decidim_fix_short_url_resolver.rake +1 -1
  609. data/lib/tasks/upgrade/decidim_moderation_tasks.rake +1 -1
  610. data/lib/tasks/upgrade/decidim_user_moderation.rake +1 -1
  611. metadata +202 -75
  612. data/app/cells/decidim/content_blocks/cta/show.erb +0 -12
  613. data/app/cells/decidim/content_blocks/cta_cell.rb +0 -31
  614. data/app/cells/decidim/footer_pages/pages.erb +0 -3
  615. data/app/cells/decidim/footer_pages/topics.erb +0 -12
  616. data/app/cells/decidim/footer_pages_cell.rb +0 -68
  617. data/app/packs/src/decidim/vendor/modernizr.js +0 -5
  618. data/app/queries/decidim/similar_emendations.rb +0 -56
  619. data/app/uploaders/decidim/cw/application_uploader.rb +0 -77
  620. data/app/uploaders/decidim/cw/attachment_uploader.rb +0 -56
  621. data/app/uploaders/decidim/cw/avatar_uploader.rb +0 -24
  622. data/app/uploaders/decidim/cw/banner_image_uploader.rb +0 -7
  623. data/app/uploaders/decidim/cw/download_your_data_uploader.rb +0 -15
  624. data/app/uploaders/decidim/cw/downloader.rb +0 -9
  625. data/app/uploaders/decidim/cw/hero_image_uploader.rb +0 -10
  626. data/app/uploaders/decidim/cw/homepage_image_uploader.rb +0 -14
  627. data/app/uploaders/decidim/cw/image_uploader.rb +0 -78
  628. data/app/uploaders/decidim/cw/newsletter_template_image_uploader.rb +0 -38
  629. data/app/uploaders/decidim/cw/oauth_application_logo_uploader.rb +0 -10
  630. data/app/uploaders/decidim/cw/official_image_footer_uploader.rb +0 -10
  631. data/app/uploaders/decidim/cw/official_image_header_uploader.rb +0 -10
  632. data/app/uploaders/decidim/cw/open_data_uploader.rb +0 -23
  633. data/app/uploaders/decidim/cw/organization_favicon_uploader.rb +0 -18
  634. data/app/uploaders/decidim/cw/organization_logo_uploader.rb +0 -10
  635. data/app/uploaders/decidim/cw/record_image_uploader.rb +0 -15
  636. data/app/uploaders/decidim/downloader.rb +0 -9
  637. data/app/views/decidim/amendments/compare_draft.html.erb +0 -18
  638. data/app/views/layouts/decidim/_edit_link.html.erb +0 -0
  639. data/app/views/layouts/decidim/header/_main_links_mobile.html.erb +0 -36
  640. data/config/initializers/carrierwave.rb +0 -15
  641. data/lib/decidim/carrier_wave_migrator_service.rb +0 -287
  642. data/lib/tasks/decidim_active_storage_migration_tasks.rake +0 -114
  643. data/lib/tasks/decidim_content_blocks_tasks.rake +0 -48
  644. /data/app/views/layouts/decidim/header/{_menu_breadcrumb_main_dropdown.html.erb → _menu_breadcrumb_main_dropdown_desktop.html.erb} +0 -0
@@ -4,11 +4,13 @@
4
4
  <%= content_tag :span, total if total != 0 %>
5
5
  </div>
6
6
 
7
- <%= content_tag :div, units_name_text, class: "progress-bar__units" if units_name %>
7
+ <div class="proposals__aside-progress">
8
+ <%= content_tag :div, units_name_text, class: "progress-bar__units" if units_name %>
8
9
 
9
- <% if total != 0 %>
10
- <div class="progress-bar" role="progressbar" aria-label="<%= units_name.present? ? units_name_text : t("decidim.shared.progress") %>" aria-valuenow="<%= number_with_precision(percentage, separator: ".", precision: 2) %>" aria-valuemin="0" aria-valuemax="100" aria-valuetext="<%= number_to_percentage(percentage, precision: 2) %>">
11
- <div style="width: <%= percentage %>%"></div>
12
- </div>
13
- <% end %>
10
+ <% if total != 0 %>
11
+ <div class="progress-bar" role="progressbar" aria-label="<%= units_name.present? ? units_name_text : t("decidim.shared.progress") %>" aria-valuenow="<%= number_with_precision(percentage, separator: ".", precision: 2) %>" aria-valuemin="0" aria-valuemax="100" aria-valuetext="<%= number_to_percentage(percentage, precision: 2) %>">
12
+ <div style="width: <%= percentage %>%"></div>
13
+ </div>
14
+ <% end %>
15
+ </div>
14
16
  </div>
@@ -1,4 +1,4 @@
1
- <label class="represent-user-group form__wrapper-checkbox-label">
1
+ <label class="form__wrapper-checkbox-label">
2
2
  <%= check_box_tag :public_participation %>
3
3
  <%= checkbox_text %>
4
4
  </label>
@@ -10,7 +10,7 @@
10
10
  <%= f.collection_radio_buttons :reason, [
11
11
  [:spam, t("decidim.shared.flag_modal.spam")],
12
12
  [:offensive, t("decidim.shared.flag_modal.offensive")],
13
- [:does_not_belong, t("decidim.shared.flag_modal.does_not_belong", organization_name: current_organization.name)]
13
+ [:does_not_belong, t("decidim.shared.flag_modal.does_not_belong", organization_name: current_organization_name)]
14
14
  ], :first, :last do |builder|
15
15
  builder.label(for: nil, class: "form__wrapper-checkbox-label") { builder.radio_button(id: nil) + builder.text }
16
16
  end %>
@@ -8,8 +8,6 @@ module Decidim
8
8
 
9
9
  include ActionView::Helpers::FormOptionsHelper
10
10
  include Decidim::FiltersHelper
11
- include Decidim::LayoutHelper
12
- include Decidim::IconHelper
13
11
 
14
12
  private
15
13
 
@@ -1,6 +1,6 @@
1
1
  <div class="filters__section scope_id_scopes_picker_filter">
2
2
  <fieldset>
3
- <legend class="mini-title"><%= legend_title %></legend>
3
+ <legend><%= legend_title %></legend>
4
4
  <div id="<%= picker_options_id %>" class="data-picker <%= picker_options_class %>" data-picker-name="<%= picker_options_name %>">
5
5
  <% if values_on_top? %>
6
6
  <%= render :scope_picker_values %>
@@ -3,7 +3,6 @@
3
3
  module Decidim
4
4
  # This cell is used to display scopes picker in a form
5
5
  class ScopesPickerCell < Decidim::ViewModel
6
- include Decidim::ApplicationHelper
7
6
  include Decidim::Core::Engine.routes.url_helpers
8
7
  include ActionView::Helpers::FormOptionsHelper
9
8
  include Decidim::FiltersHelper
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Decidim
4
- # This cell renders the reuslts of the global search page.
4
+ # This cell renders the results of the global search page.
5
5
  class SearchResultsCell < Decidim::ViewModel
6
6
  include Decidim::SearchesHelper
7
7
  include Decidim::CardHelper
@@ -3,8 +3,6 @@
3
3
  module Decidim
4
4
  # This cell renders a Statistic of a Resource
5
5
  class StatisticCell < Decidim::ViewModel
6
- include ActionView::Helpers::NumberHelper
7
-
8
6
  private
9
7
 
10
8
  def stat_number
@@ -3,7 +3,7 @@
3
3
  <ul class="tab-x-container tabs-<%= tabs.length %>">
4
4
  <% tabs.each_with_index do |tab, i| %>
5
5
  <li>
6
- <button id="trigger-<%= tab[:id] %>" class="tab-x" data-controls="panel-<%= tab[:id] %>" data-open="<%= "true" if i.zero? %>">
6
+ <button type="button" id="trigger-<%= tab[:id] %>" class="tab-x" data-controls="panel-<%= tab[:id] %>" data-open="<%= "true" if selected?(tab, i) %>">
7
7
  <%= icon tab[:icon], class: "text-gray fill-current" %><%= tab[:text] %> <% "tabs-1" %>
8
8
  </button>
9
9
  </li>
@@ -17,8 +17,6 @@ module Decidim
17
17
  # The `model` is expected to be a resource with HasAttachments concern
18
18
  #
19
19
  class TabPanelsCell < Decidim::ViewModel
20
- include IconHelper
21
-
22
20
  def show
23
21
  return if model.blank?
24
22
 
@@ -36,5 +34,17 @@ module Decidim
36
34
  def panels
37
35
  @panels ||= items.map { |item| item.slice(:id, :method, :args) }
38
36
  end
37
+
38
+ def selected_tab
39
+ @selected_tab ||= items.find { |item| item[:selected] }
40
+ end
41
+
42
+ def selected?(tab, index)
43
+ if selected_tab
44
+ tab[:id] == selected_tab[:id]
45
+ else
46
+ index.zero?
47
+ end
48
+ end
39
49
  end
40
50
  end
@@ -9,8 +9,6 @@ module Decidim
9
9
  # <%= cell("decidim/category", model.category, context: {resource: model}) %>
10
10
  #
11
11
  class TagsCell < Decidim::ViewModel
12
- include Decidim::SanitizeHelper
13
-
14
12
  def show
15
13
  render if category? || scope?
16
14
  end
@@ -7,11 +7,8 @@ module Decidim
7
7
  # - :sticky_form, the Accept updated TOS form in the TOS page.
8
8
  # - :refuse_btn_modal, the Modal with info when refusing the updated TOS.
9
9
  class TosPageCell < Decidim::ViewModel
10
- include Decidim::SanitizeHelper
11
10
  include Cell::ViewModel::Partial
12
11
 
13
- delegate :current_user, to: :controller, prefix: false
14
-
15
12
  def show
16
13
  return if model.nil?
17
14
  return unless current_user
@@ -1,4 +1,4 @@
1
- <div class="wrapper-mini translation-bar">
1
+ <div>
2
2
  <div class="row column">
3
3
  <%= link %>
4
4
  <span class="translation-button-help"><%= help_text %></span>
@@ -4,8 +4,6 @@ module Decidim
4
4
  # This cell is used to render a button to toggle machine translations. It will
5
5
  # only render if the translations are enabled.
6
6
  class TranslationBarCell < Decidim::ViewModel
7
- include Decidim::TranslatableAttributes
8
-
9
7
  def show
10
8
  return unless renderable?
11
9
 
@@ -19,7 +19,7 @@
19
19
  </div>
20
20
  <% end %>
21
21
 
22
- <div class="active-uploads upload-modal__files" data-active-uploads="<%= modal_id %>">
22
+ <div class="upload-modal__files" data-active-uploads="<%= modal_id %>">
23
23
  <% attachments.each do |attachment| %>
24
24
  <% next if [Array, Hash].any? { |klass| attachment.is_a? klass } %>
25
25
 
@@ -3,10 +3,8 @@
3
3
  module Decidim
4
4
  # This cell creates the necessary elements for dynamic uploads.
5
5
  class UploadModalCell < Decidim::ViewModel
6
- include LayoutHelper
7
6
  include Cell::ViewModel::Partial
8
7
  include ERB::Util
9
- include Decidim::SanitizeHelper
10
8
 
11
9
  alias form model
12
10
 
@@ -154,7 +152,7 @@ module Decidim
154
152
  def determine_filename(attachment)
155
153
  return attachment.filename.to_s if attachment.is_a? ActiveStorage::Blob
156
154
  return blob(attachment).filename.to_s if blob(attachment).present?
157
- return attachment.original_filename.to_s.presence || attachhment.path.split("/").last if attachment.is_a? ActionDispatch::Http::UploadedFile
155
+ return attachment.original_filename.to_s.presence || attachment.path.split("/").last if attachment.is_a? ActionDispatch::Http::UploadedFile
158
156
 
159
157
  attachment.url.split("/").last
160
158
  end
@@ -1,4 +1,4 @@
1
- <div class="conversation">
1
+ <div>
2
2
  <%= render :conversation_header %>
3
3
 
4
4
  <div id="messages" class="space-y-6" data-scroll-last-child></div>
@@ -1,4 +1,4 @@
1
- <div class="conversation">
1
+ <div>
2
2
  <%= render :conversation_header %>
3
3
 
4
4
  <div id="messages" class="space-y-6" data-scroll-last-child>
@@ -3,7 +3,6 @@
3
3
  module Decidim
4
4
  class UserConversationCell < Decidim::ViewModel
5
5
  include Cell::ViewModel::Partial
6
- include Decidim::ApplicationHelper
7
6
  include Decidim::FormFactory
8
7
  include Decidim::Core::Engine.routes.url_helpers
9
8
 
@@ -1,4 +1,4 @@
1
- <div class="user-activity space-y-8">
1
+ <div class="space-y-8">
2
2
  <%= cell("decidim/announcement", t("decidim.user_conversations.index.conversations_info")) %>
3
3
  <%= render :new_conversation_button %>
4
4
  <% if conversations.empty? %>
@@ -6,7 +6,6 @@ module Decidim
6
6
  include CellsPaginateHelper
7
7
  include Decidim::Core::Engine.routes.url_helpers
8
8
  include ActionView::Helpers::DateHelper
9
- include Decidim::ApplicationHelper
10
9
 
11
10
  delegate :nickname, to: :user
12
11
 
@@ -5,7 +5,6 @@ module Decidim
5
5
  # Lists the invitations to user groups the given user has.
6
6
  class UserGroupPendingInvitationsListCell < Decidim::ViewModel
7
7
  include Decidim::CellsPaginateHelper
8
- include Decidim::ApplicationHelper
9
8
  include Decidim::Core::Engine.routes.url_helpers
10
9
  include Decidim::CardHelper
11
10
 
@@ -5,7 +5,6 @@ module Decidim
5
5
  # Lists the pending join requests of the given user group.
6
6
  class UserGroupPendingRequestsListCell < Decidim::ViewModel
7
7
  include Decidim::CellsPaginateHelper
8
- include Decidim::ApplicationHelper
9
8
  include Decidim::Core::Engine.routes.url_helpers
10
9
  include Decidim::CardHelper
11
10
 
@@ -1,4 +1,4 @@
1
- <div class="user-activity">
1
+ <div>
2
2
  <div id="activities" class="columns small-12">
3
3
  <% if activities.length == 0 %>
4
4
  <%= cell("decidim/announcement", t("decidim.user_activity.index.no_activities_warning"), callout_class: "warning") %>
@@ -3,11 +3,9 @@
3
3
  module Decidim
4
4
  class VersionCell < Decidim::ViewModel
5
5
  include Decidim::TraceabilityHelper
6
- include Decidim::LayoutHelper
7
- include Decidim::SanitizeHelper
8
6
 
9
7
  def resource_title
10
- decidim_html_escape(translated_attribute(versioned_resource.title))
8
+ decidim_escape_translated(versioned_resource.title)
11
9
  end
12
10
 
13
11
  def current_version
@@ -34,8 +32,8 @@ module Decidim
34
32
  i18n("back_to_resource")
35
33
  end
36
34
 
37
- def i18n(string, **params)
38
- t(string, **params, scope: i18n_scope, default: t(string, **params, scope: default_i18n_scope))
35
+ def i18n(string, **)
36
+ t(string, **, scope: i18n_scope, default: t(string, **, scope: default_i18n_scope))
39
37
  end
40
38
 
41
39
  def i18n_scope
@@ -2,14 +2,12 @@
2
2
 
3
3
  module Decidim
4
4
  class VersionsListCell < Decidim::ViewModel
5
- include Decidim::SanitizeHelper
6
-
7
5
  def versioned_resource
8
6
  model
9
7
  end
10
8
 
11
9
  def resource_title
12
- decidim_html_escape(translated_attribute(versioned_resource.title))
10
+ decidim_escape_translated(versioned_resource.title)
13
11
  end
14
12
 
15
13
  def resource_path
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Decidim
4
4
  class VersionsListItemCell < Decidim::ViewModel
5
- include Decidim::LayoutHelper
6
-
7
5
  def version
8
6
  model
9
7
  end
@@ -28,8 +26,8 @@ module Decidim
28
26
  i18n("version_index", index:, total:)
29
27
  end
30
28
 
31
- def i18n(string, **params)
32
- t(string, **params, scope: i18n_scope, default: t(string, **params, scope: default_i18n_scope))
29
+ def i18n(string, **)
30
+ t(string, **, scope: i18n_scope, default: t(string, **, scope: default_i18n_scope))
33
31
  end
34
32
 
35
33
  def i18n_scope
@@ -1,6 +1,6 @@
1
1
  <div class="columns large-3">
2
2
  <% if wizard_aside_back_url %>
3
- <div class="m-bottom">
3
+ <div>
4
4
  <%= link_to wizard_aside_back_url do %>
5
5
  <%= icon "arrow-left-s-line", class: "icon--small", role: "img", "aria-hidden": true %>
6
6
  <%= i18n_wizard_aside_back %>
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  <% end %>
10
10
 
11
- <div class="show-for-large">
11
+ <div>
12
12
  <%= wizard_stepper %>
13
13
  </div>
14
14
  </div>
@@ -6,13 +6,12 @@
6
6
 
7
7
  <h2>
8
8
  <%= wizard_header_title %>
9
- <%= wizard_header_similar_resources_count %>
10
9
  </h2>
11
10
 
12
- <div class="hide-for-large m-bottom">
11
+ <div>
13
12
  <%= wizard_header_see_steps %>
14
13
 
15
- <div id="steps" class="is-hidden" data-toggler=".is-hidden">
14
+ <div id="steps" data-toggler="#steps">
16
15
  <%= wizard_stepper %>
17
16
  </div>
18
17
  </div>
@@ -5,8 +5,6 @@ module Decidim
5
5
  # Is designed to be used by different models and so it does not try to compute
6
6
  # the information likely to change. Expects a Hash with all necessary data.
7
7
  class WizardStepFormCell < Decidim::ViewModel
8
- include Decidim::LayoutHelper
9
-
10
8
  def show
11
9
  render view
12
10
  end
@@ -89,12 +87,6 @@ module Decidim
89
87
  view_options[:wizard_header_title]
90
88
  end
91
89
 
92
- # Returns the similar resources count for the compare step.
93
- def wizard_header_similar_resources_count
94
- count = view_options[:wizard_header_similar_resources_count]
95
- "(#{count})" if count
96
- end
97
-
98
90
  # Returns the header see steps information, only visible for small screens.
99
91
  def wizard_header_see_steps
100
92
  content_tag(:span) do
@@ -4,13 +4,14 @@ module Decidim
4
4
  module Amendable
5
5
  # A command with all the business logic when a user starts amending a resource.
6
6
  class CreateDraft < Decidim::Command
7
+ delegate :current_user, to: :form
8
+
7
9
  # Public: Initializes the command.
8
10
  #
9
- # form - A form object with the params.
11
+ # form - A form object with the params.
10
12
  def initialize(form)
11
13
  @form = form
12
14
  @amendable = form.amendable
13
- @current_user = form.current_user
14
15
  @user_group = Decidim::UserGroup.find_by(id: form.user_group_id)
15
16
  end
16
17
 
@@ -33,7 +34,7 @@ module Decidim
33
34
 
34
35
  private
35
36
 
36
- attr_reader :form, :amendable, :current_user, :user_group
37
+ attr_reader :form, :amendable, :user_group
37
38
 
38
39
  # Prevent PaperTrail from creating an additional version
39
40
  # in the amendment multi-step creation process (step 1: create)
@@ -4,6 +4,8 @@ module Decidim
4
4
  module Amendable
5
5
  # A command with all the business logic when a user promotes a rejected emendation.
6
6
  class Promote < Decidim::Command
7
+ delegate :current_user, to: :form
8
+
7
9
  # Public: Initializes the command.
8
10
  #
9
11
  # emendation - The emendation to promote.
@@ -14,7 +16,6 @@ module Decidim
14
16
  @emendation = form.emendation
15
17
  @amendable = form.amendable
16
18
  @amender = form.amender
17
- @current_user = form.current_user
18
19
  end
19
20
 
20
21
  # Executes the command. Broadcasts these events:
@@ -37,7 +38,7 @@ module Decidim
37
38
 
38
39
  private
39
40
 
40
- attr_reader :form, :amendment, :amender, :current_user
41
+ attr_reader :form, :amendment, :amender
41
42
 
42
43
  # The log of this action contains unique information:
43
44
  # extra_log_info = { promoted_from: emendation.id }
@@ -4,6 +4,8 @@ module Decidim
4
4
  module Amendable
5
5
  # A command with all the business logic when a user publishes an amendment draft.
6
6
  class PublishDraft < Decidim::Command
7
+ delegate :current_user, to: :form
8
+
7
9
  # Public: Initializes the command.
8
10
  #
9
11
  # form - A form object with the params.
@@ -13,7 +15,6 @@ module Decidim
13
15
  @amendable = form.amendable
14
16
  @emendation = form.emendation
15
17
  @amender = form.amender
16
- @current_user = form.current_user
17
18
  end
18
19
 
19
20
  # Executes the command. Broadcasts these events:
@@ -39,7 +40,7 @@ module Decidim
39
40
 
40
41
  private
41
42
 
42
- attr_reader :form, :amendment, :amendable, :emendation, :amender, :current_user
43
+ attr_reader :form, :amendment, :amendable, :emendation, :amender
43
44
 
44
45
  # To be able to diff amendments we store the original attributes being amended
45
46
  # in the first PaperTrail::Version.
@@ -4,15 +4,16 @@ module Decidim
4
4
  module Amendable
5
5
  # A command with all the business logic when a user updates and amendment draft.
6
6
  class UpdateDraft < Decidim::Command
7
+ delegate :current_user, to: :form
8
+
7
9
  # Public: Initializes the command.
8
10
  #
9
- # form - A form object with the params.
11
+ # form - A form object with the params.
10
12
  def initialize(form)
11
13
  @form = form
12
14
  @amendment = form.amendment
13
15
  @amender = form.amender
14
16
  @emendation = form.emendation
15
- @current_user = form.current_user
16
17
  @user_group = Decidim::UserGroup.find_by(id: form.user_group_id)
17
18
  end
18
19
 
@@ -35,7 +36,7 @@ module Decidim
35
36
 
36
37
  private
37
38
 
38
- attr_reader :form, :amendment, :amender, :emendation, :current_user, :user_group
39
+ attr_reader :form, :amendment, :amender, :emendation, :user_group
39
40
 
40
41
  # Prevent PaperTrail from creating an additional version
41
42
  # in the amendment multi-step creation process (step 3: complete)
@@ -18,7 +18,7 @@ module Decidim
18
18
  # Executes the command. Broadcasts these events:
19
19
  #
20
20
  # - :ok when everything is valid, together with the resource.
21
- # - :invalid if the resource already has supports or does not belong to current user.
21
+ # - :invalid if the resource already has votes or does not belong to current user.
22
22
  #
23
23
  # Returns nothing.
24
24
  def call
@@ -3,13 +3,13 @@
3
3
  module Decidim
4
4
  # A command with all the business logic for when a user starts following a resource.
5
5
  class CreateFollow < Decidim::Command
6
+ delegate :current_user, to: :form
7
+
6
8
  # Public: Initializes the command.
7
9
  #
8
10
  # form - A form object with the params.
9
- # current_user - The current user.
10
- def initialize(form, current_user)
11
+ def initialize(form)
11
12
  @form = form
12
- @current_user = current_user
13
13
  end
14
14
 
15
15
  # Executes the command. Broadcasts these events:
@@ -29,7 +29,7 @@ module Decidim
29
29
 
30
30
  private
31
31
 
32
- attr_reader :follow, :form, :current_user
32
+ attr_reader :follow, :form
33
33
 
34
34
  def create_follow!
35
35
  @follow = Follow.find_by(
@@ -3,15 +3,15 @@
3
3
  module Decidim
4
4
  # A command with all the business logic when a user creates a report.
5
5
  class CreateReport < Decidim::Command
6
+ delegate :current_user, to: :form
7
+
6
8
  # Public: Initializes the command.
7
9
  #
8
10
  # form - A form object with the params.
9
11
  # reportable - The resource being reported
10
- # current_user - The current user.
11
- def initialize(form, reportable, current_user)
12
+ def initialize(form, reportable)
12
13
  @form = form
13
14
  @reportable = reportable
14
- @current_user = current_user
15
15
  @tool = Decidim::ModerationTools.new(reportable, current_user)
16
16
  end
17
17
 
@@ -3,15 +3,15 @@
3
3
  module Decidim
4
4
  # A command with all the business logic when a user creates a report.
5
5
  class CreateUserReport < Decidim::Command
6
+ delegate :current_user, to: :form
7
+
6
8
  # Public: Initializes the command.
7
9
  #
8
10
  # form - A form object with the params.
9
11
  # reportable - The resource being reported
10
- # current_user - The current user.
11
- def initialize(form, reportable, current_user)
12
+ def initialize(form, reportable)
12
13
  @form = form
13
14
  @reportable = reportable
14
- @current_user = current_user
15
15
  end
16
16
 
17
17
  # Executes the command. Broadcasts these events:
@@ -44,7 +44,7 @@ module Decidim
44
44
  def create_report!
45
45
  @report = UserReport.create!(
46
46
  moderation: @moderation,
47
- user: @current_user,
47
+ user: current_user,
48
48
  reason: form.reason,
49
49
  details: form.details
50
50
  )
@@ -55,7 +55,7 @@ module Decidim
55
55
  end
56
56
 
57
57
  def send_notification_to_admins!
58
- @current_user.organization.admins.each do |admin|
58
+ current_user.organization.admins.each do |admin|
59
59
  next unless admin.email_on_moderations
60
60
 
61
61
  Decidim::UserReportJob.perform_later(admin, report)
@@ -3,13 +3,13 @@
3
3
  module Decidim
4
4
  # A command with all the business logic for when a user stops following a resource.
5
5
  class DeleteFollow < Decidim::Command
6
+ delegate :current_user, to: :form
7
+
6
8
  # Public: Initializes the command.
7
9
  #
8
10
  # form - A form object with the params.
9
- # current_user - The current user.
10
- def initialize(form, current_user)
11
+ def initialize(form)
11
12
  @form = form
12
- @current_user = current_user
13
13
  end
14
14
 
15
15
  # Executes the command. Broadcasts these events:
@@ -29,7 +29,7 @@ module Decidim
29
29
 
30
30
  private
31
31
 
32
- attr_reader :form, :current_user
32
+ attr_reader :form
33
33
 
34
34
  def delete_follow!
35
35
  form.follow.destroy!
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Decidim
4
4
  # A command with all the business logic to demote an admin. This means
5
- # removing their admin righta dn converting them to a basic member. It is the
6
- # coutnerpart of `PromoteMembership`.
5
+ # removing their admin right and converting them to a basic member. It is the
6
+ # counterpart of `PromoteMembership`.
7
7
  class DemoteMembership < Decidim::Command
8
8
  # Public: Initializes the command.
9
9
  #