decidim-admin 0.28.4 → 0.29.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -0
  3. data/app/cells/decidim/admin/content_block_cell.rb +0 -1
  4. data/app/cells/decidim/admin/results_per_page/show.erb +2 -2
  5. data/app/cells/decidim/admin/results_per_page_cell.rb +0 -2
  6. data/app/commands/decidim/admin/create_area.rb +4 -32
  7. data/app/commands/decidim/admin/create_area_type.rb +4 -33
  8. data/app/commands/decidim/admin/create_attachment.rb +5 -4
  9. data/app/commands/decidim/admin/create_attachment_collection.rb +3 -3
  10. data/app/commands/decidim/admin/create_category.rb +4 -37
  11. data/app/commands/decidim/admin/create_component.rb +7 -40
  12. data/app/commands/decidim/admin/create_newsletter.rb +11 -29
  13. data/app/commands/decidim/admin/create_participatory_space_private_user.rb +4 -4
  14. data/app/commands/decidim/admin/create_scope.rb +15 -32
  15. data/app/commands/decidim/admin/create_scope_type.rb +3 -32
  16. data/app/commands/decidim/admin/create_static_page.rb +6 -47
  17. data/app/commands/decidim/admin/create_static_page_topic.rb +4 -26
  18. data/app/commands/decidim/admin/deliver_newsletter.rb +4 -5
  19. data/app/commands/decidim/admin/destroy_area.rb +2 -25
  20. data/app/commands/decidim/admin/destroy_category.rb +4 -29
  21. data/app/commands/decidim/admin/destroy_component.rb +5 -43
  22. data/app/commands/decidim/admin/destroy_newsletter.rb +2 -30
  23. data/app/commands/decidim/admin/destroy_participatory_space_private_user.rb +5 -32
  24. data/app/commands/decidim/admin/destroy_scope.rb +6 -33
  25. data/app/commands/decidim/admin/officialize_user.rb +1 -1
  26. data/app/commands/decidim/admin/participatory_space/create_admin.rb +4 -4
  27. data/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb +5 -4
  28. data/app/commands/decidim/admin/promote_managed_user.rb +4 -5
  29. data/app/commands/decidim/admin/unofficialize_user.rb +1 -1
  30. data/app/commands/decidim/admin/update_area.rb +2 -41
  31. data/app/commands/decidim/admin/update_area_type.rb +2 -42
  32. data/app/commands/decidim/admin/update_attachment.rb +10 -7
  33. data/app/commands/decidim/admin/update_attachment_collection.rb +3 -3
  34. data/app/commands/decidim/admin/update_category.rb +2 -45
  35. data/app/commands/decidim/admin/update_component.rb +4 -5
  36. data/app/commands/decidim/admin/update_component_permissions.rb +3 -3
  37. data/app/commands/decidim/admin/{update_external_domain_whitelist.rb → update_external_domain_allowlist.rb} +6 -5
  38. data/app/commands/decidim/admin/update_help_sections.rb +6 -3
  39. data/app/commands/decidim/admin/update_newsletter.rb +8 -8
  40. data/app/commands/decidim/admin/update_organization.rb +9 -53
  41. data/app/commands/decidim/admin/update_organization_appearance.rb +10 -81
  42. data/app/commands/decidim/admin/update_scope.rb +7 -40
  43. data/app/commands/decidim/admin/update_scope_type.rb +2 -42
  44. data/app/commands/decidim/admin/update_static_page.rb +5 -46
  45. data/app/commands/decidim/admin/update_static_page_topic.rb +2 -43
  46. data/app/constraints/decidim/admin/organization_dashboard_constraint.rb +1 -1
  47. data/app/controllers/concerns/decidim/admin/content_blocks/landing_page.rb +2 -2
  48. data/app/controllers/concerns/decidim/admin/filterable.rb +79 -4
  49. data/app/controllers/concerns/decidim/admin/global_moderation_context.rb +1 -1
  50. data/app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb +0 -7
  51. data/app/controllers/concerns/decidim/admin/paginable.rb +20 -0
  52. data/app/controllers/concerns/decidim/admin/participatory_space_export.rb +1 -1
  53. data/app/controllers/decidim/admin/application_controller.rb +2 -1
  54. data/app/controllers/decidim/admin/area_types_controller.rb +8 -9
  55. data/app/controllers/decidim/admin/areas_controller.rb +1 -1
  56. data/app/controllers/decidim/admin/authorization_workflows_controller.rb +1 -1
  57. data/app/controllers/decidim/admin/categories_controller.rb +2 -2
  58. data/app/controllers/decidim/admin/component_permissions_controller.rb +1 -1
  59. data/app/controllers/decidim/admin/components_controller.rb +2 -2
  60. data/app/controllers/decidim/admin/concerns/has_attachment_collections.rb +2 -2
  61. data/app/controllers/decidim/admin/concerns/has_attachments.rb +2 -2
  62. data/app/controllers/decidim/admin/concerns/has_private_users.rb +1 -1
  63. data/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb +1 -1
  64. data/app/controllers/decidim/admin/conflicts_controller.rb +5 -13
  65. data/app/controllers/decidim/admin/help_sections_controller.rb +1 -1
  66. data/app/controllers/decidim/admin/managed_users/promotions_controller.rb +1 -1
  67. data/app/controllers/decidim/admin/moderations/reports_controller.rb +4 -4
  68. data/app/controllers/decidim/admin/moderations_controller.rb +7 -7
  69. data/app/controllers/decidim/admin/newsletter_templates_controller.rb +1 -1
  70. data/app/controllers/decidim/admin/newsletters_controller.rb +5 -5
  71. data/app/controllers/decidim/admin/organization_appearance_controller.rb +1 -1
  72. data/app/controllers/decidim/admin/organization_controller.rb +1 -1
  73. data/app/controllers/decidim/admin/{organization_external_domain_whitelist_controller.rb → organization_external_domain_allowlist_controller.rb} +7 -7
  74. data/app/controllers/decidim/admin/scope_types_controller.rb +7 -8
  75. data/app/controllers/decidim/admin/scopes_controller.rb +1 -1
  76. data/app/controllers/decidim/admin/share_tokens_controller.rb +1 -1
  77. data/app/controllers/decidim/admin/static_page_topics_controller.rb +2 -2
  78. data/app/controllers/decidim/admin/static_pages_controller.rb +2 -2
  79. data/app/forms/decidim/admin/attachment_form.rb +7 -1
  80. data/app/forms/decidim/admin/organization_appearance_form.rb +0 -3
  81. data/app/forms/decidim/admin/{organization_external_domain_whitelist_form.rb → organization_external_domain_allowlist_form.rb} +3 -3
  82. data/app/forms/decidim/admin/organization_form.rb +2 -2
  83. data/app/forms/decidim/admin/static_page_form.rb +0 -1
  84. data/app/helpers/decidim/admin/application_helper.rb +0 -13
  85. data/app/helpers/decidim/admin/filterable_helper.rb +19 -3
  86. data/app/helpers/decidim/admin/moderations/reports_helper.rb +3 -1
  87. data/app/helpers/decidim/admin/newsletters_helper.rb +3 -3
  88. data/app/helpers/decidim/admin/paginable/per_page_helper.rb +22 -0
  89. data/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb +2 -2
  90. data/app/packs/entrypoints/decidim_admin.js +4 -1
  91. data/app/packs/src/decidim/admin/application.js +19 -15
  92. data/app/packs/src/decidim/admin/css_preview.js +39 -0
  93. data/app/packs/src/decidim/admin/form.js +18 -1
  94. data/app/packs/src/decidim/admin/participatory_space_search.js +1 -1
  95. data/app/packs/src/decidim/admin/proposal_infinite_edit.js +2 -2
  96. data/app/packs/src/decidim/admin/sync_radio_buttons.js +27 -0
  97. data/app/packs/src/decidim/admin/text_copy.js +19 -0
  98. data/app/packs/stylesheets/decidim/admin/_cards.scss +1 -1
  99. data/app/packs/stylesheets/decidim/admin/_datepicker.scss +62 -0
  100. data/app/packs/stylesheets/decidim/admin/_item_edit.scss +1 -1
  101. data/app/packs/stylesheets/decidim/admin/_item_show.scss +8 -0
  102. data/app/packs/stylesheets/decidim/admin/_proposal_status.scss +5 -0
  103. data/app/packs/stylesheets/decidim/admin/application.scss +2 -0
  104. data/app/permissions/decidim/admin/permissions.rb +2 -2
  105. data/app/queries/decidim/admin/user_filter.rb +4 -4
  106. data/app/queries/decidim/admin/user_groups_evaluation.rb +1 -1
  107. data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -1
  108. data/app/views/decidim/admin/attachments/_form.html.erb +21 -2
  109. data/app/views/decidim/admin/attachments/index.html.erb +2 -2
  110. data/app/views/decidim/admin/authorization_workflows/index.html.erb +26 -8
  111. data/app/views/decidim/admin/block_user/new.html.erb +1 -1
  112. data/app/views/decidim/admin/categories/index.html.erb +2 -2
  113. data/app/views/decidim/admin/components/_form.html.erb +1 -1
  114. data/app/views/decidim/admin/components/index.html.erb +1 -5
  115. data/app/views/decidim/admin/conflicts/index.html.erb +6 -29
  116. data/app/views/decidim/admin/dashboard/_pending_moderations.html.erb +1 -1
  117. data/app/views/decidim/admin/dashboard/show.html.erb +1 -1
  118. data/app/views/decidim/admin/exports/_dropdown.html.erb +6 -6
  119. data/app/views/decidim/admin/impersonatable_users/index.html.erb +3 -3
  120. data/app/views/decidim/admin/imports/_dropdown.html.erb +5 -7
  121. data/app/views/decidim/admin/imports/new.html.erb +6 -7
  122. data/app/views/decidim/admin/logs/_filters.html.erb +3 -3
  123. data/app/views/decidim/admin/managed_users/promotions/new.html.erb +1 -1
  124. data/app/views/decidim/admin/moderated_users/index.html.erb +2 -2
  125. data/app/views/decidim/admin/moderations/index.html.erb +5 -5
  126. data/app/views/decidim/admin/moderations/reports/index.html.erb +6 -6
  127. data/app/views/decidim/admin/moderations/reports/show.html.erb +4 -4
  128. data/app/views/decidim/admin/newsletter_templates/index.html.erb +2 -2
  129. data/app/views/decidim/admin/newsletter_templates/show.html.erb +7 -7
  130. data/app/views/decidim/admin/newsletters/index.html.erb +1 -1
  131. data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +6 -7
  132. data/app/views/decidim/admin/newsletters/show.html.erb +1 -1
  133. data/app/views/decidim/admin/organization/_form.html.erb +3 -3
  134. data/app/views/decidim/admin/organization_appearance/form/_colors.html.erb +0 -3
  135. data/app/views/decidim/admin/organization_appearance/form/_images.html.erb +5 -5
  136. data/app/views/decidim/admin/organization_appearance/form/_minimap.html.erb +3 -3
  137. data/app/views/decidim/admin/{organization_external_domain_whitelist → organization_external_domain_allowlist}/_external_domain.html.erb +4 -4
  138. data/app/views/decidim/admin/{organization_external_domain_whitelist → organization_external_domain_allowlist}/_form.html.erb +2 -2
  139. data/app/views/decidim/admin/{organization_external_domain_whitelist → organization_external_domain_allowlist}/edit.html.erb +2 -2
  140. data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +1 -1
  141. data/app/views/decidim/admin/participatory_space_private_users_csv_imports/new.html.erb +1 -1
  142. data/app/views/decidim/admin/share_tokens/_share_tokens.html.erb +1 -1
  143. data/app/views/decidim/admin/shared/_adjacent_navigation.html.erb +30 -0
  144. data/app/views/decidim/admin/shared/_admin_confirm_modal.html.erb +7 -7
  145. data/app/views/decidim/admin/shared/_filters.html.erb +1 -1
  146. data/app/views/decidim/admin/shared/_gallery.html.erb +1 -1
  147. data/app/views/decidim/admin/shared/landing_page/_content_blocks.html.erb +2 -2
  148. data/app/views/decidim/admin/static_page_topics/index.html.erb +1 -1
  149. data/app/views/decidim/admin/static_pages/_form.html.erb +0 -4
  150. data/app/views/decidim/admin/users_statistics/_users_count.html.erb +2 -2
  151. data/app/views/layouts/decidim/admin/_admin_timeout_modal.html.erb +2 -2
  152. data/app/views/layouts/decidim/admin/_application.html.erb +4 -4
  153. data/app/views/layouts/decidim/admin/_callouts_full.html.erb +1 -1
  154. data/app/views/layouts/decidim/admin/_js_configuration.html.erb +3 -1
  155. data/app/views/layouts/decidim/admin/_title_bar.html.erb +2 -2
  156. data/app/views/layouts/decidim/admin/_title_bar_responsive.html.erb +2 -2
  157. data/config/locales/ar.yml +0 -7
  158. data/config/locales/bg.yml +15 -12
  159. data/config/locales/ca.yml +18 -15
  160. data/config/locales/cs.yml +15 -17
  161. data/config/locales/de.yml +15 -12
  162. data/config/locales/el.yml +0 -12
  163. data/config/locales/en.yml +16 -13
  164. data/config/locales/es-MX.yml +16 -13
  165. data/config/locales/es-PY.yml +16 -13
  166. data/config/locales/es.yml +18 -15
  167. data/config/locales/eu.yml +16 -13
  168. data/config/locales/fi-plain.yml +15 -12
  169. data/config/locales/fi.yml +19 -16
  170. data/config/locales/fr-CA.yml +14 -11
  171. data/config/locales/fr.yml +13 -10
  172. data/config/locales/ga-IE.yml +0 -3
  173. data/config/locales/gl.yml +0 -5
  174. data/config/locales/hu.yml +9 -10
  175. data/config/locales/id-ID.yml +0 -3
  176. data/config/locales/is-IS.yml +0 -3
  177. data/config/locales/it.yml +0 -8
  178. data/config/locales/ja.yml +18 -15
  179. data/config/locales/kaa.yml +0 -3
  180. data/config/locales/ko.yml +0 -6
  181. data/config/locales/lb.yml +0 -8
  182. data/config/locales/lt.yml +0 -13
  183. data/config/locales/lv.yml +0 -3
  184. data/config/locales/nl.yml +0 -8
  185. data/config/locales/no.yml +0 -8
  186. data/config/locales/pl.yml +14 -9
  187. data/config/locales/pt-BR.yml +8 -13
  188. data/config/locales/pt.yml +0 -8
  189. data/config/locales/ro-RO.yml +3 -21
  190. data/config/locales/ru.yml +0 -3
  191. data/config/locales/sk.yml +0 -3
  192. data/config/locales/sq-AL.yml +0 -3
  193. data/config/locales/sr-CS.yml +0 -3
  194. data/config/locales/sv.yml +207 -355
  195. data/config/locales/th-TH.yml +0 -3
  196. data/config/locales/tr-TR.yml +0 -5
  197. data/config/locales/uk.yml +0 -3
  198. data/config/locales/zh-CN.yml +0 -3
  199. data/config/locales/zh-TW.yml +0 -12
  200. data/config/routes.rb +1 -1
  201. data/decidim-admin.gemspec +1 -1
  202. data/lib/decidim/admin/import/creator.rb +1 -1
  203. data/lib/decidim/admin/import/importer_factory.rb +2 -2
  204. data/lib/decidim/admin/menu.rb +4 -4
  205. data/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb +3 -2
  206. data/lib/decidim/admin/test/commands/create_category_examples.rb +4 -2
  207. data/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb +3 -2
  208. data/lib/decidim/admin/test/commands/update_category_examples.rb +3 -2
  209. data/lib/decidim/admin/test/filterable_examples.rb +5 -3
  210. data/lib/decidim/admin/test/filters_participatory_space_user_roles_examples.rb +5 -5
  211. data/lib/decidim/admin/test/invite_participatory_space_admins_shared_examples.rb +1 -1
  212. data/lib/decidim/admin/test/invite_participatory_space_users_shared_context.rb +0 -1
  213. data/lib/decidim/admin/test/manage_attachment_collections_examples.rb +12 -12
  214. data/lib/decidim/admin/test/manage_attachments_examples.rb +52 -28
  215. data/lib/decidim/admin/test/manage_categories_examples.rb +13 -13
  216. data/lib/decidim/admin/test/manage_component_permissions_examples.rb +5 -5
  217. data/lib/decidim/admin/test/manage_hide_content_examples.rb +4 -4
  218. data/lib/decidim/admin/test/manage_moderations_examples.rb +21 -21
  219. data/lib/decidim/admin/test/manage_paginated_collection_examples.rb +5 -5
  220. data/lib/decidim/admin/test/manage_participatory_space_publications_examples.rb +2 -2
  221. data/lib/decidim/admin/version.rb +1 -1
  222. data/lib/decidim/admin.rb +15 -0
  223. metadata +27 -24
  224. data/app/commands/decidim/admin/destroy_share_token.rb +0 -46
  225. data/app/commands/decidim/admin/destroy_static_page.rb +0 -40
  226. data/app/commands/decidim/admin/destroy_static_page_topic.rb +0 -40
  227. data/app/controllers/concerns/decidim/admin/verification_conflicts/filterable.rb +0 -31
  228. data/app/views/layouts/decidim/admin/login.html.erb +0 -19
  229. /data/app/packs/src/decidim/admin/{external_domain_whitelist.js → external_domain_allowlist.js} +0 -0
