decidim-decidim_awesome 0.10.1 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-decidim_awesome might be problematic. Click here for more details.

Files changed (263) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -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_m_cell_override.rb → proposal_l_cell_override.rb} +10 -4
  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 +1 -1
  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/proposal_votes_controller_override.rb +3 -3
  33. data/app/controllers/decidim/decidim_awesome/admin/application_controller.rb +2 -0
  34. data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +14 -10
  35. data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +10 -9
  36. data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +23 -20
  37. data/app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb +6 -10
  38. data/app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb +76 -0
  39. data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +6 -10
  40. data/app/controllers/decidim/decidim_awesome/admin/proposal_custom_fields_controller.rb +14 -6
  41. data/app/controllers/decidim/decidim_awesome/admin/scoped_admins_controller.rb +2 -2
  42. data/app/controllers/decidim/decidim_awesome/admin/scoped_styles_controller.rb +2 -2
  43. data/app/controllers/decidim/decidim_awesome/blank_component_controller.rb +8 -3
  44. data/app/controllers/decidim/decidim_awesome/editor_images_controller.rb +3 -3
  45. data/app/controllers/decidim/decidim_awesome/iframe_component/iframe_controller.rb +18 -5
  46. data/app/forms/concerns/decidim/decidim_awesome/proposals/proposal_form_override.rb +21 -0
  47. data/app/forms/{decidim → concerns/decidim}/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb +2 -1
  48. data/app/forms/decidim/decidim_awesome/admin/config_form.rb +28 -14
  49. data/app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb +2 -2
  50. data/app/forms/decidim/decidim_awesome/admin/intergram_form.rb +4 -0
  51. data/app/forms/decidim/decidim_awesome/admin/menu_form.rb +4 -4
  52. data/app/helpers/concerns/decidim/decidim_awesome/amendments_helper_override.rb +65 -0
  53. data/app/helpers/concerns/decidim/decidim_awesome/breadcrumb_helper_override.rb +23 -0
  54. data/app/helpers/concerns/decidim/decidim_awesome/proposals/application_helper_override.rb +110 -0
  55. data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +6 -27
  56. data/app/helpers/decidim/decidim_awesome/map_helper.rb +8 -27
  57. data/app/jobs/decidim/decidim_awesome/destroy_private_data_job.rb +22 -0
  58. data/app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb +5 -4
  59. data/app/middleware/decidim/decidim_awesome/current_config.rb +3 -5
  60. data/app/models/concerns/decidim/decidim_awesome/has_proposal_extra_fields.rb +39 -10
  61. data/app/models/decidim/decidim_awesome/awesome_config.rb +1 -1
  62. data/app/models/decidim/decidim_awesome/paper_trail_version.rb +3 -3
  63. data/app/models/decidim/decidim_awesome/proposal_extra_field.rb +35 -1
  64. data/app/models/decidim/decidim_awesome/vote_weight.rb +2 -2
  65. data/app/overrides/decidim/proposals/admin/proposals/show/add_private_body.html.erb.deface +7 -0
  66. data/app/overrides/decidim/proposals/admin/proposals/show/replace_body.html.erb.deface +5 -0
  67. data/app/overrides/decidim/proposals/proposals/_proposal_aside/limit_amendments_modal.html.erb.deface +5 -0
  68. data/app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface +1 -1
  69. data/app/overrides/layouts/decidim/_decidim_javascript/add_awesome_tags.html.erb.deface +6 -0
  70. data/app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface +4 -11
  71. data/app/overrides/layouts/decidim/admin/_header/add_awesome_tags.html.erb.deface +9 -0
  72. data/app/packs/entrypoints/decidim_admin_decidim_awesome.js +1 -2
  73. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.js +4 -0
  74. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.scss +1 -0
  75. data/app/packs/entrypoints/decidim_decidim_awesome.js +2 -2
  76. data/app/packs/entrypoints/decidim_decidim_awesome_map.scss +1 -1
  77. data/app/packs/entrypoints/decidim_editor.js +14 -0
  78. data/app/packs/src/decidim/decidim_awesome/admin/auto_edit.js +96 -69
  79. data/app/packs/src/decidim/decidim_awesome/admin/check_redirections.js +46 -41
  80. data/app/packs/src/decidim/decidim_awesome/admin/codemirror.js +3 -3
  81. data/app/packs/src/decidim/decidim_awesome/admin/constraint_form_events.js +115 -0
  82. data/app/packs/src/decidim/decidim_awesome/admin/custom_fields_builder.js +9 -5
  83. data/app/packs/src/decidim/decidim_awesome/admin/form_exit_warn.js +22 -11
  84. data/app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js +26 -8
  85. data/app/packs/src/decidim/decidim_awesome/admin/tabs_change.js +31 -0
  86. data/app/packs/src/decidim/decidim_awesome/admin/user_picker.js +34 -21
  87. data/app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js +28 -0
  88. data/app/packs/src/decidim/decidim_awesome/awesome_admin.js +5 -16
  89. data/app/packs/src/decidim/decidim_awesome/awesome_admin_global.js +1 -0
  90. data/app/packs/src/decidim/decidim_awesome/awesome_application.js +1 -15
  91. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/fetcher.js +33 -11
  92. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/meetings_fetcher.js +9 -12
  93. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/proposals_fetcher.js +28 -0
  94. data/app/packs/src/decidim/decidim_awesome/awesome_map/awesome_map.js +3 -4
  95. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/controller.js +12 -12
  96. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/meetings_controller.js +11 -7
  97. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/proposals_controller.js +6 -13
  98. data/app/packs/src/decidim/decidim_awesome/awesome_map/controls_ui.js +51 -20
  99. data/app/packs/src/decidim/decidim_awesome/awesome_map/load_map.js +27 -18
  100. data/app/packs/src/decidim/decidim_awesome/editor/index.js +94 -0
  101. data/app/packs/src/decidim/decidim_awesome/forms/autosave.js +28 -23
  102. data/app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js +29 -25
  103. data/app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js +27 -32
  104. data/app/packs/src/decidim/decidim_awesome/proposals/custom_fields.js +31 -15
  105. data/app/packs/src/decidim/decidim_awesome/proposals/images.js +16 -10
  106. data/app/packs/src/decidim/decidim_awesome/voting/voting_cards.js +47 -38
  107. data/app/packs/stylesheets/decidim/decidim_awesome/admin/auto_edits.scss +11 -12
  108. data/app/packs/stylesheets/decidim/decidim_awesome/admin/check_redirections.scss +15 -0
  109. data/app/packs/stylesheets/decidim/decidim_awesome/admin/codemirror.scss +24 -12
  110. data/app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss +49 -29
  111. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_fields.scss +28 -71
  112. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_styles.scss +48 -0
  113. data/app/packs/stylesheets/decidim/decidim_awesome/admin/intergram_fixes.scss +11 -0
  114. data/app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss +17 -26
  115. data/app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss +5 -0
  116. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss +11 -49
  117. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss +19 -0
  118. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss +4 -19
  119. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_iframe/iframe.scss +1 -1
  120. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_map/map.scss +41 -35
  121. data/app/packs/stylesheets/decidim/decidim_awesome/forms/autosave.scss +6 -6
  122. data/app/packs/stylesheets/decidim/decidim_awesome/forms/custom_fields.scss +118 -0
  123. data/app/packs/stylesheets/decidim/decidim_awesome/shared/spinner.scss +26 -0
  124. data/app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss +41 -59
  125. data/app/permissions/decidim/decidim_awesome/admin/permissions.rb +14 -3
  126. data/app/permissions/decidim/decidim_awesome/permissions.rb +3 -4
  127. data/app/presenters/concerns/decidim/decidim_awesome/breadcrumb_root_menu_item_presenter_override.rb +23 -0
  128. data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_item_presenter_override.rb +10 -2
  129. data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_presenter_override.rb +8 -0
  130. data/app/presenters/concerns/decidim/decidim_awesome/proposals/proposal_presenter_override.rb +20 -0
  131. data/app/presenters/decidim/decidim_awesome/admin_log/component_presenter_override.rb +30 -0
  132. data/app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb +1 -1
  133. data/app/presenters/decidim/decidim_awesome/private_data_presenter.rb +70 -0
  134. data/app/presenters/decidim/decidim_awesome/user_entity_presenter.rb +1 -1
  135. data/app/queries/decidim/decidim_awesome/private_data_finder.rb +19 -0
  136. data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_methods.rb +72 -0
  137. data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_override.rb +38 -0
  138. data/app/serializers/decidim/decidim_awesome/proposals/private_proposal_serializer.rb +34 -0
  139. data/app/types/concerns/decidim/decidim_awesome/add_proposal_type_custom_fields.rb +59 -0
  140. data/app/types/concerns/decidim/decidim_awesome/{proposal_type_override.rb → add_proposal_type_vote_weights.rb} +3 -1
  141. data/app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb +23 -17
  142. data/app/views/decidim/decidim_awesome/admin/checks/index.html.erb +50 -48
  143. data/app/views/decidim/decidim_awesome/admin/config/_autoedit_box_label.html.erb +7 -2
  144. data/app/views/decidim/decidim_awesome/admin/config/_constraints.html.erb +25 -18
  145. data/app/views/decidim/decidim_awesome/admin/config/_form_admins.html.erb +7 -6
  146. data/app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb +12 -16
  147. data/app/views/decidim/decidim_awesome/admin/config/_form_livechat.html.erb +39 -23
  148. data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb +35 -17
  149. data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_private_custom_fields.html.erb +1 -0
  150. data/app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb +68 -80
  151. data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +16 -12
  152. data/app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb +8 -6
  153. data/app/views/decidim/decidim_awesome/admin/config/show.html.erb +22 -12
  154. data/app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb +1 -49
  155. data/app/views/decidim/decidim_awesome/admin/constraints/new.html.erb +14 -9
  156. data/app/views/decidim/decidim_awesome/admin/constraints/show.html.erb +14 -9
  157. data/app/views/decidim/decidim_awesome/admin/custom_redirects/_form.html.erb +20 -5
  158. data/app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb +5 -5
  159. data/app/views/decidim/decidim_awesome/admin/custom_redirects/index.html.erb +14 -13
  160. data/app/views/decidim/decidim_awesome/admin/custom_redirects/new.html.erb +5 -5
  161. data/app/views/decidim/decidim_awesome/admin/maintenance/_private_data.html.erb +44 -0
  162. data/app/views/decidim/decidim_awesome/admin/maintenance/show.html.erb +44 -0
  163. data/app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb +6 -6
  164. data/app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb +21 -12
  165. data/app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb +39 -42
  166. data/app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb +21 -12
  167. data/app/views/decidim/decidim_awesome/admin/proposals/_editor.html.erb +8 -5
  168. data/app/views/decidim/decidim_awesome/admin/proposals/_private_body.html.erb +20 -0
  169. data/app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb +14 -18
  170. data/app/views/decidim/decidim_awesome/amendments/_modal.html.erb +23 -0
  171. data/app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb +8 -2
  172. data/app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb +7 -12
  173. data/app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb +53 -37
  174. data/app/views/decidim/decidim_awesome/map_component/map/show.html.erb +14 -5
  175. data/app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb +0 -3
  176. data/app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb +9 -7
  177. data/app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb +9 -6
  178. data/app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb +12 -0
  179. data/app/views/layouts/decidim/decidim_awesome/admin/application.html.erb +1 -73
  180. data/app/views/layouts/decidim/decidim_awesome/admin/maintenance.html.erb +19 -0
  181. data/config/assets.rb +3 -33
  182. data/config/i18n-tasks.yml +23 -3
  183. data/config/locales/ca.yml +28 -17
  184. data/config/locales/cs.yml +39 -14
  185. data/config/locales/de.yml +25 -15
  186. data/config/locales/en.yml +125 -35
  187. data/config/locales/es.yml +26 -16
  188. data/config/locales/eu.yml +7 -3
  189. data/config/locales/fr.yml +25 -16
  190. data/config/locales/hu.yml +43 -8
  191. data/config/locales/it.yml +8 -15
  192. data/config/locales/ja.yml +26 -15
  193. data/config/locales/lt.yml +0 -4
  194. data/config/locales/nl.yml +9 -14
  195. data/config/locales/pt-BR.yml +9 -14
  196. data/config/locales/ro-RO.yml +0 -3
  197. data/config/locales/sv.yml +9 -9
  198. data/config/rubocop/disabled.yml +11 -0
  199. data/config/rubocop/faker.yml +480 -0
  200. data/config/rubocop/rails.yml +88 -0
  201. data/config/rubocop/rspec.yml +65 -0
  202. data/config/rubocop/ruby.yml +1210 -0
  203. data/db/migrate/20240306175331_rename_editor_images_awesome_config.rb +18 -0
  204. data/db/migrate/20240531224204_add_decidim_awesome_proposal_private_fields.rb +29 -0
  205. data/db/migrate/20240729164227_add_decidim_awesome_proposal_private_fields_date.rb +20 -0
  206. data/db/seeds.rb +3 -3
  207. data/lib/decidim/decidim_awesome/admin_engine.rb +26 -7
  208. data/lib/decidim/decidim_awesome/api/types/localized_custom_fields_type.rb +22 -0
  209. data/lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb +51 -0
  210. data/lib/decidim/decidim_awesome/awesome.rb +70 -19
  211. data/lib/decidim/decidim_awesome/awesome_helpers.rb +6 -2
  212. data/lib/decidim/decidim_awesome/checksums.yml +46 -44
  213. data/lib/decidim/decidim_awesome/config.rb +1 -1
  214. data/lib/decidim/decidim_awesome/custom_fields.rb +13 -5
  215. data/lib/decidim/decidim_awesome/engine.rb +165 -56
  216. data/lib/decidim/decidim_awesome/iframe_component/component.rb +1 -2
  217. data/lib/decidim/decidim_awesome/lock.rb +47 -0
  218. data/lib/decidim/decidim_awesome/map_component/component.rb +1 -1
  219. data/lib/decidim/decidim_awesome/menu.rb +165 -0
  220. data/lib/decidim/decidim_awesome/menu_hacker.rb +4 -8
  221. data/lib/decidim/decidim_awesome/system_checker.rb +2 -4
  222. data/lib/decidim/decidim_awesome/test/factories.rb +10 -10
  223. data/lib/decidim/decidim_awesome/test/initializer.rb +7 -12
  224. data/lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb +2 -2
  225. data/lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb +2 -2
  226. data/lib/decidim/decidim_awesome/test/shared_examples/{box_label_editor.rb → box_label_editor_examples.rb} +17 -17
  227. data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +23 -5
  228. data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +155 -0
  229. data/lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb +7 -7
  230. data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +42 -58
  231. data/lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb +9 -8
  232. data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +32 -24
  233. data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +97 -22
  234. data/lib/decidim/decidim_awesome/version.rb +2 -2
  235. data/lib/decidim/decidim_awesome/voting_manifest.rb +5 -10
  236. data/lib/decidim/decidim_awesome.rb +1 -2
  237. data/lib/tasks/decidim_awesome_active_storage_migrations_tasks.rake +1 -1
  238. data/lib/tasks/decidim_awesome_upgrade_tasks.rake +4 -0
  239. data/package.json +21 -30
  240. metadata +83 -61
  241. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/show.erb +0 -15
  242. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/vote_button.erb +0 -15
  243. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter_cell.rb +0 -21
  244. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal/show.erb +0 -16
  245. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal_cell.rb +0 -20
  246. data/app/cells/decidim/proposals/proposal_m/footer.erb +0 -13
  247. data/app/helpers/decidim/decidim_awesome/amendments_helper_override.rb +0 -48
  248. data/app/helpers/decidim/decidim_awesome/proposals/application_helper_override.rb +0 -78
  249. data/app/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb +0 -14
  250. data/app/overrides/layouts/decidim/admin/_application/add_intergram.html.erb.deface +0 -5
  251. data/app/overrides/layouts/decidim/admin/_header/replace_scripts.html.erb.deface +0 -6
  252. data/app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface +0 -3
  253. data/app/packs/entrypoints/decidim_admin_decidim_awesome_custom_fields.js +0 -2
  254. data/app/packs/entrypoints/decidim_decidim_awesome_admin_form_exit_warn.js +0 -1
  255. data/app/packs/src/decidim/decidim_awesome/admin/constraints.js +0 -55
  256. data/app/packs/src/decidim/decidim_awesome/editors/editor.js +0 -218
  257. data/app/packs/src/decidim/decidim_awesome/editors/tabs_focus.js +0 -22
  258. data/app/packs/stylesheets/decidim/decidim_awesome/editors/markdown_editor.scss +0 -19
  259. data/app/packs/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss +0 -58
  260. data/app/packs/stylesheets/vendor/select2-foundation-theme.scss +0 -348
  261. data/app/serializers/concerns/decidim/decidim_awesome/proposal_serializer_override.rb +0 -64
  262. data/app/views/decidim/decidim_awesome/admin/config/_modal.html.erb +0 -11
  263. 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.1
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Vergés
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-16 00:00:00.000000000 Z
11
+ date: 2024-08-01 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,35 +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/_application/add_intergram.html.erb.deface
200
- - app/overrides/layouts/decidim/admin/_header/replace_scripts.html.erb.deface
201
- - app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface
191
+ - app/overrides/layouts/decidim/admin/_header/add_awesome_tags.html.erb.deface
202
192
  - app/packs/entrypoints/decidim_admin_decidim_awesome.js
