decidim-decidim_awesome 0.10.2 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +177 -60
  4. data/app/cells/concerns/decidim/decidim_awesome/global_menu_cell_override.rb +20 -0
  5. data/app/cells/concerns/decidim/decidim_awesome/proposal_l_cell_override.rb +24 -0
  6. data/app/cells/decidim/decidim_awesome/content_blocks/map/show.erb +5 -12
  7. data/app/cells/decidim/decidim_awesome/content_blocks/map_cell.rb +9 -5
  8. data/app/cells/decidim/decidim_awesome/voting/proposal_metadata_cell.rb +54 -0
  9. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/modal.erb +18 -0
  10. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/show.erb +37 -32
  11. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_cell.rb +9 -4
  12. data/app/commands/concerns/decidim/decidim_awesome/admin/needs_constraint_helpers.rb +2 -2
  13. data/app/commands/concerns/decidim/decidim_awesome/proposals/admin/update_proposal_override.rb +31 -0
  14. data/app/commands/concerns/decidim/decidim_awesome/proposals/create_collaborative_draft_override.rb +27 -0
  15. data/app/commands/concerns/decidim/decidim_awesome/proposals/create_proposal_override.rb +27 -0
  16. data/app/commands/concerns/decidim/decidim_awesome/proposals/update_collaborative_draft_override.rb +27 -0
  17. data/app/commands/concerns/decidim/decidim_awesome/proposals/update_proposal_override.rb +26 -0
  18. data/app/commands/decidim/decidim_awesome/admin/create_constraint.rb +1 -1
  19. data/app/commands/decidim/decidim_awesome/admin/create_proposal_custom_field.rb +4 -3
  20. data/app/commands/decidim/decidim_awesome/admin/destroy_custom_redirect.rb +1 -1
  21. data/app/commands/decidim/decidim_awesome/admin/destroy_menu_hack.rb +1 -1
  22. data/app/commands/decidim/decidim_awesome/admin/destroy_proposal_custom_field.rb +6 -3
  23. data/app/commands/decidim/decidim_awesome/admin/rename_scope_label.rb +1 -1
  24. data/app/commands/decidim/decidim_awesome/admin/update_constraint.rb +1 -1
  25. data/app/commands/decidim/decidim_awesome/admin/update_custom_redirect.rb +2 -2
  26. data/app/commands/decidim/decidim_awesome/command.rb +1 -7
  27. data/app/controllers/concerns/decidim/decidim_awesome/admin/maintenance_context.rb +43 -0
  28. data/app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable_helper.rb +4 -3
  29. data/app/controllers/concerns/decidim/decidim_awesome/content_security_policy.rb +34 -0
  30. data/app/controllers/concerns/decidim/decidim_awesome/limit_pending_amendments.rb +35 -0
  31. data/app/controllers/concerns/decidim/decidim_awesome/not_found_redirect.rb +1 -1
  32. data/app/controllers/concerns/decidim/decidim_awesome/proposals/orderable_override.rb +9 -22
  33. data/app/controllers/concerns/decidim/decidim_awesome/proposals/proposal_votes_controller_override.rb +3 -3
  34. data/app/controllers/decidim/decidim_awesome/admin/admin_accountability_controller.rb +7 -7
  35. data/app/controllers/decidim/decidim_awesome/admin/application_controller.rb +2 -0
  36. data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +14 -10
  37. data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +10 -9
  38. data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +23 -20
  39. data/app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb +6 -10
  40. data/app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb +76 -0
  41. data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +6 -10
  42. data/app/controllers/decidim/decidim_awesome/admin/proposal_custom_fields_controller.rb +14 -6
  43. data/app/controllers/decidim/decidim_awesome/admin/scoped_admins_controller.rb +2 -2
  44. data/app/controllers/decidim/decidim_awesome/admin/scoped_styles_controller.rb +2 -2
  45. data/app/controllers/decidim/decidim_awesome/blank_component_controller.rb +8 -3
  46. data/app/controllers/decidim/decidim_awesome/editor_images_controller.rb +3 -3
  47. data/app/controllers/decidim/decidim_awesome/iframe_component/iframe_controller.rb +18 -5
  48. data/app/forms/concerns/decidim/decidim_awesome/proposals/proposal_form_override.rb +21 -0
  49. data/app/forms/{decidim → concerns/decidim}/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb +2 -1
  50. data/app/forms/decidim/decidim_awesome/admin/config_form.rb +28 -14
  51. data/app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb +2 -2
  52. data/app/forms/decidim/decidim_awesome/admin/intergram_form.rb +4 -0
  53. data/app/forms/decidim/decidim_awesome/admin/menu_form.rb +4 -4
  54. data/app/helpers/concerns/decidim/decidim_awesome/amendments_helper_override.rb +65 -0
  55. data/app/helpers/concerns/decidim/decidim_awesome/breadcrumb_helper_override.rb +23 -0
  56. data/app/helpers/concerns/decidim/decidim_awesome/proposals/application_helper_override.rb +110 -0
  57. data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +6 -27
  58. data/app/helpers/decidim/decidim_awesome/map_helper.rb +8 -27
  59. data/app/jobs/decidim/decidim_awesome/destroy_private_data_job.rb +22 -0
  60. data/app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb +5 -4
  61. data/app/middleware/decidim/decidim_awesome/current_config.rb +3 -5
  62. data/app/models/concerns/decidim/decidim_awesome/has_proposal_extra_fields.rb +39 -10
  63. data/app/models/decidim/decidim_awesome/awesome_config.rb +1 -1
  64. data/app/models/decidim/decidim_awesome/paper_trail_version.rb +8 -4
  65. data/app/models/decidim/decidim_awesome/proposal_extra_field.rb +35 -1
  66. data/app/models/decidim/decidim_awesome/vote_weight.rb +2 -2
  67. data/app/overrides/decidim/proposals/admin/proposals/show/add_private_body.html.erb.deface +7 -0
  68. data/app/overrides/decidim/proposals/admin/proposals/show/replace_body.html.erb.deface +5 -0
  69. data/app/overrides/decidim/proposals/proposals/_proposal_aside/limit_amendments_modal.html.erb.deface +5 -0
  70. data/app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface +1 -1
  71. data/app/overrides/layouts/decidim/_decidim_javascript/add_awesome_tags.html.erb.deface +6 -0
  72. data/app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface +4 -11
  73. data/app/overrides/layouts/decidim/admin/_header/{replace_scripts.html.erb.deface → add_awesome_tags.html.erb.deface} +4 -4
  74. data/app/packs/entrypoints/decidim_admin_decidim_awesome.js +1 -2
  75. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.js +4 -0
  76. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.scss +1 -0
  77. data/app/packs/entrypoints/decidim_decidim_awesome.js +2 -2
  78. data/app/packs/entrypoints/decidim_decidim_awesome_map.scss +1 -1
  79. data/app/packs/entrypoints/decidim_editor.js +14 -0
  80. data/app/packs/src/decidim/decidim_awesome/admin/auto_edit.js +96 -69
  81. data/app/packs/src/decidim/decidim_awesome/admin/check_redirections.js +46 -41
  82. data/app/packs/src/decidim/decidim_awesome/admin/codemirror.js +3 -3
  83. data/app/packs/src/decidim/decidim_awesome/admin/constraint_form_events.js +115 -0
  84. data/app/packs/src/decidim/decidim_awesome/admin/custom_fields_builder.js +9 -5
  85. data/app/packs/src/decidim/decidim_awesome/admin/form_exit_warn.js +22 -11
  86. data/app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js +26 -8
  87. data/app/packs/src/decidim/decidim_awesome/admin/tabs_change.js +31 -0
  88. data/app/packs/src/decidim/decidim_awesome/admin/user_picker.js +34 -21
  89. data/app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js +28 -0
  90. data/app/packs/src/decidim/decidim_awesome/awesome_admin.js +5 -16
  91. data/app/packs/src/decidim/decidim_awesome/awesome_admin_global.js +1 -0
  92. data/app/packs/src/decidim/decidim_awesome/awesome_application.js +1 -15
  93. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/fetcher.js +33 -11
  94. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/meetings_fetcher.js +9 -12
  95. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/proposals_fetcher.js +28 -0
  96. data/app/packs/src/decidim/decidim_awesome/awesome_map/awesome_map.js +3 -4
  97. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/controller.js +12 -12
  98. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/meetings_controller.js +11 -7
  99. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/proposals_controller.js +6 -13
  100. data/app/packs/src/decidim/decidim_awesome/awesome_map/controls_ui.js +51 -20
  101. data/app/packs/src/decidim/decidim_awesome/awesome_map/load_map.js +27 -18
  102. data/app/packs/src/decidim/decidim_awesome/editor/index.js +94 -0
  103. data/app/packs/src/decidim/decidim_awesome/forms/autosave.js +28 -23
  104. data/app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js +29 -25
  105. data/app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js +27 -32
  106. data/app/packs/src/decidim/decidim_awesome/proposals/custom_fields.js +31 -15
  107. data/app/packs/src/decidim/decidim_awesome/proposals/images.js +16 -10
  108. data/app/packs/src/decidim/decidim_awesome/voting/voting_cards.js +47 -38
  109. data/app/packs/stylesheets/decidim/decidim_awesome/admin/auto_edits.scss +11 -12
  110. data/app/packs/stylesheets/decidim/decidim_awesome/admin/check_redirections.scss +15 -0
  111. data/app/packs/stylesheets/decidim/decidim_awesome/admin/codemirror.scss +24 -12
  112. data/app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss +49 -29
  113. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_fields.scss +28 -71
  114. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_styles.scss +48 -0
  115. data/app/packs/stylesheets/decidim/decidim_awesome/admin/intergram_fixes.scss +11 -0
  116. data/app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss +17 -26
  117. data/app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss +5 -0
  118. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss +11 -49
  119. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss +19 -0
  120. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss +4 -19
  121. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_iframe/iframe.scss +1 -1
  122. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_map/map.scss +41 -35
  123. data/app/packs/stylesheets/decidim/decidim_awesome/forms/autosave.scss +6 -6
  124. data/app/packs/stylesheets/decidim/decidim_awesome/forms/custom_fields.scss +118 -0
  125. data/app/packs/stylesheets/decidim/decidim_awesome/shared/spinner.scss +26 -0
  126. data/app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss +41 -59
  127. data/app/permissions/decidim/decidim_awesome/admin/permissions.rb +14 -3
  128. data/app/permissions/decidim/decidim_awesome/permissions.rb +3 -4
  129. data/app/presenters/concerns/decidim/decidim_awesome/breadcrumb_root_menu_item_presenter_override.rb +23 -0
  130. data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_item_presenter_override.rb +10 -2
  131. data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_presenter_override.rb +8 -0
  132. data/app/presenters/concerns/decidim/decidim_awesome/proposals/proposal_presenter_override.rb +20 -0
  133. data/app/presenters/decidim/decidim_awesome/admin_log/component_presenter_override.rb +30 -0
  134. data/app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb +1 -1
  135. data/app/presenters/decidim/decidim_awesome/private_data_presenter.rb +70 -0
  136. data/app/presenters/decidim/decidim_awesome/user_entity_presenter.rb +1 -1
  137. data/app/queries/decidim/decidim_awesome/private_data_finder.rb +19 -0
  138. data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_methods.rb +72 -0
  139. data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_override.rb +38 -0
  140. data/app/serializers/decidim/decidim_awesome/proposals/private_proposal_serializer.rb +34 -0
  141. data/app/types/concerns/decidim/decidim_awesome/add_proposal_type_custom_fields.rb +59 -0
  142. data/app/types/concerns/decidim/decidim_awesome/{proposal_type_override.rb → add_proposal_type_vote_weights.rb} +3 -1
  143. data/app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb +23 -17
  144. data/app/views/decidim/decidim_awesome/admin/checks/index.html.erb +50 -48
  145. data/app/views/decidim/decidim_awesome/admin/config/_autoedit_box_label.html.erb +7 -2
  146. data/app/views/decidim/decidim_awesome/admin/config/_constraints.html.erb +25 -18
  147. data/app/views/decidim/decidim_awesome/admin/config/_form_admins.html.erb +7 -6
  148. data/app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb +12 -16
  149. data/app/views/decidim/decidim_awesome/admin/config/_form_livechat.html.erb +39 -23
  150. data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb +35 -17
  151. data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_private_custom_fields.html.erb +1 -0
  152. data/app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb +68 -80
  153. data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +16 -12
  154. data/app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb +8 -6
  155. data/app/views/decidim/decidim_awesome/admin/config/show.html.erb +22 -12
  156. data/app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb +1 -49
  157. data/app/views/decidim/decidim_awesome/admin/constraints/new.html.erb +14 -9
  158. data/app/views/decidim/decidim_awesome/admin/constraints/show.html.erb +14 -9
  159. data/app/views/decidim/decidim_awesome/admin/custom_redirects/_form.html.erb +20 -5
  160. data/app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb +5 -5
  161. data/app/views/decidim/decidim_awesome/admin/custom_redirects/index.html.erb +14 -13
  162. data/app/views/decidim/decidim_awesome/admin/custom_redirects/new.html.erb +5 -5
  163. data/app/views/decidim/decidim_awesome/admin/maintenance/_private_data.html.erb +44 -0
  164. data/app/views/decidim/decidim_awesome/admin/maintenance/show.html.erb +44 -0
  165. data/app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb +6 -6
  166. data/app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb +21 -12
  167. data/app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb +39 -42
  168. data/app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb +21 -12
  169. data/app/views/decidim/decidim_awesome/admin/proposals/_editor.html.erb +8 -5
  170. data/app/views/decidim/decidim_awesome/admin/proposals/_private_body.html.erb +20 -0
  171. data/app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb +14 -18
  172. data/app/views/decidim/decidim_awesome/amendments/_modal.html.erb +23 -0
  173. data/app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb +8 -2
  174. data/app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb +7 -12
  175. data/app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb +53 -37
  176. data/app/views/decidim/decidim_awesome/map_component/map/show.html.erb +14 -5
  177. data/app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb +0 -3
  178. data/app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb +9 -7
  179. data/app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb +9 -6
  180. data/app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb +12 -0
  181. data/app/views/layouts/decidim/decidim_awesome/admin/application.html.erb +1 -73
  182. data/app/views/layouts/decidim/decidim_awesome/admin/maintenance.html.erb +19 -0
  183. data/config/assets.rb +3 -33
  184. data/config/i18n-tasks.yml +23 -3
  185. data/config/locales/ca.yml +110 -23
  186. data/config/locales/cs.yml +121 -19
  187. data/config/locales/de.yml +61 -20
  188. data/config/locales/en.yml +125 -35
  189. data/config/locales/es.yml +109 -22
  190. data/config/locales/eu.yml +22 -5
  191. data/config/locales/fr.yml +107 -20
  192. data/config/locales/hu.yml +53 -12
  193. data/config/locales/it.yml +22 -20
  194. data/config/locales/ja.yml +107 -20
  195. data/config/locales/lt.yml +0 -8
  196. data/config/locales/nl.yml +16 -17
  197. data/config/locales/pt-BR.yml +23 -20
  198. data/config/locales/pt-PT.yml +0 -1
  199. data/config/locales/ro-RO.yml +11 -7
  200. data/config/locales/sv.yml +24 -13
  201. data/config/rubocop/disabled.yml +11 -0
  202. data/config/rubocop/faker.yml +480 -0
  203. data/config/rubocop/rails.yml +88 -0
  204. data/config/rubocop/rspec.yml +65 -0
  205. data/config/rubocop/ruby.yml +1210 -0
  206. data/db/migrate/20240306175331_rename_editor_images_awesome_config.rb +18 -0
  207. data/db/migrate/20240531224204_add_decidim_awesome_proposal_private_fields.rb +29 -0
  208. data/db/migrate/20240729164227_add_decidim_awesome_proposal_private_fields_date.rb +20 -0
  209. data/db/seeds.rb +3 -3
  210. data/lib/decidim/decidim_awesome/admin_engine.rb +26 -7
  211. data/lib/decidim/decidim_awesome/api/types/localized_custom_fields_type.rb +22 -0
  212. data/lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb +51 -0
  213. data/lib/decidim/decidim_awesome/awesome.rb +74 -23
  214. data/lib/decidim/decidim_awesome/awesome_helpers.rb +6 -2
  215. data/lib/decidim/decidim_awesome/checksums.yml +47 -44
  216. data/lib/decidim/decidim_awesome/config.rb +1 -1
  217. data/lib/decidim/decidim_awesome/custom_fields.rb +13 -5
  218. data/lib/decidim/decidim_awesome/engine.rb +165 -56
  219. data/lib/decidim/decidim_awesome/iframe_component/component.rb +1 -2
  220. data/lib/decidim/decidim_awesome/lock.rb +47 -0
  221. data/lib/decidim/decidim_awesome/map_component/component.rb +1 -1
  222. data/lib/decidim/decidim_awesome/menu.rb +165 -0
  223. data/lib/decidim/decidim_awesome/menu_hacker.rb +4 -8
  224. data/lib/decidim/decidim_awesome/system_checker.rb +2 -4
  225. data/lib/decidim/decidim_awesome/test/factories.rb +10 -10
  226. data/lib/decidim/decidim_awesome/test/initializer.rb +7 -12
  227. data/lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb +2 -2
  228. data/lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb +2 -2
  229. data/lib/decidim/decidim_awesome/test/shared_examples/{box_label_editor.rb → box_label_editor_examples.rb} +17 -17
  230. data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +23 -5
  231. data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +155 -0
  232. data/lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb +7 -7
  233. data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +42 -58
  234. data/lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb +9 -8
  235. data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +32 -24
  236. data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +97 -22
  237. data/lib/decidim/decidim_awesome/version.rb +2 -2
  238. data/lib/decidim/decidim_awesome/voting_manifest.rb +5 -10
  239. data/lib/decidim/decidim_awesome.rb +1 -2
  240. data/lib/tasks/decidim_awesome_active_storage_migrations_tasks.rake +1 -1
  241. data/lib/tasks/decidim_awesome_upgrade_tasks.rake +4 -0
  242. data/package.json +21 -30
  243. metadata +86 -63
  244. data/app/cells/concerns/decidim/decidim_awesome/proposal_m_cell_override.rb +0 -38
  245. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/show.erb +0 -15
  246. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/vote_button.erb +0 -15
  247. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter_cell.rb +0 -21
  248. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal/show.erb +0 -16
  249. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal_cell.rb +0 -20
  250. data/app/cells/decidim/proposals/proposal_m/footer.erb +0 -13
  251. data/app/helpers/decidim/decidim_awesome/amendments_helper_override.rb +0 -48
  252. data/app/helpers/decidim/decidim_awesome/proposals/application_helper_override.rb +0 -78
  253. data/app/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb +0 -14
  254. data/app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface +0 -3
  255. data/app/packs/entrypoints/decidim_admin_decidim_awesome_custom_fields.js +0 -2
  256. data/app/packs/entrypoints/decidim_decidim_awesome_admin_form_exit_warn.js +0 -1
  257. data/app/packs/src/decidim/decidim_awesome/admin/constraints.js +0 -55
  258. data/app/packs/src/decidim/decidim_awesome/editors/editor.js +0 -218
  259. data/app/packs/src/decidim/decidim_awesome/editors/tabs_focus.js +0 -22
  260. data/app/packs/stylesheets/decidim/decidim_awesome/editors/markdown_editor.scss +0 -19
  261. data/app/packs/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss +0 -58
  262. data/app/packs/stylesheets/vendor/select2-foundation-theme.scss +0 -348
  263. data/app/serializers/concerns/decidim/decidim_awesome/proposal_serializer_override.rb +0 -64
  264. data/app/views/decidim/decidim_awesome/admin/config/_modal.html.erb +0 -11
  265. data/app/views/decidim/decidim_awesome/voting/voting_cards/_proposal_m_cell_footer.erb +0 -15
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-decidim_awesome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Vergés
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-21 00:00:00.000000000 Z
11
+ date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -16,40 +16,40 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.26.0
19
+ version: 0.28.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '0.28'
22
+ version: '0.29'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.26.0
29
+ version: 0.28.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.28'
32
+ version: '0.29'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: decidim-core
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 0.26.0
39
+ version: 0.28.0
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '0.28'
42
+ version: '0.29'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 0.26.0
49
+ version: 0.28.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '0.28'
52
+ version: '0.29'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: deface
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -78,26 +78,6 @@ dependencies:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
80
  version: '2.3'