@@ -0,0 +1,5 @@
1
+ .proposal-status__color {
2
+ label {
3
+ @apply sr-only;
4
+ }
5
+ }
@@ -35,4 +35,6 @@
35
35
  @import "stylesheets/decidim/admin/_data_picker.scss";
36
36
  @import "stylesheets/decidim/admin/_legacy_foundation.scss";
37
37
  @import "stylesheets/decidim/admin/_sidebar-menu.scss";
38
+ @import "stylesheets/decidim/admin/_datepicker.scss";
38
39
  @import "stylesheets/decidim/admin/_minimap.scss";
40
+ @import "stylesheets/decidim/admin/_proposal_status.scss";
@@ -218,11 +218,11 @@ module Decidim
218
218
  @organization ||= context.fetch(:organization, nil) || context.fetch(:current_organization, nil)
219
219
  end
220
220
 
221
- def user_can_enter_space_area?(**args)
221
+ def user_can_enter_space_area?(**)
222
222
  return unless permission_action.action == :enter &&
223
223
  permission_action.subject == :space_area
224
224
 
225
- space_allows_admin_access_to_current_action?(**args)
225
+ space_allows_admin_access_to_current_action?(**)
226
226
  end
227
227
 
228
228
  def space_allows_admin_access_to_current_action?(require_admin_terms_accepted: false)