203
193
  - app/packs/entrypoints/decidim_admin_decidim_awesome.scss
204
- - 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
205
196
  - app/packs/entrypoints/decidim_decidim_awesome.js
206
197
  - app/packs/entrypoints/decidim_decidim_awesome.scss
207
- - app/packs/entrypoints/decidim_decidim_awesome_admin_form_exit_warn.js
208
198
  - app/packs/entrypoints/decidim_decidim_awesome_custom_fields.js
209
199
  - app/packs/entrypoints/decidim_decidim_awesome_iframe.scss
210
200
  - app/packs/entrypoints/decidim_decidim_awesome_map.js
211
201
  - app/packs/entrypoints/decidim_decidim_awesome_map.scss
202
+ - app/packs/entrypoints/decidim_editor.js
212
203
  - app/packs/images/decidim/decidim_awesome/handcard.svg
213
204
  - app/packs/images/decidim/decidim_awesome/handcheck.svg
214
205
  - app/packs/images/decidim/decidim_awesome/pokecode-logo.png
215
206
  - app/packs/src/decidim/decidim_awesome/admin/auto_edit.js
216
207
  - app/packs/src/decidim/decidim_awesome/admin/check_redirections.js
217
208
  - app/packs/src/decidim/decidim_awesome/admin/codemirror.js