81
- - !ruby/object:Gem::Dependency
82
- name: decidim-dev
83
- requirement: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- version: 0.26.0
88
- - - "<"
89
- - !ruby/object:Gem::Version
90
- version: '0.28'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: 0.26.0
98
- - - "<"
99
- - !ruby/object:Gem::Version
100
- version: '0.28'
101
81
  description: Some usability and UX tweaks for Decidim.
102
82
  email:
103
83
  - ivan@pokecode.net
@@ -109,23 +89,25 @@ files:
109
89
  - LICENSE-AGPLv3.txt
110
90
  - README.md
111
91
  - Rakefile
112
- - app/cells/concerns/decidim/decidim_awesome/proposal_m_cell_override.rb
92
+ - app/cells/concerns/decidim/decidim_awesome/global_menu_cell_override.rb
93
+ - app/cells/concerns/decidim/decidim_awesome/proposal_l_cell_override.rb
113
94
  - app/cells/decidim/decidim_awesome/content_blocks/map/error.erb
114
95
  - app/cells/decidim/decidim_awesome/content_blocks/map/show.erb
115
96
  - app/cells/decidim/decidim_awesome/content_blocks/map_cell.rb
116
97
  - app/cells/decidim/decidim_awesome/content_blocks/map_form/show.erb