@@ -2,10 +2,10 @@
2
2
 
3
3
  module Decidim
4
4
  module Admin
5
- # A class used to filter users by whitelisted scope or searches on their
5
+ # A class used to filter users by allowed scope or searches on their
6
6
  # name
7
7
  class UserFilter < Decidim::Query
8
- WHITELISTED_STATE_SCOPES = %w(
8
+ ALLOWED_STATE_SCOPES = %w(
9
9
  officialized
10
10
  not_officialized
11
11
  managed
@@ -32,7 +32,7 @@ module Decidim
32
32
  @state = state
33
33
  end
34
34
 
35
- # List the User groups by the diferents filters.
35
+ # List the User groups by the different filters.
36
36
  def query
37
37
  users = scope
38
38
  users = filter_by_search(users)
@@ -50,7 +50,7 @@ module Decidim
50
50
  end
51
51
 
52
52
  def filter_by_state(users)
53
- return users unless WHITELISTED_STATE_SCOPES.include?(state)
53
+ return users unless ALLOWED_STATE_SCOPES.include?(state)
54
54
 
55
55
  users.public_send(state)
56
56
  end
@@ -24,7 +24,7 @@ module Decidim
24
24
  @state = state
25
25
  end
26
26
 
27
- # List the User groups by the diferent filters.
27
+ # List the User groups by the different filters.
28
28
  def query
29
29
  @user_groups = filter_by_search(@user_groups)
30
30
  @user_groups = filter_by_state(@user_groups)
@@ -14,7 +14,7 @@
14
14
  <thead>
15
15
  <tr>
16
16
  <th><%= t("activemodel.attributes.attachment_collection.name") %></th>
17
- <th class="actions"></th>
17
+ <th></th>
18
18
  </tr>
19
19
  </thead>
20
20
  <tbody>
@@ -17,8 +17,27 @@
17
17
  <%= form.select :attachment_collection_id, @form.attachment_collections.map { |c| [translated_attribute(c.name), c.id] }, include_blank: true %>
18
18
  </div>
19
19
 
20
- <div class="row column">
21
- <%= form.upload :file, button_class: "button button__sm button__transparent-secondary" %>
20
+ <div class="p-6" data-file-or-link-tabs-controller>
21
+ <%= cell "decidim/tab_panels", [
22
+ {
23
+ enabled: true,
24
+ id: "file",
25
+ text: "Upload file",
26
+ icon: "file-upload-line",
27
+ method: :cell,
28
+ selected: form.object.file.present?,
29
+ args: ["/decidim/attachments_file_tab", form]
30
+ },
31
+ {
32
+ enabled: true,
33
+ id: "link",
34
+ text: "Link",
35
+ icon: "link",
36
+ method: :cell,
37
+ selected: form.object.link.present?,
38
+ args: ["/decidim/attachments_link_tab", form]
39
+ }
40
+ ] %>
22
41
  </div>
23
42
  </div>
24
43
  </div>
@@ -18,7 +18,7 @@
18
18
  <th><%= t("models.attachment.fields.collection", scope: "decidim.admin") %></th>
19
19
  <th><%= t("models.attachment.fields.content_type", scope: "decidim.admin") %></th>
20
20
  <th><%= t("models.attachment.fields.file_size", scope: "decidim.admin") %></th>
21
- <th class="actions"></th>
21
+ <th></th>
22
22
  </tr>
23
23
  </thead>
24
24
  <tbody>
@@ -34,7 +34,7 @@
34
34
  <%= attachment.file_type %>
35
35
  </td>
36
36
  <td>
37
- <%= number_to_human_size(attachment.file_size) %>
37
+ <%= attachment.file? ? number_to_human_size(attachment.file_size) : "-" %>
38
38
  </td>
39
39
  <td class="table-list__actions">
40
40
  <% if allowed_to? :update, :attachment, attachment: attachment %>
@@ -14,24 +14,42 @@
14
14
  </h2>
15
15
  </div>
16
16
  <div class="card-section">
17
- <table class="table-list table-list--lastleft">
17
+ <table class="table-list">
18
18
  <thead>
19
19
  <tr>
20
20
  <th><%= t("decidim.authorization_handlers.name") %></th>
21
- <th><%= t("decidim.authorization_handlers.help") %></th>
21
+ <th class="!text-left"><%= t("decidim.authorization_handlers.help") %></th>
22
22
  </tr>
23
23
  </thead>
24
24
  <tbody>
25
25
  <% @workflows.each do |manifest| %>
26
26
  <tr>
27
27
  <% workflow = Decidim::Verifications::Adapter.new(manifest) %>
28
- <td><%= link_to workflow.fullname, workflow.admin_root_path %></td>
29
28
  <td>
30
- <ul>
31
- <% t("decidim.authorization_handlers.admin.#{workflow.key}.help").each do |tip| %>
32
- <li><%= tip %></li>
33
- <% end %>
34
- </ul>
29
+ <% if workflow.has_admin_root_path? %>
30
+ <%= link_to workflow.fullname, workflow.admin_root_path %>
31
+ <% else %>
32
+ <%= workflow.fullname %>
33
+ <% end %>
34
+ </td>
35
+ <td class="!text-left">
36
+ <% i18n_key = "decidim.authorization_handlers.admin.#{workflow.key}.help" %>
37
+ <% if I18n.exists?(i18n_key, current_locale) %>
38
+ <ul class="list-decimal ml-4">
39
+ <% t(i18n_key).each do |tip| %>
40
+ <li><%= tip %></li>
41
+ <% end %>
42
+ </ul>
43
+ <% else %>
44
+ <div class="flash warning">
45
+ <ul>
46
+ <% default_help = t("decidim.authorization_handlers.admin.default.help", authorization_handler: i18n_key) %>
47
+ <% default_help.each do |tip| %>
48
+ <li><%= tip %></li>
49
+ <% end %>
50
+ </ul>
51
+ </div>
52
+ <% end %>
35
53
  </td>
36
54
  </tr>
37
55
  <% end %>
@@ -19,7 +19,7 @@
19
19
  <%= cell("decidim/announcement", t(".already_reported_html"), callout_class: "alert" ) %>
20
20
  <% end %>
21
21
 
22
- <% if Decidim.module_installed?(:templates) %>
22
+ <% if defined?(Decidim::Templates) %>
23
23
  <%= render "decidim/templates/admin/block_user_templates/template_chooser", form: f %>
24
24
  <% end %>
25
25
 
@@ -14,7 +14,7 @@
14
14
  <thead>
15
15
  <tr>
16
16
  <th><%= t("activemodel.attributes.category.name") %></th>
17
- <th class="actions"></th>
17
+ <th></th>
18
18
  </tr>
19
19
  </thead>
20
20
  <tbody>
@@ -38,7 +38,7 @@
38
38
  </td>
39
39
  </tr>
40
40
  <% category.subcategories.each do |subcategory| %>
41
- <tr class="extra__table-list__subcategory">
41
+ <tr>
42
42
  <td>
43
43
  <%= link_to translated_attribute(subcategory.name), edit_category_path(current_participatory_space, subcategory) %><br>
44
44
  </td>
@@ -59,7 +59,7 @@
59
59
 
60
60
  <div id="panel-step_settings" class="card-section">
61
61
  <div class="row column">
62
- <fieldset class="step-settings">
62
+ <fieldset>
63
63
  <div class="card-section">
64
64
  <% current_participatory_space.steps.each do |step| %>
65
65
  <fieldset class="step-settings-<%= step.id %>">
@@ -14,12 +14,8 @@
14
14
  <div class="dropdown-pane" id="add-component-dropdown" data-dropdown data-auto-focus="true" data-close-on-click="true">
15
15
  <ul class="vertical menu add-components font-normal">
16
16
  <% @manifests.each do |manifest| %>
17
- <%= link_to new_component_path(type: manifest.name), class: manifest.name do %>
18
- <li>
19
- <%= t("#{manifest.name}.name", scope: "decidim.components") %>
20
- </li>
17
+ <li><%= link_to t("#{manifest.name}.name", scope: "decidim.components"), new_component_path(type: manifest.name), class: manifest.name %></li>
21
18
  <% end %>
22
- <% end %>
23
19
  </ul>
24
20
  </div>
25
21
  </div>
@@ -1,32 +1,10 @@
1
1
  <% add_decidim_page_title(t("title", scope: "decidim.admin.conflicts")) %>
2
- <div class="item_show__header">
3
- <h1 class="item_show__header-title">
4
- <%= t("title", scope: "decidim.admin.conflicts") %>
5
- </h1>
6
- </div>
7
-
8
- <div class="filters__section">
9
- <div class="fcell search">
10
- <%= search_form_for(query, url: url_for) do |form| %>
11
- <%= applied_filters_hidden_field_tags %>
12
- <div class="input-group">
13
- <%= form.search_field(
14
- search_field_predicate,
15
- class: "input-group-field",
16
- label: false,
17
- placeholder: t(".text")
18
- ) %>
19
- <div class="input-group-button">
20
- <button type="submit" class="text-secondary" aria-label="<%= t("decidim.search.term_input_placeholder") %>">
21
- <%= icon "search-line", class: "fill-secondary w-4 h-4" %>
22
- </button>
23
- </div>
24
- </div>
25
- <% end %>
26
- </div>
27
- </div>
28
-
29
2
  <div class="card">
3
+ <div class="item_show__header">
4
+ <h1 class="item_show__header-title">
5
+ <%= t("title", scope: "decidim.admin.conflicts") %>
6
+ </h1>
7
+ </div>
30
8
  <div class="table-scroll">
31
9
  <table class="table-list">
32
10
  <thead>
@@ -39,7 +17,7 @@
39
17
  </tr>
40
18
  </thead>
41
19
  <tbody>
42
- <% conflicts.each do |conflict| %>
20
+ <% @conflicts.each do |conflict| %>
43
21
  <tr>
44
22
  <td><%= conflict.current_user.name %></td>
45
23
  <td><%= conflict.managed_user.name %></td>
@@ -52,4 +30,3 @@
52
30
  </table>
53
31
  </div>
54
32
  </div>
55
- <%= decidim_paginate conflicts %>
@@ -6,7 +6,7 @@
6
6
  </div>
7
7
 
8
8
  <div class="card-section">
9
- <p><%= t(".anouncement", count: count_pending_moderations) %></p>
9
+ <p><%= t(".announcement", count: count_pending_moderations) %></p>
10
10
  <p><%= link_to t(".goto_moderation"), moderations_path, class: "button button__sm button__secondary mt-2" %></p>
11
11
  </div>
12
12
  </div>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div class="item_show__header">
4
4
  <h1 class="item_show__header-title">
5
- <%= t "decidim.admin.titles.dashboard" %> <%= current_organization.name %>
5
+ <%= t "decidim.admin.titles.dashboard" %> <%= current_organization_name %>
6
6
  </h1>
7
7
  </div>
8
8
 
@@ -1,4 +1,4 @@
1
- <span class="exports button button__sm button__secondary button--simple" data-toggle="<%= dropdown_id(filters) %>">
1
+ <span class="exports button button__sm button__secondary" data-toggle="<%= dropdown_id(filters) %>">
2
2
  <% if filters.present? %>
3
3
  <%= t("actions.export-selection", scope: "decidim.admin") %>
4
4
  <% else %>
@@ -10,11 +10,11 @@
10
10
  <ul class="vertical menu add-components">
11
11
  <% component.manifest.export_manifests.each do |manifest| %>
12
12
  <% manifest.formats.each do |format| %>
13
- <%= link_to exports_path(component, id: manifest.name, format:, resource_id:, filters:), method: :post do %>
14
- <li class="exports--format--<%= format.downcase %> exports--<%= manifest.name %>">
15
- <%= t("decidim.admin.exports.export_as", name: t("decidim.#{component.manifest.name}.admin.exports.#{manifest.name}"), export_format: t("decidim.admin.exports.formats.#{format}")) %>
16
- </li>
17
- <% end %>
13
+ <li class="exports--format--<%= format.downcase %> exports--<%= manifest.name %>">
14
+ <%= link_to t("decidim.admin.exports.export_as", name: t("decidim.#{component.manifest.name}.admin.exports.#{manifest.name}"), export_format: t("decidim.admin.exports.formats.#{format}")),
15
+ exports_path(component, id: manifest.name, format:, resource_id:, filters:),
16
+ method: :post %>
17
+ </li>
18
18
  <% end %>
19
19
  <% end %>
20
20
  </ul>
@@ -1,6 +1,6 @@
1
1
  <% add_decidim_page_title(t("impersonatable_users", scope: "decidim.admin.titles")) %>
2
2
  <% if current_organization.available_authorizations.empty? %>
3
- <div class="section">
3
+ <div>
4
4
  <%= cell("decidim/announcement", t(".needs_authorization_warning"), callout_class: "warning" ) %>
5
5
  </div>
6
6
  <% end %>
@@ -32,7 +32,7 @@
32
32
  </div>
33
33
  <div class="fcell search">
34
34
  <%= form_tag "", method: :get do %>
35
- <div class="filters__search">
35
+ <div>
36
36
  <div class="input-group">
37
37
  <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
38
38
  <%= hidden_field_tag :state, @state %>
@@ -64,7 +64,7 @@
64
64
  <td><%= user.managed? ? t(".managed") : t(".not_managed") %></td>
65
65
  <td class="table-list__actions">
66
66
  <% if allowed_to? :impersonate, :impersonatable_user, user: user %>
67
- <%= icon_link_to "login-box-line", new_impersonatable_user_impersonation_path(user), t(".impersonate"), class: "action-icon--impersonate" %>
67
+ <%= icon_link_to "user-line", new_impersonatable_user_impersonation_path(user), t(".impersonate"), class: "action-icon--impersonate" %>
68
68
  <% end %>
69
69
  <%= icon_link_to "time-line", impersonatable_user_impersonation_logs_path(user), t(".view_logs"), class: "action-icon--view-logs" %>
70
70
  <% if allowed_to? :promote, :impersonatable_user, user: user %>
@@ -1,4 +1,4 @@
1
- <span class="imports button button__sm button__secondary button--simple" data-toggle="import-dropdown">
1
+ <span class="imports button button__sm button__secondary" data-toggle="import-dropdown">
2
2
  <%= t "actions.import", scope: "decidim.admin" %>
3
3
  <%= icon "arrow-down-s-line", class: "dropdown-filter-icon" %>
4
4
  </span>
@@ -7,12 +7,10 @@
7
7
  <% if custom %>
8
8
  <%= yield %>
9
9
  <% else %>
10
- <% component.manifest.import_manifests.each do |import_manifest| %>
11
- <%= link_to admin_imports_path(component, resource_id:, name: import_manifest.name) do %>
12
- <li class="imports--file imports--<%= import_manifest.name %>">
13
- <%= import_manifest.message(:label, self) %>
14
- </li>
15
- <% end %>
10
+ <% component.manifest.import_manifests.each do |import_manifest| %>
11
+ <li class="imports--file imports--<%= import_manifest.name %>">
12
+ <%= link_to import_manifest.message(:label, self), admin_imports_path(component, resource_id:, name: import_manifest.name) %>
13
+ </li>
16
14
  <% end %>
17
15
  <% end %>
18
16
  </ul>
@@ -5,24 +5,23 @@
5
5
 
6
6
  <div id="js-other-actions-wrapper">
7
7
  <% if import_manifest.has_example? %>
8
- <span class="imports-example tiny button button__sm button__secondary button--simple mr-2" data-toggle="example-dropdown">
8
+ <span class="imports-example button button__sm button__secondary mr-2" data-toggle="example-dropdown">
9
9
  <%= t(".download_example") %>
10
10
  <%= icon "arrow-down-s-line", class: "dropdown-filter-icon" %>
11
11
  </span>
12
12
  <div class="dropdown-pane" id="example-dropdown" data-dropdown data-position=bottom data-alignment=right data-auto-focus="true" data-close-on-click="true">
13
13
  <ul class="vertical menu add-components">
14
14
  <% mime_types.each do |format, name| %>
15
- <%= link_to admin_imports_example_path(@current_component, name: import_manifest.name, format:) do %>
16
- <li class="examples--format--<%= format.downcase %> examples--<%= import_manifest.name %>">
17
- <%= t(".download_example_format", name:) %>
18
- </li>
19
- <% end %>
15
+ <li class="examples--format--<%= format.downcase %> examples--<%= import_manifest.name %>">
16
+ <%= link_to t(".download_example_format", name:),
17
+ admin_imports_example_path(@current_component, name: import_manifest.name, format:) %>
18
+ </li>
20
19
  <% end %>
21
20
  </ul>
22
21
  </div>
23
22
  <% end %>
24
23
 
25
- <%= link_to t(".actions.back"), manage_component_path(@current_component), class: "button button__sm button__secondary hollow tiny button--simple" %>
24
+ <%= link_to t(".actions.back"), manage_component_path(@current_component), class: "button button__sm button__secondary hollow button--simple" %>
26
25
  </div>
27
26
  </h1>
28
27
  </div>
@@ -11,14 +11,14 @@
11
11
  } %>
12
12
  </div>
13
13
  <div class="row column">
14
- <%= form.datetime_field :created_at_dtgteq %>
14
+ <%= form.datetime_field :created_at_dtgteq, hide_help: true %>
15
15
  </div>
16
16
  <div class="row column">
17
- <%= form.datetime_field :created_at_dtlteq %>
17
+ <%= form.datetime_field :created_at_dtlteq, hide_help: true, default_time: "23:59" %>
18
18
  </div>
19
19
  <div class="row column">
20
20
  <div class="grid grid-cols-[70%_30%] items-end gap-x-4">
21
- <div class="cell auto">
21
+ <div class="cell">
22
22
  <%= form.search_field(search_field_predicate, class: "input-group-field", label: t(".user"), placeholder: t(".text")) %>
23
23
  </div>
24
24
  <div class="cell">
@@ -5,7 +5,7 @@
5
5
  </h1>
6
6
  </div>
7
7
 
8
- <div class="section">
8
+ <div>
9
9
  <%= cell("decidim/announcement", t(".explanation"), callout_class: "warning" ) %>
10
10
  </div>
11
11
 
@@ -21,7 +21,7 @@
21
21
  <th><%= t(".reason") %></th>
22
22
  <th><%= sort_link(query, :created_at, t("models.moderation.fields.created_at", scope: "decidim.moderations")) %></th>
23
23
  <th><%= sort_link(query, :report_count, t(".reports"), default_order: :desc) %></th>
24
- <th class="actions"><%= t(".actions.title") %></th>
24
+ <th><%= t(".actions.title") %></th>
25
25
  </tr>
26
26
  </thead>
27
27
  <tbody>
@@ -45,7 +45,7 @@
45
45
  <%= moderation.report_count %>
46
46
  </td>
47
47
 
48
- <td class="actions">
48
+ <td>
49
49
  <% if !moderation.user.blocked? && allowed_to?(:unreport, :moderate_users) %>
50
50
  <%= icon_link_to "arrow-go-back-line", ignore_moderated_user_path(id: moderation), t(".actions.unreport"), class: "action-icon--unreport", method: :put %>
51
51
  <% end %>
@@ -27,7 +27,7 @@
27
27
  <% if params[:hidden] %>
28
28
  <th><%= t("models.moderation.fields.hidden_at", scope: "decidim.moderations") %></th>
29
29
  <% end %>
30
- <th class="actions"><%= t("actions.title", scope: "decidim.moderations") %></th>
30
+ <th><%= t("actions.title", scope: "decidim.moderations") %></th>
31
31
  </tr>
32
32
  </thead>
33
33
  <tbody>
@@ -69,22 +69,22 @@
69
69
  <%= l(moderation.hidden_at, format: :long) if moderation.hidden_at.present? %>
70
70
  </td>
71
71
  <% end %>
72
- <td class="actions">
72
+ <td>
73
73
  <%= icon_link_to "fullscreen-line",
74
74
  moderation_reports_path(moderation_id: moderation),
75
75
  t("actions.expand", scope: "decidim.moderations"),
76
76
  class: "action-icon--expand" %>
77
- <% if !moderation.reportable.hidden? && allowed_to?(:unreport, permission_resource) %>
77
+ <% if !moderation.reportable.hidden? && allowed_to?(:unreport, authorization_scope) %>
78
78
  <%= icon_link_to "arrow-go-back-line",
79
79
  unreport_moderation_path(id: moderation),
80
80
  t("actions.unreport", scope: "decidim.moderations"),
81
81
  class: "action-icon--unreport",
82
82
  method: :put %>
83
83
  <% end %>
84
- <% if !moderation.reportable.hidden? && allowed_to?(:hide, permission_resource) %>
84
+ <% if !moderation.reportable.hidden? && allowed_to?(:hide, authorization_scope) %>
85
85
  <%= icon_link_to "eye-line", hide_moderation_path(id: moderation), t("actions.hide", scope: "decidim.moderations"), class: "action-icon--hide", method: :put %>
86
86
  <% end %>
87
- <% if moderation.reportable.hidden? && allowed_to?(:unhide, permission_resource) %>
87
+ <% if moderation.reportable.hidden? && allowed_to?(:unhide, authorization_scope) %>
88
88
  <%= icon_link_to "eye-line", unhide_moderation_path(id: moderation), t("actions.unhide", scope: "decidim.moderations"), method: :put %>
89
89
  <% end %>
90
90
  </td>
@@ -38,7 +38,7 @@
38
38
  <% end %>
39
39
  </dt>
40
40
  <dd class="reported-content">
41
- <div class="current">
41
+ <div>
42
42
  <%= reported_content_for moderation.reportable %>
43
43
  </div>
44
44
  <% if translatable_resource?(moderation.reportable) %>
@@ -70,7 +70,7 @@
70
70
  <th><%= t("models.report.fields.reason", scope: "decidim.moderations") %></th>
71
71
  <th><%= t("models.report.fields.locale", scope: "decidim.moderations") %></th>
72
72
  <th><%= t("models.report.fields.details", scope: "decidim.moderations") %></th>
73
- <th class="actions"><%= t("actions.title", scope: "decidim.moderations") %></th>
73
+ <th><%= t("actions.title", scope: "decidim.moderations") %></th>
74
74
  </tr>
75
75
  </thead>
76
76
  <tbody>
@@ -79,7 +79,7 @@
79
79
  <td><%= t("decidim.admin.moderations.report.reasons.#{report.reason}") %></td>
80
80
  <td><%= report.locale.present? ? locale_name(report.locale) : "" %></td>
81
81
  <td><%= report.details&.truncate(250) %></td>
82
- <td class="actions">
82
+ <td>
83
83
  <%= icon_link_to "fullscreen-line",
84
84
  moderation_report_path(moderation_id: moderation, id: report.id),
85
85
  t("actions.expand", scope: "decidim.moderations"),
@@ -92,13 +92,13 @@
92
92
  </div>
93
93
  <div class="item__edit-sticky">
94
94
  <div class="item__edit-sticky-container">
95
- <% if !moderation.reportable.hidden? && allowed_to?(:unreport, permission_resource) %>
95
+ <% if !moderation.reportable.hidden? && allowed_to?(:unreport, authorization_scope) %>
96
96
  <%= link_to t("actions.unreport", scope: "decidim.moderations"), unreport_moderation_path(id: moderation), method: :put, class: "button button__sm button__secondary" %>
97
97
  <% end %>
98
- <% if !moderation.reportable.hidden? && allowed_to?(:hide, permission_resource) %>
98
+ <% if !moderation.reportable.hidden? && allowed_to?(:hide, authorization_scope) %>
99
99
  <%= link_to t("actions.hide", scope: "decidim.moderations"), hide_moderation_path(id: moderation), method: :put, class: "button button__sm button__secondary alert" %>
100
100
  <% end %>
101
- <% if moderation.reportable.hidden? && allowed_to?(:unhide, permission_resource) %>
101
+ <% if moderation.reportable.hidden? && allowed_to?(:unhide, authorization_scope) %>
102
102
  <%= link_to t("actions.unhide", scope: "decidim.moderations"), unhide_moderation_path(id: moderation), method: :put, class: "button button__sm button__secondary alert" %>
103
103
  <% end %>
104
104
  </div>
@@ -31,7 +31,7 @@
31
31
  <% end %>
32
32
  </dt>
33
33
  <dd class="reported-content">
34
- <div class="current">
34
+ <div>
35
35
  <%= reported_content_for moderation.reportable, locale: @report.locale %>
36
36
  </div>
37
37
  <% if translatable_resource?(moderation.reportable) %>
@@ -51,13 +51,13 @@
51
51
 
52
52
  <div class="item__edit-sticky">
53
53
  <div class="item__edit-sticky-container">
54
- <% if !moderation.reportable.hidden? && allowed_to?(:unreport, permission_resource) %>
54
+ <% if !moderation.reportable.hidden? && allowed_to?(:unreport, authorization_scope) %>
55
55
  <%= link_to t("actions.unreport", scope: "decidim.moderations"), unreport_moderation_path(id: moderation), method: :put, class: "button button__sm button__secondary" %>
56
56
  <% end %>
57
- <% if !moderation.reportable.hidden? && allowed_to?(:hide, permission_resource) %>
57
+ <% if !moderation.reportable.hidden? && allowed_to?(:hide, authorization_scope) %>
58
58
  <%= link_to t("actions.hide", scope: "decidim.moderations"), hide_moderation_path(id: moderation), method: :put, class: "button button__sm button__secondary alert" %>
59
59
  <% end %>
60
- <% if moderation.reportable.hidden? && allowed_to?(:unhide, permission_resource) %>
60
+ <% if moderation.reportable.hidden? && allowed_to?(:unhide, authorization_scope) %>
61
61
  <%= link_to t("actions.unhide", scope: "decidim.moderations"), unhide_moderation_path(id: moderation), method: :put, class: "button button__sm button__secondary alert" %>
62
62
  <% end %>
63
63
  </div>
@@ -10,8 +10,8 @@
10
10
  <div class="card-section">
11
11
  <div class="grid md:grid-cols-2 gap-x-8 p-4">
12
12
  <% templates.each do |newsletter_template| %>
13
- <div class="card card--mini pb-12 md:pb-0" id="<%= newsletter_template.name %>">
14
- <iframe src="<%= preview_newsletter_template_path(newsletter_template.name) %>" class="email-preview w-full h-[60dvh]">
13
+ <div class="card pb-12 md:pb-0" id="<%= newsletter_template.name %>">
14
+ <iframe src="<%= preview_newsletter_template_path(newsletter_template.name) %>" class="w-full h-[60dvh]" data-email-preview>
15
15
  </iframe>
16
16
  <div class="card-footer">
17
17
  <h2 class="card-title flex items-center">
@@ -6,14 +6,14 @@
6
6
  </div>
7
7
  <div class="item__edit-form">
8
8
  <div class="card">
9
- <div class="card-section p-4">
10
- <iframe src="<%= preview_newsletter_template_path(template_manifest.name) %>" class="email-preview newsletter-template-preview w-full h-[60dvh]">
9
+ <div class="card-section">
10
+ <iframe src="<%= preview_newsletter_template_path(template_manifest.name) %>" class="w-full h-[60dvh]" data-email-preview>
11
11
  </iframe>
12
- <div class="item__edit-sticky">
13
- <div class="item__edit-sticky-container">
14
- <%= link_to(t(".use_template"), new_newsletter_template_newsletter_path(template_manifest.name), class: "button button__sm button__secondary") %>
15
- </div>
16
- </div>
12
+ </div>
13
+ </div>
14
+ <div class="item__edit-sticky">
15
+ <div class="item__edit-sticky-container">
16
+ <%= link_to(t(".use_template"), new_newsletter_template_newsletter_path(template_manifest.name), class: "button button__sm button__secondary") %>
17
17
  </div>
18
18
  </div>
19
19
  </div>
@@ -5,7 +5,7 @@
5
5
  <%= t ".title" %>
6
6
  <div class="flex ml-auto items-center gap-x-4">
7
7
  <strong class="font-bold text-md text-gray-2"><%= t("newsletters.index.subscribed_count", scope: "decidim.admin") %></strong>
8
- <span class="subscribed_count font-semibold text-md text-gray-2"><%= recipients_count_query %></span>
8
+ <span data-subscribed-count class="font-semibold text-md text-gray-2"><%= recipients_count_query %></span>
9
9
  <% if allowed_to? :create, :newsletter %>
10
10
  <%= link_to t("actions.newsletter.new", scope: "decidim.admin"), [:newsletter_templates], class: "button button__sm button__secondary new" %>
11
11
  <% end %>