218
- - app/packs/src/decidim/decidim_awesome/admin/constraints.js
209
+ - app/packs/src/decidim/decidim_awesome/admin/constraint_form_events.js
219
210
  - app/packs/src/decidim/decidim_awesome/admin/custom_fields_builder.js
220
211
  - app/packs/src/decidim/decidim_awesome/admin/form_exit_warn.js
221
212
  - app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js
213
+ - app/packs/src/decidim/decidim_awesome/admin/tabs_change.js
222
214
  - app/packs/src/decidim/decidim_awesome/admin/user_picker.js
215
+ - app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js
223
216
  - app/packs/src/decidim/decidim_awesome/awesome_admin.js
217
+ - app/packs/src/decidim/decidim_awesome/awesome_admin_global.js
224
218
  - app/packs/src/decidim/decidim_awesome/awesome_application.js
225
219
  - app/packs/src/decidim/decidim_awesome/awesome_map/api/api_fetcher.js
226
220
  - app/packs/src/decidim/decidim_awesome/awesome_map/api/fetcher.js
@@ -232,8 +226,7 @@ files:
232
226
  - app/packs/src/decidim/decidim_awesome/awesome_map/controllers/proposals_controller.js
233
227
  - app/packs/src/decidim/decidim_awesome/awesome_map/controls_ui.js