117
98
  - app/cells/decidim/decidim_awesome/content_blocks/map_form_cell.rb
99
+ - app/cells/decidim/decidim_awesome/voting/proposal_metadata_cell.rb
118
100
  - app/cells/decidim/decidim_awesome/voting/voting_cards_base_cell.rb
119
- - app/cells/decidim/decidim_awesome/voting/voting_cards_counter/show.erb
120
- - app/cells/decidim/decidim_awesome/voting/voting_cards_counter/vote_button.erb
121
- - app/cells/decidim/decidim_awesome/voting/voting_cards_counter_cell.rb
101
+ - app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/modal.erb
122
102
  - app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/show.erb
123
103
  - app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/vote_block_for.erb
124
104
  - app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_cell.rb
125
- - app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal/show.erb
126
- - app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal_cell.rb
127
- - app/cells/decidim/proposals/proposal_m/footer.erb
128
105
  - app/commands/concerns/decidim/decidim_awesome/admin/needs_constraint_helpers.rb
106
+ - app/commands/concerns/decidim/decidim_awesome/proposals/admin/update_proposal_override.rb
107
+ - app/commands/concerns/decidim/decidim_awesome/proposals/create_collaborative_draft_override.rb
108
+ - app/commands/concerns/decidim/decidim_awesome/proposals/create_proposal_override.rb
109
+ - app/commands/concerns/decidim/decidim_awesome/proposals/update_collaborative_draft_override.rb
110
+ - app/commands/concerns/decidim/decidim_awesome/proposals/update_proposal_override.rb
129
111
  - app/commands/decidim/decidim_awesome/admin/create_constraint.rb
