decidim-admin 0.26.10 → 0.27.0.rc1

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

Potentially problematic release.


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

Files changed (289) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/admin/attachments_privacy_warning/show.erb +3 -0
  3. data/app/cells/decidim/admin/attachments_privacy_warning_cell.rb +19 -0
  4. data/app/commands/decidim/admin/block_user.rb +3 -8
  5. data/app/commands/decidim/admin/close_session_managed_user.rb +1 -1
  6. data/app/commands/decidim/admin/create_area.rb +1 -1
  7. data/app/commands/decidim/admin/create_area_type.rb +6 -3
  8. data/app/commands/decidim/admin/create_attachment.rb +14 -6
  9. data/app/commands/decidim/admin/create_attachment_collection.rb +13 -4
  10. data/app/commands/decidim/admin/create_category.rb +6 -4
  11. data/app/commands/decidim/admin/create_component.rb +1 -1
  12. data/app/commands/decidim/admin/create_import.rb +4 -5
  13. data/app/commands/decidim/admin/create_import_example.rb +1 -1
  14. data/app/commands/decidim/admin/create_newsletter.rb +1 -1
  15. data/app/commands/decidim/admin/create_participatory_space_private_user.rb +1 -1
  16. data/app/commands/decidim/admin/create_scope.rb +1 -1
  17. data/app/commands/decidim/admin/create_scope_type.rb +6 -3
  18. data/app/commands/decidim/admin/create_static_page.rb +1 -1
  19. data/app/commands/decidim/admin/create_static_page_topic.rb +1 -1
  20. data/app/commands/decidim/admin/deliver_newsletter.rb +6 -6
  21. data/app/commands/decidim/admin/destroy_area.rb +1 -1
  22. data/app/commands/decidim/admin/destroy_category.rb +6 -3
  23. data/app/commands/decidim/admin/destroy_component.rb +1 -1
  24. data/app/commands/decidim/admin/destroy_newsletter.rb +1 -1
  25. data/app/commands/decidim/admin/destroy_participatory_space_private_user.rb +1 -1
  26. data/app/commands/decidim/admin/destroy_scope.rb +1 -1
  27. data/app/commands/decidim/admin/destroy_share_token.rb +1 -1
  28. data/app/commands/decidim/admin/destroy_static_page.rb +1 -1
  29. data/app/commands/decidim/admin/destroy_static_page_topic.rb +1 -1
  30. data/app/commands/decidim/admin/hide_resource.rb +2 -2
  31. data/app/commands/decidim/admin/impersonate_user.rb +1 -1
  32. data/app/commands/decidim/admin/invite_admin.rb +1 -1
  33. data/app/commands/decidim/admin/officialize_user.rb +1 -1
  34. data/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb +7 -3
  35. data/app/commands/decidim/admin/process_user_group_verification_csv.rb +8 -4
  36. data/app/commands/decidim/admin/promote_managed_user.rb +1 -1
  37. data/app/commands/decidim/admin/publish_component.rb +2 -2
  38. data/app/commands/decidim/admin/reject_user_group.rb +1 -1
  39. data/app/commands/decidim/admin/remove_admin.rb +1 -1
  40. data/app/commands/decidim/admin/reorder_content_blocks.rb +1 -1
  41. data/app/commands/decidim/admin/transfer_user.rb +1 -1
  42. data/app/commands/decidim/admin/unblock_user.rb +2 -2
  43. data/app/commands/decidim/admin/unhide_resource.rb +1 -1
  44. data/app/commands/decidim/admin/unofficialize_user.rb +1 -1
  45. data/app/commands/decidim/admin/unpublish_component.rb +1 -1
  46. data/app/commands/decidim/admin/unreport_resource.rb +1 -1
  47. data/app/commands/decidim/admin/unreport_user.rb +1 -1
  48. data/app/commands/decidim/admin/update_area.rb +1 -1
  49. data/app/commands/decidim/admin/update_area_type.rb +8 -3
  50. data/app/commands/decidim/admin/update_attachment.rb +4 -3
  51. data/app/commands/decidim/admin/update_attachment_collection.rb +8 -3
  52. data/app/commands/decidim/admin/update_category.rb +9 -5
  53. data/app/commands/decidim/admin/update_component.rb +8 -5
  54. data/app/commands/decidim/admin/update_component_permissions.rb +9 -6
  55. data/app/commands/decidim/admin/update_content_block.rb +1 -1
  56. data/app/commands/decidim/admin/update_external_domain_whitelist.rb +6 -3
  57. data/app/commands/decidim/admin/update_help_sections.rb +17 -3
  58. data/app/commands/decidim/admin/update_newsletter.rb +1 -1
  59. data/app/commands/decidim/admin/update_organization.rb +1 -1
  60. data/app/commands/decidim/admin/update_organization_appearance.rb +1 -1
  61. data/app/commands/decidim/admin/update_organization_tos_version.rb +1 -1
  62. data/app/commands/decidim/admin/update_resource_permissions.rb +2 -2
  63. data/app/commands/decidim/admin/update_scope.rb +1 -1
  64. data/app/commands/decidim/admin/update_scope_type.rb +8 -3
  65. data/app/commands/decidim/admin/update_static_page.rb +1 -1
  66. data/app/commands/decidim/admin/update_static_page_topic.rb +1 -1
  67. data/app/commands/decidim/admin/update_user_groups.rb +1 -1
  68. data/app/commands/decidim/admin/verify_user_group.rb +1 -1
  69. data/app/controllers/concerns/decidim/admin/filterable.rb +1 -1
  70. data/app/controllers/concerns/decidim/admin/participatory_space_export.rb +3 -1
  71. data/app/controllers/concerns/decidim/moderations/admin/filterable.rb +0 -4
  72. data/app/controllers/decidim/admin/admin_terms_controller.rb +1 -1
  73. data/app/controllers/decidim/admin/application_controller.rb +1 -2
  74. data/app/controllers/decidim/admin/area_types_controller.rb +6 -3
  75. data/app/controllers/decidim/admin/block_user_controller.rb +3 -3
  76. data/app/controllers/decidim/admin/categories_controller.rb +3 -3
  77. data/app/controllers/decidim/admin/component_permissions_controller.rb +1 -1
  78. data/app/controllers/decidim/admin/components/base_controller.rb +1 -0
  79. data/app/controllers/decidim/admin/components_controller.rb +1 -1
  80. data/app/controllers/decidim/admin/concerns/has_attachment_collections.rb +6 -3
  81. data/app/controllers/decidim/admin/concerns/has_attachments.rb +6 -3
  82. data/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb +7 -0
  83. data/app/controllers/decidim/admin/dashboard_controller.rb +4 -3
  84. data/app/controllers/decidim/admin/exports_controller.rb +4 -1
  85. data/app/controllers/decidim/admin/help_sections_controller.rb +1 -1
  86. data/app/controllers/decidim/admin/metrics_controller.rb +2 -1
  87. data/app/controllers/decidim/admin/moderations_controller.rb +9 -7
  88. data/app/controllers/decidim/admin/newsletter_templates_controller.rb +1 -1
  89. data/app/controllers/decidim/admin/newsletters_controller.rb +1 -1
  90. data/app/controllers/decidim/admin/organization_controller.rb +3 -4
  91. data/app/controllers/decidim/admin/organization_external_domain_whitelist_controller.rb +1 -1
  92. data/app/controllers/decidim/admin/reminders_controller.rb +61 -0
  93. data/app/controllers/decidim/admin/resource_permissions_controller.rb +3 -3
  94. data/app/controllers/decidim/admin/scope_types_controller.rb +6 -3
  95. data/app/controllers/decidim/admin/static_page_topics_controller.rb +3 -1
  96. data/app/controllers/decidim/admin/static_pages_controller.rb +1 -7
  97. data/app/forms/decidim/admin/block_user_form.rb +2 -2
  98. data/app/forms/decidim/admin/category_form.rb +1 -2
  99. data/app/forms/decidim/admin/component_form.rb +16 -7
  100. data/app/forms/decidim/admin/import_example_form.rb +1 -5
  101. data/app/forms/decidim/admin/import_form.rb +7 -10
  102. data/app/forms/decidim/admin/managed_user_promotion_form.rb +1 -1
  103. data/app/forms/decidim/admin/participatory_space_private_user_csv_import_form.rb +7 -4
  104. data/app/forms/decidim/admin/permission_form.rb +9 -8
  105. data/app/forms/decidim/admin/permissions_form.rb +1 -10
  106. data/app/forms/decidim/admin/user_group_csv_verification_form.rb +2 -2
  107. data/app/helpers/decidim/admin/bulk_actions_helper.rb +6 -5
  108. data/app/helpers/decidim/admin/moderations/reports_helper.rb +11 -2
  109. data/app/helpers/decidim/admin/reminders_helper.rb +12 -0
  110. data/app/helpers/decidim/admin/settings_helper.rb +11 -57
  111. data/app/models/decidim/admin/fake_newsletter.rb +0 -20
  112. data/app/packs/entrypoints/decidim_admin.js +3 -6
  113. data/app/packs/src/decidim/admin/admin_autocomplete.js +82 -0
  114. data/app/packs/src/decidim/admin/application.js +0 -16
  115. data/app/packs/src/decidim/admin/choose_language.js +9 -11
  116. data/app/packs/src/decidim/admin/draggable-list.js +1 -1
  117. data/app/packs/src/decidim/admin/dynamic_fields.component.js +0 -1
  118. data/app/packs/stylesheets/decidim/admin/_decidim.scss +0 -1
  119. data/app/packs/stylesheets/decidim/admin/extra/_quill.scss +0 -7
  120. data/app/packs/stylesheets/decidim/admin/modules/_autocomplete.scss +5 -0
  121. data/app/packs/stylesheets/decidim/admin/modules/_forms.scss +0 -6
  122. data/app/packs/stylesheets/decidim/admin/modules/_import_result.scss +10 -0
  123. data/app/packs/stylesheets/decidim/admin/modules/_modules.scss +3 -0
  124. data/app/packs/stylesheets/decidim/admin/modules/_upload_modal.scss +42 -0
  125. data/app/permissions/decidim/admin/permissions.rb +4 -46
  126. data/app/presenters/decidim/admin/dashboard_metric_charts_presenter.rb +3 -1
  127. data/app/queries/decidim/admin/active_users_counter.rb +1 -1
  128. data/app/queries/decidim/admin/newsletter_recipients.rb +2 -2
  129. data/app/queries/decidim/admin/user_filter.rb +1 -1
  130. data/app/queries/decidim/admin/user_groups_evaluation.rb +1 -1
  131. data/app/views/decidim/admin/area_types/edit.html.erb +0 -1
  132. data/app/views/decidim/admin/area_types/index.html.erb +0 -1
  133. data/app/views/decidim/admin/area_types/new.html.erb +0 -1
  134. data/app/views/decidim/admin/areas/edit.html.erb +0 -1
  135. data/app/views/decidim/admin/areas/index.html.erb +0 -1
  136. data/app/views/decidim/admin/areas/new.html.erb +0 -1
  137. data/app/views/decidim/admin/attachment_collections/edit.html.erb +0 -1
  138. data/app/views/decidim/admin/attachment_collections/index.html.erb +0 -1
  139. data/app/views/decidim/admin/attachment_collections/new.html.erb +0 -1
  140. data/app/views/decidim/admin/attachments/edit.html.erb +0 -1
  141. data/app/views/decidim/admin/attachments/index.html.erb +1 -1
  142. data/app/views/decidim/admin/attachments/new.html.erb +0 -1
  143. data/app/views/decidim/admin/authorization_workflows/index.html.erb +0 -1
  144. data/app/views/decidim/admin/categories/_form.html.erb +0 -4
  145. data/app/views/decidim/admin/categories/edit.html.erb +0 -1
  146. data/app/views/decidim/admin/categories/index.html.erb +0 -1
  147. data/app/views/decidim/admin/categories/new.html.erb +0 -1
  148. data/app/views/decidim/admin/categories/show.html.erb +1 -2
  149. data/app/views/decidim/admin/components/_component.html.erb +41 -3
  150. data/app/views/decidim/admin/components/edit.html.erb +0 -1
  151. data/app/views/decidim/admin/components/index.html.erb +0 -1
  152. data/app/views/decidim/admin/components/new.html.erb +1 -1
  153. data/app/views/decidim/admin/conflicts/index.html.erb +0 -1
  154. data/app/views/decidim/admin/dashboard/show.html.erb +1 -1
  155. data/app/views/decidim/admin/help_sections/show.erb +0 -1
  156. data/app/views/decidim/admin/impersonatable_users/index.html.erb +0 -1
  157. data/app/views/decidim/admin/impersonations/new.html.erb +0 -1
  158. data/app/views/decidim/admin/imports/new.html.erb +1 -1
  159. data/app/views/decidim/admin/logs/index.html.erb +0 -1
  160. data/app/views/decidim/admin/moderated_users/index.html.erb +1 -2
  161. data/app/views/decidim/admin/moderations/index.html.erb +4 -9
  162. data/app/views/decidim/admin/moderations/reports/index.html.erb +1 -5
  163. data/app/views/decidim/admin/newsletter_templates/index.html.erb +0 -1
  164. data/app/views/decidim/admin/newsletter_templates/show.html.erb +0 -1
  165. data/app/views/decidim/admin/newsletters/index.html.erb +0 -1
  166. data/app/views/decidim/admin/newsletters/new.html.erb +0 -1
  167. data/app/views/decidim/admin/newsletters/show.html.erb +0 -1
  168. data/app/views/decidim/admin/officializations/index.html.erb +10 -15
  169. data/app/views/decidim/admin/officializations/new.html.erb +0 -1
  170. data/app/views/decidim/admin/organization/edit.html.erb +0 -1
  171. data/app/views/decidim/admin/organization_appearance/edit.html.erb +0 -1
  172. data/app/views/decidim/admin/organization_appearance/form/_images.html.erb +5 -4
  173. data/app/views/decidim/admin/organization_external_domain_whitelist/edit.html.erb +0 -1
  174. data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +1 -1
  175. data/app/views/decidim/admin/participatory_space_private_users_csv_imports/new.html.erb +20 -1
  176. data/app/views/decidim/admin/reminders/new.html.erb +21 -0
  177. data/app/views/decidim/admin/resource_permissions/edit.html.erb +1 -1
  178. data/app/views/decidim/admin/scope_types/edit.html.erb +0 -1
  179. data/app/views/decidim/admin/scope_types/index.html.erb +0 -1
  180. data/app/views/decidim/admin/scope_types/new.html.erb +0 -1
  181. data/app/views/decidim/admin/scopes/edit.html.erb +0 -1
  182. data/app/views/decidim/admin/scopes/index.html.erb +0 -1
  183. data/app/views/decidim/admin/scopes/new.html.erb +0 -1
  184. data/app/views/decidim/admin/shared/_gallery.html.erb +6 -1
  185. data/app/views/decidim/admin/shared/_js-callout.html.erb +6 -0
  186. data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +0 -1
  187. data/app/views/decidim/admin/static_page_topics/edit.html.erb +0 -1
  188. data/app/views/decidim/admin/static_page_topics/new.html.erb +0 -1
  189. data/app/views/decidim/admin/static_pages/_form.html.erb +1 -1
  190. data/app/views/decidim/admin/static_pages/edit.html.erb +0 -1
  191. data/app/views/decidim/admin/static_pages/index.html.erb +0 -1
  192. data/app/views/decidim/admin/static_pages/new.html.erb +0 -1
  193. data/app/views/decidim/admin/user_groups/index.html.erb +0 -1
  194. data/app/views/decidim/admin/user_groups_csv_verifications/new.html.erb +0 -1
  195. data/app/views/decidim/admin/users/index.html.erb +0 -1
  196. data/app/views/decidim/admin/users/new.html.erb +0 -1
  197. data/app/views/decidim/admin/users_statistics/_users_count.html.erb +2 -2
  198. data/app/views/layouts/decidim/admin/_application.html.erb +2 -0
  199. data/app/views/layouts/decidim/admin/global_moderations.html.erb +0 -1
  200. data/config/locales/am-ET.yml +1 -0
  201. data/config/locales/ar.yml +44 -38
  202. data/config/locales/bg.yml +1 -0
  203. data/config/locales/ca.yml +39 -36
  204. data/config/locales/cs.yml +47 -42
  205. data/config/locales/da.yml +1 -0
  206. data/config/locales/de.yml +52 -52
  207. data/config/locales/el.yml +14 -65
  208. data/config/locales/en.yml +25 -23
  209. data/config/locales/eo.yml +1 -0
  210. data/config/locales/es-MX.yml +36 -33
  211. data/config/locales/es-PY.yml +36 -33
  212. data/config/locales/es.yml +39 -36
  213. data/config/locales/et.yml +1 -0
  214. data/config/locales/eu.yml +291 -324
  215. data/config/locales/fi-plain.yml +31 -28
  216. data/config/locales/fi.yml +36 -33
  217. data/config/locales/fr-CA.yml +35 -32
  218. data/config/locales/fr.yml +52 -49
  219. data/config/locales/ga-IE.yml +1 -0
  220. data/config/locales/gl.yml +33 -6
  221. data/config/locales/hr.yml +1 -0
  222. data/config/locales/hu.yml +44 -222
  223. data/config/locales/id-ID.yml +10 -10
  224. data/config/locales/is-IS.yml +6 -9
  225. data/config/locales/it.yml +22 -6
  226. data/config/locales/ja.yml +39 -37
  227. data/config/locales/ko.yml +1 -0
  228. data/config/locales/lb.yml +18 -7
  229. data/config/locales/lt.yml +21 -156
  230. data/config/locales/lv.yml +15 -4
  231. data/config/locales/mt.yml +1 -0
  232. data/config/locales/nl.yml +19 -68
  233. data/config/locales/no.yml +27 -10
  234. data/config/locales/om-ET.yml +1 -0
  235. data/config/locales/pl.yml +29 -25
  236. data/config/locales/pt-BR.yml +16 -85
  237. data/config/locales/pt.yml +19 -8
  238. data/config/locales/ro-RO.yml +32 -38
  239. data/config/locales/ru.yml +10 -9
  240. data/config/locales/si-LK.yml +1 -0
  241. data/config/locales/sk.yml +15 -4
  242. data/config/locales/sl.yml +1 -0
  243. data/config/locales/so-SO.yml +1 -0
  244. data/config/locales/sr-CS.yml +9 -20
  245. data/config/locales/sv.yml +39 -19
  246. data/config/locales/sw-KE.yml +1 -0
  247. data/config/locales/ti-ER.yml +1 -0
  248. data/config/locales/tr-TR.yml +19 -11
  249. data/config/locales/uk.yml +10 -6
  250. data/config/locales/val-ES.yml +1 -0
  251. data/config/locales/vi.yml +1 -0
  252. data/config/locales/zh-CN.yml +15 -4
  253. data/config/locales/zh-TW.yml +1 -1066
  254. data/config/routes.rb +0 -2
  255. data/lib/decidim/admin/engine.rb +1 -12
  256. data/lib/decidim/admin/form_builder.rb +2 -1
  257. data/lib/decidim/admin/import/importer.rb +9 -7
  258. data/lib/decidim/admin/import/readers/json.rb +1 -1
  259. data/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb +15 -2
  260. data/lib/decidim/admin/test/commands/create_category_examples.rb +16 -6
  261. data/lib/decidim/admin/test/commands/destroy_category_examples.rb +29 -1
  262. data/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb +15 -2
  263. data/lib/decidim/admin/test/commands/update_category_examples.rb +16 -6
  264. data/lib/decidim/admin/test/filters_participatory_space_user_roles_examples.rb +4 -4
  265. data/lib/decidim/admin/test/filters_participatory_space_users_examples.rb +4 -4
  266. data/lib/decidim/admin/test/forms/category_form_examples.rb +1 -21
  267. data/lib/decidim/admin/test/manage_attachments_examples.rb +9 -2
  268. data/lib/decidim/admin/test/manage_categories_examples.rb +0 -10
  269. data/lib/decidim/admin/test/manage_component_permissions_examples.rb +0 -2
  270. data/lib/decidim/admin/test/manage_moderations_examples.rb +27 -79
  271. data/lib/decidim/admin/test.rb +0 -1
  272. data/lib/decidim/admin/version.rb +1 -1
  273. metadata +22 -34
  274. data/app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb +0 -78
  275. data/app/packs/src/decidim/admin/autocomplete.component.js +0 -144
  276. data/app/packs/src/decidim/admin/autocomplete.component.test.js +0 -19
  277. data/app/packs/stylesheets/decidim/admin/components/_autocomplete_select.component.scss +0 -19
  278. data/app/views/decidim/admin/components/_actions.html.erb +0 -43
  279. data/config/environment.rb +0 -3
  280. data/config/locales/fa-IR.yml +0 -1
  281. data/config/locales/gn-PY.yml +0 -1
  282. data/config/locales/ka-GE.yml +0 -1
  283. data/config/locales/kaa.yml +0 -214
  284. data/config/locales/lo-LA.yml +0 -1
  285. data/config/locales/oc-FR.yml +0 -1
  286. data/config/locales/sq-AL.yml +0 -65
  287. data/config/locales/th-TH.yml +0 -1
  288. data/lib/decidim/admin/test/admin_participatory_space_access_examples.rb +0 -49
  289. data/lib/decidim/admin/test/needs_admin_tos_accepted_examples.rb +0 -9