234
228
  - app/packs/src/decidim/decidim_awesome/awesome_map/load_map.js
235
- - app/packs/src/decidim/decidim_awesome/editors/editor.js
236
- - app/packs/src/decidim/decidim_awesome/editors/tabs_focus.js
229
+ - app/packs/src/decidim/decidim_awesome/editor/index.js
237
230
  - app/packs/src/decidim/decidim_awesome/forms/autosave.js
238
231
  - app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js
239
232
  - app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js
@@ -246,27 +239,38 @@ files:
246
239
  - app/packs/stylesheets/decidim/decidim_awesome/admin/codemirror.scss
247
240
  - app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss
248
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
249
244
  - app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss
245
+ - app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss
250
246
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss
247
+ - app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss
251
248
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss
252
249
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_iframe/iframe.scss
253
250
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_map/map.scss
254
- - app/packs/stylesheets/decidim/decidim_awesome/editors/markdown_editor.scss
255
- - app/packs/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss
256
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
257
254
  - app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss
258
- - app/packs/stylesheets/vendor/select2-foundation-theme.scss
259
255
  - app/permissions/decidim/decidim_awesome/admin/permissions.rb
260
256
  - app/permissions/decidim/decidim_awesome/permissions.rb
261
- - app/presenters/decidim/decidim_awesome/menu_item_presenter_override.rb
262
- - 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
263
262
  - app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb
264
263
  - app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb
264
+ - app/presenters/decidim/decidim_awesome/private_data_presenter.rb
265
265
  - app/presenters/decidim/decidim_awesome/role_base_presenter.rb
266
266
  - app/presenters/decidim/decidim_awesome/user_entity_presenter.rb
267
- - 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
268
270
  - app/serializers/decidim/decidim_awesome/paper_trail_version_serializer.rb
269
- - 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
270
274
  - app/uploaders/decidim/cw/decidim_awesome/image_uploader.rb
271
275
  - app/uploaders/decidim/decidim_awesome/image_uploader.rb
272
276
  - app/validators/concerns/decidim/decidim_awesome/etiquette_validator_override.rb
@@ -279,10 +283,10 @@ files:
279
283
  - app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb
280
284
  - app/views/decidim/decidim_awesome/admin/config/_form_livechat.html.erb
281
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
282
287
  - app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb
283
288
  - app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
284
289
  - app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb
285
- - app/views/decidim/decidim_awesome/admin/config/_modal.html.erb
286
290
  - app/views/decidim/decidim_awesome/admin/config/show.html.erb
287
291
  - app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb
288
292
  - app/views/decidim/decidim_awesome/admin/constraints/new.html.erb
@@ -291,25 +295,30 @@ files:
291
295
  - app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb
292
296
  - app/views/decidim/decidim_awesome/admin/custom_redirects/index.html.erb
293
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
294
300
  - app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb
295
301
  - app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb
296
302
  - app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb
297
303
  - app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb
298
304
  - app/views/decidim/decidim_awesome/admin/proposals/_editor.html.erb
305
+ - app/views/decidim/decidim_awesome/admin/proposals/_private_body.html.erb
299
306
  - app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb
307
+ - app/views/decidim/decidim_awesome/amendments/_modal.html.erb
300
308
  - app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb
301
309
  - app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb
302
310
  - app/views/decidim/decidim_awesome/map_component/map/_api_ready.html.erb
303
311
  - app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb
304
312
  - app/views/decidim/decidim_awesome/map_component/map/error.html.erb
305
313
  - app/views/decidim/decidim_awesome/map_component/map/show.html.erb
306
- - app/views/decidim/decidim_awesome/voting/voting_cards/_proposal_m_cell_footer.erb
307
314
  - app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb
308
315
  - app/views/decidim/decidim_awesome/voting/voting_cards/_show_votes_count.html.erb
309
316
  - app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb
310
317
  - app/views/layouts/decidim/decidim_awesome/_custom_styles.html.erb
311
318
  - app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb
319
+ - app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb
312
320
  - app/views/layouts/decidim/decidim_awesome/admin/application.html.erb