130
112
  - app/commands/decidim/decidim_awesome/admin/create_custom_redirect.rb
131
113
  - app/commands/decidim/decidim_awesome/admin/create_menu_hack.rb
@@ -145,8 +127,11 @@ files:
145
127
  - app/commands/decidim/decidim_awesome/admin/update_menu_hack.rb
146
128
  - app/commands/decidim/decidim_awesome/command.rb
147
129
  - app/commands/decidim/decidim_awesome/create_editor_image.rb
130
+ - app/controllers/concerns/decidim/decidim_awesome/admin/maintenance_context.rb
148
131
  - app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable.rb
149
132
  - app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable_helper.rb
133
+ - app/controllers/concerns/decidim/decidim_awesome/content_security_policy.rb
134
+ - app/controllers/concerns/decidim/decidim_awesome/limit_pending_amendments.rb
150
135
  - app/controllers/concerns/decidim/decidim_awesome/needs_awesome_config.rb
151
136
  - app/controllers/concerns/decidim/decidim_awesome/not_found_redirect.rb
152
137
  - app/controllers/concerns/decidim/decidim_awesome/proposals/orderable_override.rb
@@ -157,6 +142,7 @@ files:
157
142
  - app/controllers/decidim/decidim_awesome/admin/config_controller.rb
158
143
  - app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb
159
144
  - app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb
145
+ - app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb
160
146
  - app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb
161
147
  - app/controllers/decidim/decidim_awesome/admin/proposal_custom_fields_controller.rb
162
148
  - app/controllers/decidim/decidim_awesome/admin/scoped_admins_controller.rb
@@ -166,18 +152,21 @@ files:
166
152
  - app/controllers/decidim/decidim_awesome/editor_images_controller.rb
167
153
  - app/controllers/decidim/decidim_awesome/iframe_component/iframe_controller.rb