@@ -29,20 +29,18 @@ module Decidim
29
29
  read_admin_dashboard_action?
30
30
  apply_newsletter_permissions_for_admin!
31
31
 
32
- apply_global_moderations_permission_for_admin!
32
+ allow! if permission_action.subject == :global_moderation
33
33
 
34
34
  if user.admin? && admin_terms_accepted?
35
35
  allow! if read_admin_log_action?
36
- allow! if read_user_statistics_action?
37
36
  allow! if read_metrics_action?
38
37
  allow! if static_page_action?
39
- allow! if templates_action?
40
38
  allow! if organization_action?
41
39
  allow! if user_action?
42
- allow! if admin_user_action?
43
40
 
44
41
  allow! if permission_action.subject == :category
45
42
  allow! if permission_action.subject == :component
43
+ allow! if permission_action.subject == :admin_user
46
44
  allow! if permission_action.subject == :attachment
47
45
  allow! if permission_action.subject == :editor_image
48
46
  allow! if permission_action.subject == :attachment_collection
@@ -58,6 +56,7 @@ module Decidim
58
56
  allow! if permission_action.subject == :static_page_topic
59
57
  allow! if permission_action.subject == :help_sections
60
58
  allow! if permission_action.subject == :share_token
59
+ allow! if permission_action.subject == :reminder
61
60
  end