321
+ - app/views/layouts/decidim/decidim_awesome/admin/maintenance.html.erb
313
322
  - config/assets.rb
314
323
  - config/i18n-tasks.yml
315
324
  - config/locales/ca.yml
@@ -329,16 +338,26 @@ files:
329
338
  - config/locales/pt.yml
330
339
  - config/locales/ro-RO.yml
331
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
332
346
  - db/migrate/20200324170000_create_decidim_awesome_config.rb
333
347
  - db/migrate/20200324230936_create_awesome_editor_images.rb
334
348
  - db/migrate/20200403142257_create_decidim_awesome_config_constraints.rb
335
349
  - db/migrate/20210628150825_change_awesome_config_var_type.rb
336
350
  - db/migrate/20231006113837_create_decidim_awesome_vote_weights.rb
337
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
338
355
  - db/seeds.rb
339
356
  - lib/decidim/decidim_awesome.rb
340
357
  - lib/decidim/decidim_awesome/admin.rb
341
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
342
361
  - lib/decidim/decidim_awesome/awesome.rb
343
362
  - lib/decidim/decidim_awesome/awesome_helpers.rb
344
363
  - lib/decidim/decidim_awesome/checksums.yml
@@ -353,9 +372,11 @@ files:
353
372
  - lib/decidim/decidim_awesome/iframe_component/admin_engine.rb
354
373
  - lib/decidim/decidim_awesome/iframe_component/component.rb
355
374
  - lib/decidim/decidim_awesome/iframe_component/engine.rb
375
+ - lib/decidim/decidim_awesome/lock.rb
356
376
  - lib/decidim/decidim_awesome/map_component/admin_engine.rb
357
377
  - lib/decidim/decidim_awesome/map_component/component.rb
358
378
  - lib/decidim/decidim_awesome/map_component/engine.rb
379
+ - lib/decidim/decidim_awesome/menu.rb
359
380
  - lib/decidim/decidim_awesome/menu_hacker.rb
360
381
  - lib/decidim/decidim_awesome/system_checker.rb
361
382
  - lib/decidim/decidim_awesome/test/factories.rb
@@ -363,10 +384,11 @@ files:
363
384
  - lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb
364
385
  - lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb
365
386
  - lib/decidim/decidim_awesome/test/shared_examples/action_log_presenter_examples.rb
366
- - lib/decidim/decidim_awesome/test/shared_examples/box_label_editor.rb
387
+ - lib/decidim/decidim_awesome/test/shared_examples/box_label_editor_examples.rb
367
388
  - lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb
368
389
  - lib/decidim/decidim_awesome/test/shared_examples/controller_examples.rb
369
390
  - lib/decidim/decidim_awesome/test/shared_examples/current_config_examples.rb
391
+ - lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb
370
392
  - lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
371
393
  - lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb
372
394
  - lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb
@@ -391,14 +413,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
391
413
  requirements:
392
414
  - - ">="
393
415
  - !ruby/object:Gem::Version
394
- version: '2.7'
416
+ version: '3.1'
395
417
  required_rubygems_version: !ruby/object:Gem::Requirement
396
418
  requirements:
397
419
  - - ">="
398
420
  - !ruby/object:Gem::Version
399
421
  version: '0'
400
422
  requirements: []
401
- rubygems_version: 3.2.33
423
+ rubygems_version: 3.5.10
402
424
  signing_key:
403
425
  specification_version: 4
404
426
  summary: A decidim decidim_awesome module