168
154
  - app/controllers/decidim/decidim_awesome/map_component/map_controller.rb
155
+ - app/forms/concerns/decidim/decidim_awesome/proposals/proposal_form_override.rb
156
+ - app/forms/concerns/decidim/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb
169
157
  - app/forms/decidim/decidim_awesome/admin/config_form.rb
170
158
  - app/forms/decidim/decidim_awesome/admin/constraint_form.rb
171
159
  - app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb
172
160
  - app/forms/decidim/decidim_awesome/admin/intergram_form.rb
173
161
  - app/forms/decidim/decidim_awesome/admin/menu_form.rb
174
162
  - app/forms/decidim/decidim_awesome/editor_image_form.rb
175
- - app/forms/decidim/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb
163
+ - app/helpers/concerns/decidim/decidim_awesome/amendments_helper_override.rb
164
+ - app/helpers/concerns/decidim/decidim_awesome/breadcrumb_helper_override.rb
165
+ - app/helpers/concerns/decidim/decidim_awesome/proposals/application_helper_override.rb
176
166
  - app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb
177
167
  - app/helpers/decidim/decidim_awesome/admin/system_checker_helpers.rb
178
- - app/helpers/decidim/decidim_awesome/amendments_helper_override.rb
179
168
  - app/helpers/decidim/decidim_awesome/map_helper.rb
180
- - app/helpers/decidim/decidim_awesome/proposals/application_helper_override.rb
169
+ - app/jobs/decidim/decidim_awesome/destroy_private_data_job.rb
181
170
  - app/jobs/decidim/decidim_awesome/export_admin_actions_job.rb
182
171
  - app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb
183
172
  - app/middleware/decidim/decidim_awesome/current_config.rb
@@ -192,34 +181,40 @@ files:
192
181
  - app/models/decidim/decidim_awesome/proposal_extra_field.rb
193
182
  - app/models/decidim/decidim_awesome/vote_weight.rb
194
183
  - app/overrides/decidim/proposals/admin/proposals/_form/replace_editor.html.erb.deface
184
+ - app/overrides/decidim/proposals/admin/proposals/show/add_private_body.html.erb.deface
185
+ - app/overrides/decidim/proposals/admin/proposals/show/replace_body.html.erb.deface
186
+ - app/overrides/decidim/proposals/proposals/_proposal_aside/limit_amendments_modal.html.erb.deface
195
187
  - app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface
196
188
  - app/overrides/decidim/proposals/proposals/_votes_count/replace_counter.html.erb.deface
197
- - app/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb
189
+ - app/overrides/layouts/decidim/_decidim_javascript/add_awesome_tags.html.erb.deface
198
190
  - app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface
199
- - app/overrides/layouts/decidim/admin/_header/replace_scripts.html.erb.deface
200
- - app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface
191
+ - app/overrides/layouts/decidim/admin/_header/add_awesome_tags.html.erb.deface
201
192
  - app/packs/entrypoints/decidim_admin_decidim_awesome.js
202
193
  - app/packs/entrypoints/decidim_admin_decidim_awesome.scss
203
- - app/packs/entrypoints/decidim_admin_decidim_awesome_custom_fields.js
194
+ - app/packs/entrypoints/decidim_admin_decidim_awesome_global.js
195
+ - app/packs/entrypoints/decidim_admin_decidim_awesome_global.scss
204
196
  - app/packs/entrypoints/decidim_decidim_awesome.js
205
197
  - app/packs/entrypoints/decidim_decidim_awesome.scss
206
- - app/packs/entrypoints/decidim_decidim_awesome_admin_form_exit_warn.js
207
198
  - app/packs/entrypoints/decidim_decidim_awesome_custom_fields.js
208
199
  - app/packs/entrypoints/decidim_decidim_awesome_iframe.scss
209
200
  - app/packs/entrypoints/decidim_decidim_awesome_map.js
210
201
  - app/packs/entrypoints/decidim_decidim_awesome_map.scss
202
+ - app/packs/entrypoints/decidim_editor.js
211
203
  - app/packs/images/decidim/decidim_awesome/handcard.svg
212
204
  - app/packs/images/decidim/decidim_awesome/handcheck.svg
213
205
  - app/packs/images/decidim/decidim_awesome/pokecode-logo.png
214
206
  - app/packs/src/decidim/decidim_awesome/admin/auto_edit.js
215
207
  - app/packs/src/decidim/decidim_awesome/admin/check_redirections.js
216
208
  - app/packs/src/decidim/decidim_awesome/admin/codemirror.js
217
- - app/packs/src/decidim/decidim_awesome/admin/constraints.js
209
+ - app/packs/src/decidim/decidim_awesome/admin/constraint_form_events.js
218
210
  - app/packs/src/decidim/decidim_awesome/admin/custom_fields_builder.js
219
211
  - app/packs/src/decidim/decidim_awesome/admin/form_exit_warn.js
220
212
  - app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js
213
+ - app/packs/src/decidim/decidim_awesome/admin/tabs_change.js
221
214
  - app/packs/src/decidim/decidim_awesome/admin/user_picker.js
215
+ - app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js
222
216
  - app/packs/src/decidim/decidim_awesome/awesome_admin.js
217
+ - app/packs/src/decidim/decidim_awesome/awesome_admin_global.js
223
218
  - app/packs/src/decidim/decidim_awesome/awesome_application.js
224
219
  - app/packs/src/decidim/decidim_awesome/awesome_map/api/api_fetcher.js
225
220
  - app/packs/src/decidim/decidim_awesome/awesome_map/api/fetcher.js
@@ -231,8 +226,7 @@ files:
231
226
  - app/packs/src/decidim/decidim_awesome/awesome_map/controllers/proposals_controller.js
232
227
  - app/packs/src/decidim/decidim_awesome/awesome_map/controls_ui.js
233
228
  - app/packs/src/decidim/decidim_awesome/awesome_map/load_map.js
234
- - app/packs/src/decidim/decidim_awesome/editors/editor.js
235
- - app/packs/src/decidim/decidim_awesome/editors/tabs_focus.js
229
+ - app/packs/src/decidim/decidim_awesome/editor/index.js
236
230
  - app/packs/src/decidim/decidim_awesome/forms/autosave.js
237
231
  - app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js
238
232
  - app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js
@@ -245,27 +239,38 @@ files:
245
239
  - app/packs/stylesheets/decidim/decidim_awesome/admin/codemirror.scss
