decidim-decidim_awesome 0.11.2 → 0.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +54 -2
  4. data/app/cells/concerns/decidim/decidim_awesome/proposal_l_cell_override.rb +5 -3
  5. data/app/cells/decidim/decidim_awesome/content_blocks/map_cell.rb +0 -4
  6. data/app/cells/decidim/decidim_awesome/voting/proposal_metadata_cell.rb +18 -3
  7. data/app/commands/concerns/decidim/decidim_awesome/proposals/create_proposal_override.rb +2 -2
  8. data/app/commands/concerns/decidim/decidim_awesome/proposals/update_proposal_override.rb +1 -1
  9. data/app/commands/concerns/decidim/decidim_awesome/system/register_organization_override.rb +29 -0
  10. data/app/commands/concerns/decidim/decidim_awesome/system/update_organization_override.rb +35 -0
  11. data/app/commands/concerns/decidim/decidim_awesome/update_account_override.rb +30 -0
  12. data/app/commands/decidim/decidim_awesome/admin/create_scoped_style.rb +3 -2
  13. data/app/commands/decidim/decidim_awesome/admin/destroy_scoped_style.rb +6 -4
  14. data/app/controllers/concerns/decidim/decidim_awesome/check_login_authorizations.rb +60 -0
  15. data/app/controllers/concerns/decidim/decidim_awesome/needs_awesome_config.rb +0 -2
  16. data/app/controllers/concerns/decidim/decidim_awesome/proposals/memoize_extra_fields.rb +23 -0
  17. data/app/controllers/concerns/decidim/decidim_awesome/use_user_time_zone.rb +32 -0
  18. data/app/controllers/decidim/decidim_awesome/admin/admin_authorizations_controller.rb +122 -0
  19. data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +1 -1
  20. data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +7 -1
  21. data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +5 -1
  22. data/app/controllers/decidim/decidim_awesome/admin/scoped_styles_controller.rb +12 -4
  23. data/app/controllers/decidim/decidim_awesome/required_authorizations_controller.rb +58 -0
  24. data/app/forms/concerns/decidim/decidim_awesome/account_form_override.rb +25 -0
  25. data/app/forms/concerns/decidim/decidim_awesome/system/organization_form_override.rb +34 -0
  26. data/app/forms/decidim/decidim_awesome/admin/config_form.rb +41 -8
  27. data/app/helpers/decidim/decidim_awesome/map_helper.rb +28 -26
  28. data/app/overrides/decidim/account/show/add_timezone_select.html.erb.deface +3 -0
  29. data/app/overrides/decidim/admin/officializations/index/add_modal.html.erb.deface +3 -0
  30. data/app/overrides/decidim/admin/officializations/index/add_td.html.erb.deface +5 -0
  31. data/app/overrides/decidim/admin/officializations/index/add_th.html.erb.deface +5 -0
  32. data/app/overrides/decidim/system/organizations/_advanced_settings/add_awesome_config.html.erb.deface +9 -0
  33. data/app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface +1 -1
  34. data/app/overrides/layouts/decidim/admin/_header/add_awesome_custom_styles.html.erb.deface +3 -0
  35. data/app/overrides/layouts/decidim/admin/_header/add_awesome_tags.html.erb.deface +1 -0
  36. data/app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js +0 -5
  37. data/app/packs/src/decidim/decidim_awesome/admin/verification_selects.js +21 -0
  38. data/app/packs/src/decidim/decidim_awesome/admin/verifications.js +43 -0
  39. data/app/packs/src/decidim/decidim_awesome/awesome_admin.js +1 -0
  40. data/app/packs/src/decidim/decidim_awesome/awesome_admin_global.js +1 -0
  41. data/app/packs/src/decidim/decidim_awesome/awesome_map/awesome_map.js +1 -1
  42. data/app/packs/stylesheets/decidim/decidim_awesome/admin/verifications.scss +99 -0
  43. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss +1 -0
  44. data/app/permissions/decidim/decidim_awesome/admin/permissions.rb +42 -11
  45. data/app/permissions/decidim/decidim_awesome/permissions.rb +7 -0
  46. data/app/presenters/decidim/decidim_awesome/admin_log/component_presenter_override.rb +3 -5
  47. data/app/presenters/decidim/decidim_awesome/admin_log/user_presenter_override.rb +46 -0
  48. data/app/views/decidim/decidim_awesome/account/_timezone_select.html.erb +3 -0
  49. data/app/views/decidim/decidim_awesome/admin/admin_authorizations/authorization.html.erb +20 -0
  50. data/app/views/decidim/decidim_awesome/admin/admin_authorizations/callout.html.erb +3 -0
  51. data/app/views/decidim/decidim_awesome/admin/admin_authorizations/conflict.html.erb +5 -0
  52. data/app/views/decidim/decidim_awesome/admin/admin_authorizations/edit.html.erb +41 -0
  53. data/app/views/decidim/decidim_awesome/admin/config/_form_scoped_admin_styles.html.erb +1 -0
  54. data/app/views/decidim/decidim_awesome/admin/config/_form_scoped_styles.html.erb +48 -0
  55. data/app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb +8 -0
  56. data/app/views/decidim/decidim_awesome/admin/config/_form_verifications.html.erb +15 -0
  57. data/app/views/decidim/decidim_awesome/admin/constraints/no_permissions.html.erb +6 -0
  58. data/app/views/decidim/decidim_awesome/admin/officializations/_participants_td.html.erb +25 -0
  59. data/app/views/decidim/decidim_awesome/admin/officializations/_participants_th.html.erb +1 -0
  60. data/app/views/decidim/decidim_awesome/admin/officializations/_verification_modal.html.erb +9 -0
  61. data/app/views/decidim/decidim_awesome/required_authorizations/index.html.erb +66 -0
  62. data/app/views/decidim/decidim_awesome/system/organizations/_admin_allowed_authorizations.html.erb +5 -0
  63. data/app/views/layouts/decidim/decidim_awesome/_custom_styles.html.erb +1 -1
  64. data/app/views/layouts/decidim/decidim_awesome/admin/_custom_styles.html.erb +3 -0
  65. data/app/views/layouts/decidim/decidim_awesome/admin/admin_authorizations.html.erb +7 -0
  66. data/config/i18n-tasks.yml +6 -0
  67. data/config/locales/ca.yml +91 -5
  68. data/config/locales/cs.yml +86 -0
  69. data/config/locales/de.yml +131 -0
  70. data/config/locales/en.yml +115 -1
  71. data/config/locales/es.yml +89 -3
  72. data/config/locales/eu.yml +607 -26
  73. data/config/locales/fr.yml +37 -1
  74. data/config/locales/it.yml +0 -1
  75. data/config/locales/ja.yml +86 -0
  76. data/config/locales/nl.yml +0 -1
  77. data/config/locales/pt-BR.yml +0 -1
  78. data/lib/decidim/decidim_awesome/admin_engine.rb +2 -0
  79. data/lib/decidim/decidim_awesome/authorizator.rb +34 -0
  80. data/lib/decidim/decidim_awesome/awesome.rb +55 -1
  81. data/lib/decidim/decidim_awesome/awesome_helpers.rb +48 -19
  82. data/lib/decidim/decidim_awesome/checksums.yml +9 -0
  83. data/lib/decidim/decidim_awesome/engine.rb +20 -4
  84. data/lib/decidim/decidim_awesome/menu.rb +45 -9
  85. data/lib/decidim/decidim_awesome/request_memoizer.rb +16 -0
  86. data/lib/decidim/decidim_awesome/test/factories.rb +0 -4
  87. data/lib/decidim/decidim_awesome/test/initializer.rb +4 -0
  88. data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +1 -1
  89. data/lib/decidim/decidim_awesome/test/shared_examples/custom_styles_examples.rb +156 -0
  90. data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +26 -10
  91. data/lib/decidim/decidim_awesome/version.rb +1 -1
  92. data/package.json +6 -5
  93. metadata +42 -4
  94. data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +0 -30
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.11.2
4
+ version: 0.11.4
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: 2024-09-27 00:00:00.000000000 Z
11
+ date: 2025-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -108,6 +108,9 @@ files:
108
108
  - app/commands/concerns/decidim/decidim_awesome/proposals/create_proposal_override.rb