62
61
 
63
62
  permission_action
@@ -78,23 +77,6 @@ module Decidim
78
77
  toggle_allow(user.admin? || space_allows_admin_access_to_current_action?)
79
78
  end
80
79
 
81
- def apply_global_moderations_permission_for_admin!
82
- return unless admin_terms_accepted?
83
- return unless permission_action.subject == :global_moderation
84
- return allow! if user.admin?
85
-
86
- return allow! if Decidim.participatory_space_manifests.flat_map.any? do |manifest|
87
- Decidim
88
- .find_participatory_space_manifest(manifest.name)
89
- .participatory_spaces
90
- .call(user.organization)&.any? do |space|
91
- space.respond_to?(:user_roles) && space.user_roles(:admin).where(user: user).or(space.user_roles(:moderator).where(user: user)).any?
92
- end
93
- end
94
-
95
- disallow!
96
- end
97
-
98
80
  def apply_newsletter_permissions_for_admin!
99
81
  return unless admin_terms_accepted?
100
82
  return unless permission_action.subject == :newsletter
@@ -120,11 +102,6 @@ module Decidim
120
102
  end
121
103
  end
122
104
 
123
- def read_user_statistics_action?
124
- permission_action.subject == :users_statistics &&
125
- permission_action.action == :read
126
- end
127
-
128
105
  def read_metrics_action?