246
240
  - app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss
247
241
  - app/packs/stylesheets/decidim/decidim_awesome/admin/custom_fields.scss
242
+ - app/packs/stylesheets/decidim/decidim_awesome/admin/custom_styles.scss
243
+ - app/packs/stylesheets/decidim/decidim_awesome/admin/intergram_fixes.scss
248
244
  - app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss
245
+ - app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss
249
246
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss
247
+ - app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss
250
248
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss
251
249
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_iframe/iframe.scss
252
250
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_map/map.scss
253
- - app/packs/stylesheets/decidim/decidim_awesome/editors/markdown_editor.scss
254
- - app/packs/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss
255
251
  - app/packs/stylesheets/decidim/decidim_awesome/forms/autosave.scss
252
+ - app/packs/stylesheets/decidim/decidim_awesome/forms/custom_fields.scss
253
+ - app/packs/stylesheets/decidim/decidim_awesome/shared/spinner.scss
256
254
  - app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss
257
- - app/packs/stylesheets/vendor/select2-foundation-theme.scss
258
255
  - app/permissions/decidim/decidim_awesome/admin/permissions.rb
259
256
  - app/permissions/decidim/decidim_awesome/permissions.rb
260
- - app/presenters/decidim/decidim_awesome/menu_item_presenter_override.rb
261
- - app/presenters/decidim/decidim_awesome/menu_presenter_override.rb
257
+ - app/presenters/concerns/decidim/decidim_awesome/breadcrumb_root_menu_item_presenter_override.rb
258
+ - app/presenters/concerns/decidim/decidim_awesome/menu_item_presenter_override.rb
259
+ - app/presenters/concerns/decidim/decidim_awesome/menu_presenter_override.rb
260
+ - app/presenters/concerns/decidim/decidim_awesome/proposals/proposal_presenter_override.rb
261
+ - app/presenters/decidim/decidim_awesome/admin_log/component_presenter_override.rb
262
262
  - app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb
263
263
  - app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb
264
+ - app/presenters/decidim/decidim_awesome/private_data_presenter.rb
264
265
  - app/presenters/decidim/decidim_awesome/role_base_presenter.rb
265
266
  - app/presenters/decidim/decidim_awesome/user_entity_presenter.rb
266
- - app/serializers/concerns/decidim/decidim_awesome/proposal_serializer_override.rb
267
+ - app/queries/decidim/decidim_awesome/private_data_finder.rb
268
+ - app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_methods.rb
269
+ - app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_override.rb
267
270
  - app/serializers/decidim/decidim_awesome/paper_trail_version_serializer.rb
268
- - app/types/concerns/decidim/decidim_awesome/proposal_type_override.rb
271
+ - app/serializers/decidim/decidim_awesome/proposals/private_proposal_serializer.rb
272
+ - app/types/concerns/decidim/decidim_awesome/add_proposal_type_custom_fields.rb
273
+ - app/types/concerns/decidim/decidim_awesome/add_proposal_type_vote_weights.rb
269
274
  - app/uploaders/decidim/cw/decidim_awesome/image_uploader.rb
270
275
  - app/uploaders/decidim/decidim_awesome/image_uploader.rb
271
276
  - app/validators/concerns/decidim/decidim_awesome/etiquette_validator_override.rb
@@ -278,10 +283,10 @@ files:
278
283
  - app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb
279
284
  - app/views/decidim/decidim_awesome/admin/config/_form_livechat.html.erb
280
285
  - app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
286
+ - app/views/decidim/decidim_awesome/admin/config/_form_proposal_private_custom_fields.html.erb
281
287
  - app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb
282
288
  - app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
283
289
  - app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb
284
- - app/views/decidim/decidim_awesome/admin/config/_modal.html.erb
285
290
  - app/views/decidim/decidim_awesome/admin/config/show.html.erb
286
291
  - app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb
287
292
  - app/views/decidim/decidim_awesome/admin/constraints/new.html.erb
@@ -290,25 +295,30 @@ files:
290
295
  - app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb
291
296
  - app/views/decidim/decidim_awesome/admin/custom_redirects/index.html.erb
292
297
  - app/views/decidim/decidim_awesome/admin/custom_redirects/new.html.erb
298
+ - app/views/decidim/decidim_awesome/admin/maintenance/_private_data.html.erb
299
+ - app/views/decidim/decidim_awesome/admin/maintenance/show.html.erb
293
300
  - app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb
294
301
  - app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb
295
302
  - app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb
296
303
  - app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb
297
304
  - app/views/decidim/decidim_awesome/admin/proposals/_editor.html.erb
305
+ - app/views/decidim/decidim_awesome/admin/proposals/_private_body.html.erb
298
306
  - app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb
307
+ - app/views/decidim/decidim_awesome/amendments/_modal.html.erb
299
308
  - app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb
300
309
  - app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb
301
310
  - app/views/decidim/decidim_awesome/map_component/map/_api_ready.html.erb
302
311
  - app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb
303
312
  - app/views/decidim/decidim_awesome/map_component/map/error.html.erb
304
313
  - app/views/decidim/decidim_awesome/map_component/map/show.html.erb
305
- - app/views/decidim/decidim_awesome/voting/voting_cards/_proposal_m_cell_footer.erb
306
314
  - app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb
307
315
  - app/views/decidim/decidim_awesome/voting/voting_cards/_show_votes_count.html.erb
308
316
  - app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb
309
317
  - app/views/layouts/decidim/decidim_awesome/_custom_styles.html.erb
310
318
  - app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb
319
+ - app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb
311
320
  - app/views/layouts/decidim/decidim_awesome/admin/application.html.erb
321
+ - app/views/layouts/decidim/decidim_awesome/admin/maintenance.html.erb
312
322
  - config/assets.rb
313
323
  - config/i18n-tasks.yml
314
324
  - config/locales/ca.yml
@@ -328,16 +338,26 @@ files:
328
338
  - config/locales/pt.yml
329
339
  - config/locales/ro-RO.yml
330
340
  - config/locales/sv.yml
341
+ - config/rubocop/disabled.yml
342
+ - config/rubocop/faker.yml
343
+ - config/rubocop/rails.yml
344
+ - config/rubocop/rspec.yml
345
+ - config/rubocop/ruby.yml
331
346
  - db/migrate/20200324170000_create_decidim_awesome_config.rb