109
109
  - app/commands/concerns/decidim/decidim_awesome/proposals/update_collaborative_draft_override.rb
110
110
  - app/commands/concerns/decidim/decidim_awesome/proposals/update_proposal_override.rb
111
+ - app/commands/concerns/decidim/decidim_awesome/system/register_organization_override.rb
112
+ - app/commands/concerns/decidim/decidim_awesome/system/update_organization_override.rb
113
+ - app/commands/concerns/decidim/decidim_awesome/update_account_override.rb
111
114
  - app/commands/decidim/decidim_awesome/admin/create_constraint.rb
112
115
  - app/commands/decidim/decidim_awesome/admin/create_custom_redirect.rb
113
116
  - app/commands/decidim/decidim_awesome/admin/create_menu_hack.rb
@@ -130,13 +133,17 @@ files:
130
133
  - app/controllers/concerns/decidim/decidim_awesome/admin/maintenance_context.rb
131
134
  - app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable.rb
132
135
  - app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable_helper.rb
136
+ - app/controllers/concerns/decidim/decidim_awesome/check_login_authorizations.rb
133
137
  - app/controllers/concerns/decidim/decidim_awesome/content_security_policy.rb
134
138
  - app/controllers/concerns/decidim/decidim_awesome/limit_pending_amendments.rb