129
106
  permission_action.subject == :metrics &&
130
107
  permission_action.action == :read
@@ -152,11 +129,6 @@ module Decidim
152
129
  end
153
130
  end
154
131
 
155
- def templates_action?
156
- permission_action.subject == :templates &&
157
- permission_action.action == :read
158
- end
159
-
160
132
  def organization_action?
161
133
  return unless permission_action.subject == :organization
162
134
  return unless permission_action.action == :update
@@ -168,7 +140,6 @@ module Decidim
168
140
  return unless permission_action.subject == :managed_user
169
141
  return user_manager_permissions if user_manager?
170
142
  return unless user&.admin?
171
- return unless user&.admin_terms_accepted?
172
143
 
173
144
  case permission_action.action
174
145
  when :create
@@ -200,19 +171,6 @@ module Decidim
200
171
  end
201
172
  end
202
173
 
203
- def admin_user_action?
204
- return unless permission_action.subject == :admin_user
205
-
206
- target_user = context.fetch(:user, nil)
207
-
208
- case permission_action.action
209
- when :destroy, :block
210
- target_user != user
211
- else
212
- true
213
- end
214
- end
215
-
216
174
  def organization
217
175
  @organization ||= context.fetch(:organization, nil) || context.fetch(:current_organization, nil)