@@ -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
@@ -1,78 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module DecidimAwesome
5
- module Proposals
6
- module ApplicationHelperOverride
7
- extend ActiveSupport::Concern
8
-
9
- included do
10
- alias_method :decidim_text_editor_for_proposal_body, :text_editor_for_proposal_body
11
- alias_method :decidim_safe_content?, :safe_content?
12
-
13
- # replace safe content to consider all custom fields save (then embeded html will be rendered)
14
- def safe_content?
15
- awesome_proposal_custom_fields.present? || decidim_safe_content?
16
- end
17
-
18
- # replace normal method to draw the editor
19
- def text_editor_for_proposal_body(form)
20
- custom_fields = awesome_proposal_custom_fields
21
-
22
- return decidim_text_editor_for_proposal_body(form) if custom_fields.blank?
23
-
24
- render_proposal_custom_fields_override(custom_fields, form, :body)
25
- end
26
-
27
- # replace admin method to draw the editor (multi lang)
28
- def admin_editor_for_proposal_body(form)
29
- custom_fields = awesome_proposal_custom_fields
30
-
31
- return form.translated(:editor, :body, hashtaggable: true) if custom_fields.blank?
32
-
33
- locales = form.send(:locales)
34
-
35
- return render_proposal_custom_fields_override(custom_fields, form, "body_#{locales.first}", locales.first) if locales.length == 1
36
-
37
- tabs_id = form.send(:sanitize_tabs_selector, form.options[:tabs_id] || "#{form.object_name}-body-tabs")
38
-
39
- label_tabs = form.content_tag(:div, class: "label--tabs") do
40
- field_label = form.send(:label_i18n, "body", form.label_for("proposal_custom_fields"))
41
-
42
- language_selector = "".html_safe
43
- language_selector = form.create_language_selector(locales, tabs_id, "body") if form.options[:label] != false
44
-
45
- safe_join [field_label, language_selector]
46
- end
47
-
48
- tabs_content = form.content_tag(:div, class: "tabs-content", data: { tabs_content: tabs_id }) do
49
- locales.each_with_index.inject("".html_safe) do |string, (locale, index)|
50
- tab_content_id = "#{tabs_id}-body-panel-#{index}"
51
- string + content_tag(:div, class: form.send(:tab_element_class_for, "panel", index), id: tab_content_id) do
52
- render_proposal_custom_fields_override(custom_fields, form, "body_#{locale}", locale)
53
- end
54
- end
55
- end
56
-
57
- safe_join [label_tabs, tabs_content]
58
- end
59
-
60
- def render_proposal_custom_fields_override(fields, form, name, locale = nil)
61
- custom_fields = Decidim::DecidimAwesome::CustomFields.new(fields)
62
- custom_fields.translate!
63
-
64
- body = if form_presenter.proposal.body.is_a?(Hash) && locale.present?
65
- form_presenter.body(extras: false, all_locales: true).with_indifferent_access[locale]
66
- else
67
- form_presenter.body(extras: false)
68
- end
69
-
70
- custom_fields.apply_xml(body) if body.present?
71
- form.object.errors.add(name, custom_fields.errors) if custom_fields.errors
72
- render partial: "decidim/decidim_awesome/custom_fields/form_render", locals: { spec: custom_fields.to_json, form: form, name: name }
73
- end
74
- end
75
- end
76
- end
77
- end
78
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Deface::Override.new(virtual_path: "layouts/decidim/_head",
4
- name: "legacy_awesome_scripts",
5
- insert_after: 'erb[loud]:contains(\'javascript_pack_tag "decidim_core"\')') do
6
- # NOTE THAT THIS ONLY APPLIES TO DECIDIM 0.26. This will be ignored in 0.27
7
- '
8
- <%= javascript_pack_tag "decidim_decidim_awesome", defer: false %>
9
- <%= javascript_pack_tag("decidim_decidim_awesome_custom_fields") if Decidim::DecidimAwesome.enabled?(:proposal_custom_fields) %>
10
- <% if show_public_intergram? %>
11
- <%= render partial: "layouts/decidim/decidim_awesome/intergram_widget", locals: { settings: organization_awesome_config[:intergram_for_public_settings] } %>
12
- <% end %>
13
- '
14
- end
@@ -1,5 +0,0 @@
1
- <!-- insert_bottom "body" -->
2
-
3
- <% if awesome_config[:intergram_for_admins] %>
4
- <%= render partial: "layouts/decidim/decidim_awesome/intergram_widget", locals: { settings: organization_awesome_config[:intergram_for_admins_settings] } %>
5
- <% end %>