135
139
  - app/controllers/concerns/decidim/decidim_awesome/needs_awesome_config.rb
136
140
  - app/controllers/concerns/decidim/decidim_awesome/not_found_redirect.rb
141
+ - app/controllers/concerns/decidim/decidim_awesome/proposals/memoize_extra_fields.rb
137
142
  - app/controllers/concerns/decidim/decidim_awesome/proposals/orderable_override.rb
138
143
  - app/controllers/concerns/decidim/decidim_awesome/proposals/proposal_votes_controller_override.rb
144
+ - app/controllers/concerns/decidim/decidim_awesome/use_user_time_zone.rb
139
145
  - app/controllers/decidim/decidim_awesome/admin/admin_accountability_controller.rb
146
+ - app/controllers/decidim/decidim_awesome/admin/admin_authorizations_controller.rb
140
147
  - app/controllers/decidim/decidim_awesome/admin/application_controller.rb
141
148
  - app/controllers/decidim/decidim_awesome/admin/checks_controller.rb
142
149
  - app/controllers/decidim/decidim_awesome/admin/config_controller.rb
@@ -152,8 +159,11 @@ files:
152
159
  - app/controllers/decidim/decidim_awesome/editor_images_controller.rb
153
160
  - app/controllers/decidim/decidim_awesome/iframe_component/iframe_controller.rb
154
161
  - app/controllers/decidim/decidim_awesome/map_component/map_controller.rb
162
+ - app/controllers/decidim/decidim_awesome/required_authorizations_controller.rb
163
+ - app/forms/concerns/decidim/decidim_awesome/account_form_override.rb
155
164
  - app/forms/concerns/decidim/decidim_awesome/proposals/proposal_form_override.rb
156
165
  - app/forms/concerns/decidim/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb
166
+ - app/forms/concerns/decidim/decidim_awesome/system/organization_form_override.rb
157
167
  - app/forms/decidim/decidim_awesome/admin/config_form.rb
158
168
  - app/forms/decidim/decidim_awesome/admin/constraint_form.rb
159
169
  - app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb
@@ -180,14 +190,20 @@ files:
180
190
  - app/models/decidim/decidim_awesome/paper_trail_version.rb
181
191
  - app/models/decidim/decidim_awesome/proposal_extra_field.rb
182
192
  - app/models/decidim/decidim_awesome/vote_weight.rb
193
+ - app/overrides/decidim/account/show/add_timezone_select.html.erb.deface
194
+ - app/overrides/decidim/admin/officializations/index/add_modal.html.erb.deface
195
+ - app/overrides/decidim/admin/officializations/index/add_td.html.erb.deface
196
+ - app/overrides/decidim/admin/officializations/index/add_th.html.erb.deface
183
197
  - app/overrides/decidim/proposals/admin/proposals/_form/replace_editor.html.erb.deface
184
198
  - app/overrides/decidim/proposals/admin/proposals/show/add_private_body.html.erb.deface
185
199
  - app/overrides/decidim/proposals/admin/proposals/show/replace_body.html.erb.deface
186
200
  - app/overrides/decidim/proposals/proposals/_proposal_aside/limit_amendments_modal.html.erb.deface
187
201
  - app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface
188
202
  - app/overrides/decidim/proposals/proposals/_votes_count/replace_counter.html.erb.deface
203
+ - app/overrides/decidim/system/organizations/_advanced_settings/add_awesome_config.html.erb.deface
189
204
  - app/overrides/layouts/decidim/_decidim_javascript/add_awesome_tags.html.erb.deface
190
205
  - app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface
206
+ - app/overrides/layouts/decidim/admin/_header/add_awesome_custom_styles.html.erb.deface
191
207
  - app/overrides/layouts/decidim/admin/_header/add_awesome_tags.html.erb.deface
192
208
  - app/packs/entrypoints/decidim_admin_decidim_awesome.js
193
209
  - app/packs/entrypoints/decidim_admin_decidim_awesome.scss
@@ -212,6 +228,8 @@ files:
212
228
  - app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js
213
229
  - app/packs/src/decidim/decidim_awesome/admin/tabs_change.js
214
230
  - app/packs/src/decidim/decidim_awesome/admin/user_picker.js