218
176
  end
@@ -226,7 +184,7 @@ module Decidim
226
184
 
227
185
  def space_allows_admin_access_to_current_action?(require_admin_terms_accepted: false)
228
186
  Decidim.participatory_space_manifests.any? do |manifest|
229
- next if require_admin_terms_accepted && !admin_terms_accepted?
187
+ next if manifest.name != :initiatives && require_admin_terms_accepted && !admin_terms_accepted?
230
188
 
231
189
  new_permission_action = Decidim::PermissionAction.new(
232
190
  action: permission_action.action,
@@ -3,7 +3,9 @@
3
3
  module Decidim
4
4
  module Admin
5
5
  class DashboardMetricChartsPresenter < Decidim::MetricChartsPresenter
6
- attribute :summary, Boolean
6
+ def summary?
7
+ __getobj__.fetch(:summary)
8
+ end
7
9
 
8
10
  def render_not_highlighted(metrics)
9
11
  safe_join(
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Admin
5
5
  # Counts active users making a distinction between whether they are admins or participants
6
- class ActiveUsersCounter < Rectify::Query
6
+ class ActiveUsersCounter < Decidim::Query
7
7
  # Initializes the class.
8
8
  #
9
9
  # @param organization [Organization] Current organization
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Admin
5
5
  # A class used to find the recipients of the
6
6
  # Newsletter depending on the params of the form
7
- class NewsletterRecipients < Rectify::Query
7
+ class NewsletterRecipients < Decidim::Query
8
8
  # Syntactic sugar to initialize the class and return the queried objects.
9
9
  #
10
10
  # form - params to filter the query
@@ -56,7 +56,7 @@ module Decidim
56
56
  if type.ids.include?("all")
57
57
  object_class.where(organization: @organization)
58
58
  else
59
- object_class.where(id: type.ids.reject(&:blank?))
59
+ object_class.where(id: type.ids.compact_blank)
60
60
  end
61
61
  end.flatten.compact
62
62
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Admin
5
5
  # A class used to filter users by whitelisted scope or searches on their
6
6
  # name
7
- class UserFilter < Rectify::Query
7
+ class UserFilter < Decidim::Query
8
8
  WHITELISTED_STATE_SCOPES = %w(
9
9
  officialized
10
10
  not_officialized
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Admin
5
5
  # A class used to find the UserGroup's by their evaluation state.
6
- class UserGroupsEvaluation < Rectify::Query
6
+ class UserGroupsEvaluation < Decidim::Query
7
7
  # Syntactic sugar to initialize the class and return the queried objects.
8
8
  #
9
9
  # user_groups - the initial User Group relation that needs to be filtered.
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form) do |f| %>
3
2
  <div class="card">
4
3
  <div class="card-divider">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("decidim.admin.titles.area_types")) %>
2
1
  <div class="card" id="area-types">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form) do |f| %>
3
2
  <div class="card">
4
3
  <div class="card-divider">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form) do |f| %>
3
2
  <div class="card">
4
3
  <div class="card-divider">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("areas", scope: "decidim.admin.titles")) %>
2
1
  <div class="card" id="areas">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form, url: areas_path) do |f| %>
3
2
  <div class="card">
4
3
  <div class="card-divider">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("attachment_collections.edit.title", scope: "decidim.admin")) %>
2
1
  <%= decidim_form_for(@form, url: url_for([@attachment_collection.collection_for, @attachment_collection]), html: { class: "form edit_attachment_collection" }) do |f| %>
3
2
  <%= render partial: "decidim/admin/attachment_collections/form", object: f, locals: { title: t("attachment_collections.edit.title", scope: "decidim.admin") } %>