332
347
  - db/migrate/20200324230936_create_awesome_editor_images.rb
333
348
  - db/migrate/20200403142257_create_decidim_awesome_config_constraints.rb
334
349
  - db/migrate/20210628150825_change_awesome_config_var_type.rb
335
350
  - db/migrate/20231006113837_create_decidim_awesome_vote_weights.rb
336
351
  - db/migrate/20231006113841_create_decidim_awesome_proposal_extra_fields.rb
352
+ - db/migrate/20240306175331_rename_editor_images_awesome_config.rb
353
+ - db/migrate/20240531224204_add_decidim_awesome_proposal_private_fields.rb
354
+ - db/migrate/20240729164227_add_decidim_awesome_proposal_private_fields_date.rb
337
355
  - db/seeds.rb
338
356
  - lib/decidim/decidim_awesome.rb
339
357
  - lib/decidim/decidim_awesome/admin.rb
340
358
  - lib/decidim/decidim_awesome/admin_engine.rb
359
+ - lib/decidim/decidim_awesome/api/types/localized_custom_fields_type.rb
360
+ - lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb
341
361
  - lib/decidim/decidim_awesome/awesome.rb
342
362
  - lib/decidim/decidim_awesome/awesome_helpers.rb
343
363
  - lib/decidim/decidim_awesome/checksums.yml
@@ -352,9 +372,11 @@ files:
352
372
  - lib/decidim/decidim_awesome/iframe_component/admin_engine.rb
353
373
  - lib/decidim/decidim_awesome/iframe_component/component.rb
354
374
  - lib/decidim/decidim_awesome/iframe_component/engine.rb
375
+ - lib/decidim/decidim_awesome/lock.rb
355
376
  - lib/decidim/decidim_awesome/map_component/admin_engine.rb
356
377
  - lib/decidim/decidim_awesome/map_component/component.rb
357
378
  - lib/decidim/decidim_awesome/map_component/engine.rb
379
+ - lib/decidim/decidim_awesome/menu.rb
358
380
  - lib/decidim/decidim_awesome/menu_hacker.rb
359
381
  - lib/decidim/decidim_awesome/system_checker.rb
360
382
  - lib/decidim/decidim_awesome/test/factories.rb
@@ -362,10 +384,11 @@ files:
362
384
  - lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb
363
385
  - lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb
364
386
  - lib/decidim/decidim_awesome/test/shared_examples/action_log_presenter_examples.rb
365
- - lib/decidim/decidim_awesome/test/shared_examples/box_label_editor.rb
387
+ - lib/decidim/decidim_awesome/test/shared_examples/box_label_editor_examples.rb
366
388
  - lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb
367
389
  - lib/decidim/decidim_awesome/test/shared_examples/controller_examples.rb
368
390
  - lib/decidim/decidim_awesome/test/shared_examples/current_config_examples.rb
391
+ - lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb
369
392
  - lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
370
393
  - lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb
371
394
  - lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb
@@ -382,7 +405,7 @@ licenses:
382
405
  - AGPL-3.0
383
406
  metadata:
384
407
  rubygems_mfa_required: 'true'
385
- post_install_message:
408
+ post_install_message:
386
409
  rdoc_options: []
387
410
  require_paths:
388
411
  - lib
@@ -390,15 +413,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
390
413
  requirements:
391
414
  - - ">="
392
415
  - !ruby/object:Gem::Version
393
- version: '2.7'
416
+ version: '3.1'
394
417
  required_rubygems_version: !ruby/object:Gem::Requirement
395
418
  requirements:
396
419
  - - ">="
397
420
  - !ruby/object:Gem::Version
398
421
  version: '0'
399
422
  requirements: []
400
- rubygems_version: 3.2.33
401
- signing_key:
423
+ rubygems_version: 3.5.10
424
+ signing_key:
402
425
  specification_version: 4
403
426
  summary: A decidim decidim_awesome module