231
+ - app/packs/src/decidim/decidim_awesome/admin/verification_selects.js
232
+ - app/packs/src/decidim/decidim_awesome/admin/verifications.js
215
233
  - app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js
216
234
  - app/packs/src/decidim/decidim_awesome/awesome_admin.js
217
235
  - app/packs/src/decidim/decidim_awesome/awesome_admin_global.js
@@ -242,6 +260,7 @@ files:
242
260
  - app/packs/stylesheets/decidim/decidim_awesome/admin/custom_styles.scss
243
261
  - app/packs/stylesheets/decidim/decidim_awesome/admin/intergram_fixes.scss
244
262
  - app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss
263
+ - app/packs/stylesheets/decidim/decidim_awesome/admin/verifications.scss
245
264
  - app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss
246
265
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss
247
266
  - app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss
@@ -259,6 +278,7 @@ files:
259
278
  - app/presenters/concerns/decidim/decidim_awesome/menu_presenter_override.rb
260
279
  - app/presenters/concerns/decidim/decidim_awesome/proposals/proposal_presenter_override.rb
261
280
  - app/presenters/decidim/decidim_awesome/admin_log/component_presenter_override.rb
281
+ - app/presenters/decidim/decidim_awesome/admin_log/user_presenter_override.rb
262
282
  - app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb
263
283
  - app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb
264
284
  - app/presenters/decidim/decidim_awesome/private_data_presenter.rb
@@ -274,7 +294,12 @@ files:
274
294
  - app/uploaders/decidim/cw/decidim_awesome/image_uploader.rb
275
295
  - app/uploaders/decidim/decidim_awesome/image_uploader.rb
276
296
  - app/validators/concerns/decidim/decidim_awesome/etiquette_validator_override.rb
297
+ - app/views/decidim/decidim_awesome/account/_timezone_select.html.erb
277
298
  - app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb
299
+ - app/views/decidim/decidim_awesome/admin/admin_authorizations/authorization.html.erb
300
+ - app/views/decidim/decidim_awesome/admin/admin_authorizations/callout.html.erb
301
+ - app/views/decidim/decidim_awesome/admin/admin_authorizations/conflict.html.erb
302
+ - app/views/decidim/decidim_awesome/admin/admin_authorizations/edit.html.erb
278
303
  - app/views/decidim/decidim_awesome/admin/checks/_assets_tester.html.erb
279
304
  - app/views/decidim/decidim_awesome/admin/checks/index.html.erb
280
305
  - app/views/decidim/decidim_awesome/admin/config/_autoedit_box_label.html.erb
@@ -285,11 +310,14 @@ files:
285
310
  - app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb
286
311
  - app/views/decidim/decidim_awesome/admin/config/_form_proposal_private_custom_fields.html.erb
287
312
  - app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb
288
- - app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb
313
+ - app/views/decidim/decidim_awesome/admin/config/_form_scoped_admin_styles.html.erb
314
+ - app/views/decidim/decidim_awesome/admin/config/_form_scoped_styles.html.erb
289
315
  - app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb
316
+ - app/views/decidim/decidim_awesome/admin/config/_form_verifications.html.erb
290
317
  - app/views/decidim/decidim_awesome/admin/config/show.html.erb
291
318
  - app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb
292
319
  - app/views/decidim/decidim_awesome/admin/constraints/new.html.erb
320
+ - app/views/decidim/decidim_awesome/admin/constraints/no_permissions.html.erb
293
321
  - app/views/decidim/decidim_awesome/admin/constraints/show.html.erb
294
322
  - app/views/decidim/decidim_awesome/admin/custom_redirects/_form.html.erb
295
323
  - app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb
@@ -301,6 +329,9 @@ files:
301
329
  - app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb
302
330
  - app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb
303
331
  - app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb
332
+ - app/views/decidim/decidim_awesome/admin/officializations/_participants_td.html.erb
333
+ - app/views/decidim/decidim_awesome/admin/officializations/_participants_th.html.erb
334
+ - app/views/decidim/decidim_awesome/admin/officializations/_verification_modal.html.erb
304
335
  - app/views/decidim/decidim_awesome/admin/proposals/_editor.html.erb
305
336
  - app/views/decidim/decidim_awesome/admin/proposals/_private_body.html.erb
306
337
  - app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb
@@ -311,12 +342,16 @@ files:
311
342
  - app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb
312
343
  - app/views/decidim/decidim_awesome/map_component/map/error.html.erb
313
344
  - app/views/decidim/decidim_awesome/map_component/map/show.html.erb
345
+ - app/views/decidim/decidim_awesome/required_authorizations/index.html.erb
346
+ - app/views/decidim/decidim_awesome/system/organizations/_admin_allowed_authorizations.html.erb
314
347
  - app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb
315
348
  - app/views/decidim/decidim_awesome/voting/voting_cards/_show_votes_count.html.erb
316
349
  - app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb
317
350
  - app/views/layouts/decidim/decidim_awesome/_custom_styles.html.erb
318
351
  - app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb
319
352
  - app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb
353
+ - app/views/layouts/decidim/decidim_awesome/admin/_custom_styles.html.erb
354
+ - app/views/layouts/decidim/decidim_awesome/admin/admin_authorizations.html.erb
320
355
  - app/views/layouts/decidim/decidim_awesome/admin/application.html.erb
321
356
  - app/views/layouts/decidim/decidim_awesome/admin/maintenance.html.erb
322
357
  - config/assets.rb
@@ -358,6 +393,7 @@ files:
358
393
  - lib/decidim/decidim_awesome/admin_engine.rb
359
394
  - lib/decidim/decidim_awesome/api/types/localized_custom_fields_type.rb
360
395
  - lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb
396
+ - lib/decidim/decidim_awesome/authorizator.rb
361
397
  - lib/decidim/decidim_awesome/awesome.rb
362
398
  - lib/decidim/decidim_awesome/awesome_helpers.rb
363
399
  - lib/decidim/decidim_awesome/checksums.yml
@@ -378,6 +414,7 @@ files:
378
414
  - lib/decidim/decidim_awesome/map_component/engine.rb
379
415
  - lib/decidim/decidim_awesome/menu.rb
380
416
  - lib/decidim/decidim_awesome/menu_hacker.rb
417
+ - lib/decidim/decidim_awesome/request_memoizer.rb
381
418
  - lib/decidim/decidim_awesome/system_checker.rb
382
419
  - lib/decidim/decidim_awesome/test/factories.rb
383
420
  - lib/decidim/decidim_awesome/test/initializer.rb
@@ -390,6 +427,7 @@ files:
390
427
  - lib/decidim/decidim_awesome/test/shared_examples/current_config_examples.rb
391
428
  - lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb
392
429
  - lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
430
+ - lib/decidim/decidim_awesome/test/shared_examples/custom_styles_examples.rb
393
431
  - lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb
394
432
  - lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb
395
433
  - lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb
@@ -420,7 +458,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
420
458
  - !ruby/object:Gem::Version
421
459
  version: '0'
422
460
  requirements: []
423
- rubygems_version: 3.5.10
461
+ rubygems_version: 3.4.19
424
462
  signing_key:
425
463
  specification_version: 4
426
464
  summary: A decidim decidim_awesome module
@@ -1,30 +0,0 @@
1
- <div class="form__wrapper row column decidim_awesome-form">
2
- <% if config_enabled? :scoped_styles %>
3
- <div class="colors-help">
4
- <p><%= t("help.scoped_styles", scope: "decidim.decidim_awesome.admin.config.form") %>
5
- <%= t("help.scoped_styles_variables", scope: "decidim.decidim_awesome.admin.config.form") %>
6
- </p>
7
- <p class="colors">
8
- <% ["primary", "secondary", "tertiary", "success", "warning", "alert"].each do |color| %>
9
- <span class="color-box <%= color %>" style="background-color: <%= current_organization.colors[color] %>"></span>
10
- <code>var(--<%= color %>)</code>
11
- <% end %>
12
- </p>
13
- </div>
14
-
15
- <% form.object.scoped_styles&.each do |key, value| %>
16
- <div class="scoped_styles_container p-4 js-box-container" data-key="<%= key %>">
17
- <%= render(partial: "decidim/decidim_awesome/admin/config/autoedit_box_label", locals: { var: "scoped_styles", key: key, scope: "scoped_style_#{key}", delete_path: decidim_admin_decidim_awesome.scoped_style_path(key: key) }) %>
18
- <p class="form-error is-visible" id="custom-style-error-<%= key %>"><%= errors[key.to_sym].join("<br>") if errors %></p>
19
- <%= text_area_tag key, value, name: "config[scoped_styles][#{key}]", rows: 5 %>
20
- <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: "scoped_style_#{key}", constraints: constraints_for("scoped_style_#{key}") }) %>
21
- </div>
22
- <% end %>
23
-
24
- <%= link_to decidim_admin_decidim_awesome.scoped_styles_path, method: :post, class: "button button__sm button__text-secondary mr-auto" do %>
25
- <%= icon("add-box-line") %>
26
- <%= t("new", scope: "decidim.decidim_awesome.admin.config.form_scoped_styles") %>
27
- <% end %>
28
-
29
- <% end %>
30
- </div>