4
3
 
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("attachment_collections.index.attachment_collections_title", scope: "decidim.admin")) %>
2
1
  <div class="card" id="attachment_collections">
3
2
  <div class="card-divider">
4
3
  <h2 class='card-title'>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("attachment_collections.new.title", scope: "decidim.admin")) %>
2
1
  <%= decidim_form_for(@form, url: url_for([collection_for, @form]), html: { class: "form new_attachment_collection" }) do |f| %>
3
2
  <%= render partial: "decidim/admin/attachment_collections/form", object: f, locals: { title: t("attachment_collections.new.title", scope: "decidim.admin") } %>
4
3
 
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form, url: url_for([@attachment.attached_to, @attachment]), html: { class: "form edit_attachment" }) do |f| %>
3
2
  <%= render partial: "decidim/admin/attachments/form", object: f, locals: { title: t(".title") } %>
4
3
 
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".attachments_title")) %>
2
1
  <div class='card' id="attachments">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -10,6 +9,7 @@
10
9
  </div>
11
10
 
12
11
  <div class="card-section">
12
+ <%= cell("decidim/admin/attachments_privacy_warning", attached_to.attachments) %>
13
13
  <% if attached_to.attachments.any? %>
14
14
  <div class="table-scroll">
15
15
  <table class="table-list">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form, url: url_for([attached_to, @form]), html: { class: "form new_attachment" }) do |f| %>
3
2
  <%= render partial: "decidim/admin/attachments/form", object: f, locals: { title: t(".title") } %>
4
3
 
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("authorization_workflows", scope: "decidim.admin.titles")) %>
2
1
  <div class="card">
3
2
  <%= cell("decidim/verifications/revocations", @authorizations) %>
4
3
  <div class="card-divider">
@@ -12,10 +12,6 @@
12
12
  <%= form.number_field :weight %>
13
13
  </div>
14
14
 
15
- <div class="row column">
16
- <%= form.translated :editor, :description %>
17
- </div>
18
-
19
15
  <div class="row column">
20
16
  <%= form.label :parent_id %>
21
17
  <%= select :category, :parent_id, @form.parent_categories.collect { |c| [c.name[current_organization.default_locale], c.id] }, include_blank: true %>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form, url: category_path(@category.participatory_space, @category), html: { class: "form edit_category" }) do |f| %>
3
2
  <%= render partial: "form", object: f, locals: { title: t(".title") } %>
4
3
 
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("categories.index.categories_title", scope: "decidim.admin")) %>
2
1
  <div class="card" id="categories">
3
2
  <div class="card-divider">
4
3
  <h2 class='card-title'>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("categories.new.title", scope: "decidim.admin")) %>
2
1
  <%= decidim_form_for(@form, url: categories_path(current_participatory_space), html: { class: "form new_category" }) do |f| %>
3
2
  <%= render partial: "form", object: f, locals: { title: t("categories.new.title", scope: "decidim.admin") } %>
4
3
 
@@ -8,6 +8,5 @@
8
8
 
9
9
  <dl>
10
10
  <%= display_for @category,
11
- :name,
12
- :description %>
11
+ :name %>
13
12
  </dl>
@@ -10,10 +10,48 @@
10
10
  </td>
11
11
  <%= td_resource_scope_for(component.scope) %>
12
12
  <td class="table-list__actions">
13
- <% if lookup_context.find_all("decidim/#{component.manifest_name}/admin/component/_actions").any? %>
14
- <%= render partial: "decidim/#{component.manifest_name}/admin/component/actions", locals: { component: component } %>
13
+ <% if component.manifest.admin_engine %>
14
+ <%= icon_link_to "pencil", manage_component_path(component), t("actions.manage", scope: "decidim.admin"), class: "action-icon--manage" %>
15
15
  <% else %>
16
- <%= render partial: "actions", locals: { component: component } %>
16
+ <span class="action-space icon"></span>
17
+ <% end %>
18
+
19
+ <% if allowed_to?(:update, :component, component: component) %>
20
+ <% if component.published? %>
21
+ <%= icon_link_to "x", url_for(action: :unpublish, id: component, controller: "components"), t("actions.unpublish", scope: "decidim.admin"), class: "action-icon--unpublish", method: :put %>
22
+ <% else %>
23
+ <%= icon_link_to "check", url_for(action: :publish, id: component, controller: "components"), t("actions.publish", scope: "decidim.admin"), class: "action-icon--publish", method: :put %>
24
+ <% end %>
25
+ <% else %>
26
+ <span class="action-space icon"></span>
27
+ <% end %>
28
+
29
+ <% if allowed_to? :update, :component, component: component %>
30
+ <%= icon_link_to "cog", url_for(action: :edit, id: component, controller: "components"), t("actions.configure", scope: "decidim.admin"), class: "action-icon--configure" %>
31
+ <% else %>
32
+ <span class="action-space icon"></span>
33
+ <% end %>
34
+
35
+ <% if allowed_to? :update, :component, component: component %>
36
+ <% if component.manifest.actions.empty? %>
37
+ <%= icon "key", class: "action-icon action-icon--disabled" %>
38
+ <% else %>
39
+ <%= icon_link_to "key", url_for(action: :edit, component_id: component, controller: "component_permissions"), t("actions.permissions", scope: "decidim.admin"), class: "action-icon--permissions" %>
40
+ <% end %>
41
+ <% else %>
42
+ <span class="action-space icon"></span>
43
+ <% end %>
44
+
45
+ <% if allowed_to? :share, :component, component: component %>
46
+ <%= icon_link_to "share", url_for(action: :share, id: component, controller: "components"), t("actions.share", scope: "decidim.admin"), class: "action-icon--share", target: "_blank" %>
47
+ <% else %>
48
+ <span class="action-space icon"></span>
49
+ <% end %>
50
+
51
+ <% if allowed_to? :destroy, :component, component: component %>
52
+ <%= icon_link_to "circle-x", url_for(action: :destroy, id: component, controller: "components"), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete %>
53
+ <% else %>
54
+ <span class="action-space icon"></span>
17
55
  <% end %>