404
427
  test_files: []
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module DecidimAwesome
5
- module ProposalMCellOverride
6
- extend ActiveSupport::Concern
7
-
8
- included do
9
- # rubocop:disable Metrics/CyclomaticComplexity
10
- def cache_hash
11
- hash = []
12
- hash << I18n.locale.to_s
13
- hash << model.cache_key_with_version
14
- hash << model.proposal_votes_count
15
- hash << model.extra_fields&.vote_weight_totals
16
- hash << model.endorsements_count
17
- hash << model.comments_count
18
- hash << Digest::MD5.hexdigest(model.component.cache_key_with_version)
19
- hash << Digest::MD5.hexdigest(resource_image_path) if resource_image_path
20
- hash << render_space? ? 1 : 0
21
- if current_user
22
- hash << current_user.cache_key_with_version
23
- hash << current_user.follows?(model) ? 1 : 0
24
- end
25
- hash << model.follows_count
26
- hash << Digest::MD5.hexdigest(model.authors.map(&:cache_key_with_version).to_s)
27
- hash << (model.must_render_translation?(model.organization) ? 1 : 0) if model.respond_to?(:must_render_translation?)
28
- hash << model.component.participatory_space.active_step.id if model.component.participatory_space.try(:active_step)
29
- hash << has_footer?
30
- hash << has_actions?
31
-
32
- hash.join(Decidim.cache_key_separator)
33
- end
34
- # rubocop:enable Metrics/CyclomaticComplexity
35
- end
36
- end
37
- end
38
- end
@@ -1,15 +0,0 @@
1
- <% unless proposal.rejected? || proposal.withdrawn? %>
2
- <% unless current_settings.votes_hidden? %>
3
- <span class="votes_counter">
4
- <span data-weight="3" title="<%= proposal.manifest.label_for(3) %>" class="weight_3"><%= t("decidim.decidim_awesome.voting.voting_cards.weights.weight_3_short") %> <%= model.weight_count(3) %></span> |
5
- <span data-weight="2" title="<%= proposal.manifest.label_for(2) %>" class="weight_2"><%= t("decidim.decidim_awesome.voting.voting_cards.weights.weight_2_short") %> <%= model.weight_count(2) %></span> |
6
- <span data-weight="1" title="<%= proposal.manifest.label_for(1) %>" class="weight_1"><%= t("decidim.decidim_awesome.voting.voting_cards.weights.weight_1_short") %> <%= model.weight_count(1) %></span>
7
- <% if current_component.settings.voting_cards_show_abstain %>
8
- | <span title="<%= proposal.manifest.label_for(0) %>" data-weight="0" class="weight_0"><%= t("decidim.decidim_awesome.voting.voting_cards.weights.weight_0_short") %> <%= model.weight_count(0) %></span>
9
- <% end %>
10
- </span>
11
- <% end %>
12
- <div id="proposal-<%= model.id %>-vote-button">
13
- <%= render "vote_button" %>
14
- </div>
15
- <% end %>
@@ -1,15 +0,0 @@
1
- <%= link_to resource_path,
2
- class: "button #{vote_btn_class} small button--sc#{" disabled" if current_settings.votes_blocked?}",
3
- title: t("decidim.decidim_awesome.voting.voting_cards.vote_button") do %>
4
- <% if user_voted_weight %>
5
- <%= icon "actions", class: "icon" %> <%= t("decidim.decidim_awesome.voting.voting_cards.voted") %>
6
- <% elsif proposal.maximum_votes_reached? && !proposal.can_accumulate_supports_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %>
7
- <%= t("decidim.proposals.proposals.vote_button.maximum_votes_reached") %>
8
- <% elsif vote_limit_enabled? && remaining_votes_count_for(current_user) <= 0 %>
9
- <%= t("decidim.proposals.proposals.vote_button.no_votes_remaining") %>
10
- <% elsif current_settings.votes_blocked? || !current_component.participatory_space.can_participate?(current_user) %>
11
- <%= t("decidim.proposals.proposals.vote_button.votes_blocked") %>
12
- <% else %>
13
- <%= t("decidim.decidim_awesome.voting.voting_cards.vote_button") %>
14
- <% end %>
15
- <% end %>
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module DecidimAwesome
5
- module Voting
6
- class VotingCardsCounterCell < VotingCardsBaseCell
7
- def show
8
- render :show
9
- end
10
-
11
- def resource_path
12
- resource_locator(model).path
13
- end
14
-
15
- def vote_btn_class
16
- user_voted_weight ? "weight_#{user_voted_weight.to_i}" : "hollow"
17
- end
18
- end
19
- end
20
- end
21
- end
@@ -1,16 +0,0 @@
1
- <!--the modal window will be used in another pr-->
2
- <div class="reveal vote_proposal_modal voting-voting_cards" id="VotingCardsModalHelp" data-reveal role="dialog" aria-modal="true" aria-labelledby="VotingCardsModalHelp-label">
3
- <div class="reveal__content">
4
- <div class="instructions"><%= vote_instructions %></div>
5
- <div class="current-choice voting-voting_cards"><div class="vote-card"></div></div>
6
- <div class="future-dismiss">
7
- <%= check_box_tag "voting_cards-skip_help", current_component.id, false %>
8
- <%= label_tag "voting_cards-skip_help", t("decidim.decidim_awesome.voting.voting_cards.modal.skip") %>
9
- </div>
10
-
11
- <div class="text-center">
12
- <button class="button vote-action"><%= t("decidim.decidim_awesome.voting.voting_cards.modal.proceed") %></button>
13
- <button class="button cancel-action hollow secondary" data-close><%= t("decidim.decidim_awesome.voting.voting_cards.modal.cancel") %></button>
14
- </div>
15
- </div>
16
- </div>
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module DecidimAwesome
5
- module Voting
6
- class VotingCardsProposalModalCell < VotingCardsBaseCell
7
- include Decidim::Proposals::Engine.routes.url_helpers
8
-
9
- def show
10
- render :show
11
- end
12
-
13
- def vote_instructions
14
- translated_attribute(current_component.settings.voting_cards_instructions).presence || t("decidim.decidim_awesome.voting.voting_cards.default_instructions_html",
15
- organization: current_organization.name)
16
- end
17
- end
18
- end
19
- end
20
- end
@@ -1,13 +0,0 @@
1
- <%#
2
- A hack for the Trailblazer Cell component, here we obtain the "parent" view
3
- https://github.com/trailblazer/cells/blob/master/lib/cell/view_model.rb#L102
4
- renders parent view by removing the awesome override from the paths
5
- %>
6
- <% original = normalize_options(:footer) %>
7
- <% original[:prefixes] = original[:prefixes].filter {|path| path != Decidim::DecidimAwesome::Engine.root.join("app/cells/decidim/proposals/proposal_m").to_s } %>
8
-
9
- <% if view = awesome_voting_manifest_for(current_component)&.proposal_m_cell_footer %>
10
- <%= render partial: view if view.present? %>
11
- <% else %>
12
- <%= render original %>
13
- <% end %>
@@ -1,48 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module DecidimAwesome
5
- module AmendmentsHelperOverride
6
- extend ActiveSupport::Concern
7
-
8
- included do
9
- # original method
10
- alias_method :decidim_amendments_form_field_for, :amendments_form_field_for
11
-
12
- # override with custom fields if scope applies
13
- def amendments_form_field_for(attribute, form, original_resource)
14
- custom_fields = awesome_custom_fields(attribute, form)
15
- return decidim_amendments_form_field_for(attribute, form, original_resource) if custom_fields.blank?
16
-
17
- render_amendment_custom_fields_override(custom_fields, attribute, form, original_resource)
18
- end
19
-
20
- private
21
-
22
- def render_amendment_custom_fields_override(fields, attribute, form, original_resource)
23
- custom_fields = Decidim::DecidimAwesome::CustomFields.new(fields)
24
- custom_fields.translate!
25
- body = amendments_form_fields_value(original_resource, attribute)
26
- custom_fields.apply_xml(body) if body.present?
27
- # TODO: find a way to add errors as form is not the parent form
28
- # form.object.errors.add(attribute, custom_fields.errors) if custom_fields.errors
29
- render partial: "decidim/decidim_awesome/custom_fields/form_render", locals: { spec: custom_fields.to_json, form: form, name: attribute }
30
- end
31
-
32
- # Amendments don't use a URL specifying participatory space and component
33
- # context for awesome config constraints must be obtained from the resource
34
- def awesome_custom_fields(attribute, _form)
35
- return unless attribute == :body
36
-
37
- component = amendable.try(:component)
38
- return unless component
39
- return if component.settings.participatory_texts_enabled?
40
-
41
- awesome_config = Decidim::DecidimAwesome::Config.new(component.organization)
42
- awesome_config.context_from_component(component)
43
- awesome_config.collect_sub_configs_values("proposal_custom_field")
44
- end
45
- end
46
- end
47
- end
48
- end