18
56
  </td>
19
57
  </tr>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title", name: t("#{@component.manifest.name}.name", scope: "decidim.components"))) %>
2
1
  <%= decidim_form_for([current_participatory_space, @form], url: component_path(current_participatory_space, @component), method: "put", html: { class: "form edit_component" }) do |form| %>
3
2
  <%= render partial: "form", object: form, locals: { component: @component, title: t(".title", name: t("#{@component.manifest.name}.name", scope: "decidim.components")) } %>
4
3
 
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("components.title", scope: "decidim.admin")) %>
2
1
  <div class="card">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -1,4 +1,4 @@
1
- <% add_decidim_page_title(t(".title", name: t("#{manifest.name}.name", scope: "decidim.components"))) %>
1
+
2
2
  <%= decidim_form_for([current_participatory_space, @form], url: components_path(type: params[:type]), method: "post", html: { class: "form new_component" }) do |form| %>
3
3
  <%= render partial: "form", object: form, locals: { component: @component, title: t(".title", name: t("#{manifest.name}.name", scope: "decidim.components")) } %>
4
4
 
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("title", scope: "decidim.admin.conflicts")) %>
2
1
  <div class="card">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -12,7 +12,7 @@
12
12
  <% end %>
13
13
 
14
14
  <div class="grid-x grid-margin-x">
15
- <% if allowed_to? :read, :users_statistics %>
15
+ <% if current_user.admin? && current_user.organization&.id == current_organization.id %>
16
16
  <div class="cell small-12 medium-6 large-4">
17
17
  <%= render(
18
18
  partial: "decidim/admin/users_statistics/users_count",
@@ -1,2 +1 @@
1
- <% add_decidim_page_title(t("help_sections", scope: "decidim.admin.menu")) %>
2
1
  <%= render partial: "form", object: @form %>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("impersonatable_users", scope: "decidim.admin.titles")) %>
2
1
  <% if current_organization.available_authorizations.empty? %>
3
2
  <div class="section">
4
3
  <div class="callout warning">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("impersonate_new_managed_user", scope: "decidim.admin.impersonations.new")) %>
2
1
  <h2 class="process-title-summary">
3
2
  <% if creating_managed_user? %>
4
3
  <%= t(".impersonate_new_managed_user") %>
@@ -34,7 +34,7 @@
34
34
  <legend>
35
35
  <%= t(".file_legend", valid_mime_types: mime_types.values.join(", ")).html_safe %>
36
36
  <div class="guidance">
37
- <%= import_manifest.message(:help, self).html_safe %>
37
+ <%= import_manifest.message(:help, self) %>
38
38
  </div>
39
39
  </legend>
40
40
  <div class="row column">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("admin_log", scope: "decidim.admin.titles")) %>
2
1
  <div class="content">
3
2
  <div class="row">
4
3
  <%= render partial: "decidim/admin/logs/logs_list", locals: { logs: logs } %>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <div class="card with-overflow">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -61,7 +60,7 @@
61
60
  </td>
62
61
 
63
62
  <td class="actions">
64
- <% if !moderation.user.blocked? && allowed_to?(:unreport, :moderate_users) %>
63
+ <% if allowed_to?(:unreport, :moderate_users) %>
65
64
  <%= icon_link_to "action-undo", ignore_moderated_user_path(id: moderation), t(".actions.unreport"), class: "action-icon--unreport", method: :put %>
66
65
  <% end %>
67
66
  <% if allowed_to?(:block, :moderate_users) %>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <div class="card">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -38,7 +37,7 @@
38
37
  <tr data-id="<%= moderation.id %>">
39
38
  <td><%= moderation.reportable.id %></td>
40
39
  <td>
41
- <%= moderation.reportable.class.model_name.human %>
40
+ <%= moderation.reportable.class.name.demodulize %>
42
41
  </td>
43
42
  <% if !respond_to?(:current_participatory_space) %>
44
43
  <td>
@@ -49,13 +48,9 @@
49
48
  <%= moderation.report_count %>
50
49
  </td>
51
50
  <td>
52
- <% if (reportable_url = moderation.reportable.reported_content_url) %>
53
- <%=
54
- link_to t("models.moderation.fields.visit_url", scope: "decidim.moderations"), reportable_url, data: { tooltip: true }, title: strip_tags(reported_content_excerpt_for(moderation.reportable, limit: 250))
55
- %>
56
- <% else %>
57
- <%= t("models.moderation.fields.deleted_resource", scope: "decidim.moderations") %>
58
- <% end %>
51
+ <%=
52
+ link_to t("models.moderation.fields.visit_url", scope: "decidim.moderations"), moderation.reportable.reported_content_url, data: { tooltip: true }, title: strip_tags(reported_content_excerpt_for(moderation.reportable, limit: 250))
53
+ %>
59
54
  </td>
60
55
  <td>
61
56
  <% reports = moderation.reports.map { |report| render "report", report: report } %>
@@ -12,11 +12,7 @@
12
12
  </div>
13
13
  <dl>
14
14
  <dt><%= t("models.moderation.fields.reported_content_url", scope: "decidim.moderations") %></dt>
15
- <% if (reportable_url = moderation.reportable.reported_content_url) %>
16
- <dd><%= link_to moderation.reportable.reported_content_url, reportable_url, target: "_blank" %></dd>
17
- <% else %>
18
- <dd><%= t("models.moderation.fields.deleted_resource", scope: "decidim.moderations") %></dd>
19
- <% end %>
15
+ <dd><%= link_to moderation.reportable.reported_content_url, moderation.reportable.reported_content_url, target: "_blank" %></dd>
20
16
 
21
17
  <dt><%= t("models.moderation.fields.reportable_id", scope: "decidim.moderations") %></dt>
22
18
  <dd><%= moderation.reportable.id %></dd>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <div class="card">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".preview", template_name: t(template_manifest.public_name_key))) %>
2
1
  <div class="card">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title"><%= t ".preview", template_name: t(template_manifest.public_name_key) %></h2>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <div class="card">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form, html: { class: "form new_newsletter" }, url: newsletter_template_newsletters_path(newsletter_template_id: params[:newsletter_template_id])) do |f| %>
3
2
  <div class="card">
4
3
  <div class="card-divider">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".preview")) %>
2
1
  <div class="card">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title"><%= t ".preview" %></h2>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("decidim.admin.titles.participants")) %>
2
1
  <div class="card with-overflow" id='user-groups'>
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title"><%= t "decidim.admin.titles.participants" %></h2>
@@ -34,7 +33,7 @@
34
33
  <td><%= user.report_count %></td>
35
34
 
36
35
  <td class="table-list__actions">
37
- <% if allowed_to?(:block, :admin_user, user: user) %>
36
+ <% if allowed_to?(:block, :admin_user) %>
38
37
  <% if user.blocked? %>
39
38
  <%= icon_link_to "ban", user_block_path(user_id: user.id), t(".unblock"), class: "action-icon action-icon--disabled", method: :delete %>
40
39
  <% else %>
@@ -44,19 +43,15 @@
44
43
  <% if allowed_to? :show_email, :user, user: user %>
45
44
  <%= icon_link_to "envelope-open", show_email_officialization_path(user_id: user.id), t(".show_email"), class: "action-icon action-icon--show-email", data: { full_name: user.name, toggle: "show-email-modal" } %>
46
45
  <% end %>
47
- <% unless user.blocked? %>
48
- <% unless current_user == user %>
49
- <%= icon_link_to "envelope-closed", current_or_new_conversation_path_with(user), t("decidim.contact"), class:"action-icon--new" %>
50
- <% end %>
51
- <% if user.officialized? %>
52
- <%= icon "circle-check", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".officialize") %>
53
- <%= icon_link_to "pencil", new_officialization_path(user_id: user.id), t(".reofficialize"), class: "action-icon--new" %>
54
- <%= icon_link_to "circle-x", officialization_path(user.id), t(".unofficialize"), method: :delete, class: "action-icon--reject" %>
55
- <% else %>
56
- <%= icon_link_to "circle-check", new_officialization_path(user_id: user.id), t(".officialize"), class: "action-icon--verify" %>
57
- <%= icon "pencil", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".reofficialize") %>
58
- <%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".unofficialize") %>
59
- <% end %>
46
+ <%= icon_link_to "envelope-closed", current_or_new_conversation_path_with(user), t("decidim.contact"), class:"action-icon--new" %>
47
+ <% if user.officialized? %>
48
+ <%= icon "circle-check", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".officialize") %>
49
+ <%= icon_link_to "pencil", new_officialization_path(user_id: user.id), t(".reofficialize"), class: "action-icon--new" %>
50
+ <%= icon_link_to "circle-x", officialization_path(user.id), t(".unofficialize"), method: :delete, class: "action-icon--reject" %>
51
+ <% else %>
52
+ <%= icon_link_to "circle-check", new_officialization_path(user_id: user.id), t(".officialize"), class: "action-icon--verify" %>
53
+ <%= icon "pencil", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".reofficialize") %>
54
+ <%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".unofficialize") %>
60
55
  <% end %>
61
56
  </td>
62
57
  </tr>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title", name: user.name)) %>
2
1
  <h2 class="process-title-summary">
3
2
  <%= t(".title", name: user.name) %>
4
3
  </h2>
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form, html: { class: "form edit_organization" }, url: organization_path) do |f| %>
3
2
  <div class="card">
4
3
  <div class="card-divider">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t("edit_organization_appearance", scope: "decidim.admin.titles")) %>
2
1
  <%= decidim_form_for(@form, html: { class: "form edit_organization_appearance" }, url: organization_appearance_path, method: :put) do |f| %>
3
2
  <%= render partial: "form", object: f %>
4
3
  <div class="button--double form-general-submit">
@@ -14,7 +14,8 @@
14
14
  <%= form.upload(
15
15
  :favicon,
16
16
  dimensions_info: current_organization.attached_uploader(:favicon).dimensions_info,
17
- extension_allowlist: current_organization.attached_uploader(:favicon).extension_allowlist
17
+ extension_allowlist: current_organization.attached_uploader(:favicon).extension_allowlist,
18
+ help_i18n_scope: "decidim.forms.file_help.icon"
18
19
  ) %>
19
20
  </div>
20
21
 
@@ -22,7 +23,7 @@
22
23
  <%= form.upload(
23
24
  :logo,
24
25
  dimensions_info: current_organization.attached_uploader(:logo).dimensions_info,
25
- extension_allowlist: current_organization.attached_uploader(:favicon).extension_allowlist
26
+ extension_allowlist: current_organization.attached_uploader(:logo).extension_allowlist
26
27
  ) %>
27
28
  </div>
28
29
 
@@ -30,7 +31,7 @@
30
31
  <%= form.upload(
31
32
  :official_img_header,
32
33
  dimensions_info: current_organization.attached_uploader(:official_img_header).dimensions_info,
33
- extension_allowlist: current_organization.attached_uploader(:favicon).extension_allowlist
34
+ extension_allowlist: current_organization.attached_uploader(:official_img_header).extension_allowlist
34
35
  ) %>
35
36
  </div>
36
37
 
@@ -38,7 +39,7 @@
38
39
  <%= form.upload(
39
40
  :official_img_footer,
40
41
  dimensions_info: current_organization.attached_uploader(:official_img_footer).dimensions_info,
41
- extension_allowlist: current_organization.attached_uploader(:favicon).extension_allowlist
42
+ extension_allowlist: current_organization.attached_uploader(:official_img_footer).extension_allowlist
42
43
  ) %>
43
44
  </div>
44
45
  </div>