decidim-admin 0.28.5 → 0.29.0.rc1

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 (244) 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/block_user.rb +0 -1
  7. data/app/commands/decidim/admin/create_area.rb +4 -32
  8. data/app/commands/decidim/admin/create_area_type.rb +4 -33
  9. data/app/commands/decidim/admin/create_attachment.rb +5 -4
  10. data/app/commands/decidim/admin/create_attachment_collection.rb +3 -3
  11. data/app/commands/decidim/admin/create_category.rb +4 -37
  12. data/app/commands/decidim/admin/create_component.rb +7 -40
  13. data/app/commands/decidim/admin/create_newsletter.rb +11 -29
  14. data/app/commands/decidim/admin/create_participatory_space_private_user.rb +4 -4
  15. data/app/commands/decidim/admin/create_scope.rb +15 -32
  16. data/app/commands/decidim/admin/create_scope_type.rb +3 -32
  17. data/app/commands/decidim/admin/create_static_page.rb +6 -47
  18. data/app/commands/decidim/admin/create_static_page_topic.rb +4 -26
  19. data/app/commands/decidim/admin/deliver_newsletter.rb +4 -5
  20. data/app/commands/decidim/admin/destroy_area.rb +2 -25
  21. data/app/commands/decidim/admin/destroy_category.rb +4 -29
  22. data/app/commands/decidim/admin/destroy_component.rb +5 -43
  23. data/app/commands/decidim/admin/destroy_newsletter.rb +2 -30
  24. data/app/commands/decidim/admin/destroy_participatory_space_private_user.rb +5 -32
  25. data/app/commands/decidim/admin/destroy_scope.rb +6 -33
  26. data/app/commands/decidim/admin/officialize_user.rb +1 -1
  27. data/app/commands/decidim/admin/participatory_space/create_admin.rb +4 -4
  28. data/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb +5 -4
  29. data/app/commands/decidim/admin/promote_managed_user.rb +4 -5
  30. data/app/commands/decidim/admin/unofficialize_user.rb +1 -1
  31. data/app/commands/decidim/admin/update_area.rb +2 -41
  32. data/app/commands/decidim/admin/update_area_type.rb +2 -42
  33. data/app/commands/decidim/admin/update_attachment.rb +10 -7
  34. data/app/commands/decidim/admin/update_attachment_collection.rb +3 -3
  35. data/app/commands/decidim/admin/update_category.rb +2 -45
  36. data/app/commands/decidim/admin/update_component.rb +4 -5
  37. data/app/commands/decidim/admin/update_component_permissions.rb +3 -3
  38. data/app/commands/decidim/admin/{update_external_domain_whitelist.rb → update_external_domain_allowlist.rb} +6 -5
  39. data/app/commands/decidim/admin/update_help_sections.rb +6 -3
  40. data/app/commands/decidim/admin/update_newsletter.rb +8 -8
  41. data/app/commands/decidim/admin/update_organization.rb +9 -53
  42. data/app/commands/decidim/admin/update_organization_appearance.rb +10 -81
  43. data/app/commands/decidim/admin/update_scope.rb +7 -40
  44. data/app/commands/decidim/admin/update_scope_type.rb +2 -42
  45. data/app/commands/decidim/admin/update_static_page.rb +5 -46
  46. data/app/commands/decidim/admin/update_static_page_topic.rb +2 -43
  47. data/app/constraints/decidim/admin/organization_dashboard_constraint.rb +1 -1
  48. data/app/controllers/concerns/decidim/admin/content_blocks/landing_page.rb +2 -2
  49. data/app/controllers/concerns/decidim/admin/filterable.rb +79 -4
  50. data/app/controllers/concerns/decidim/admin/global_moderation_context.rb +1 -1
  51. data/app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb +0 -7
  52. data/app/controllers/concerns/decidim/admin/paginable.rb +20 -0
  53. data/app/controllers/concerns/decidim/admin/participatory_space_export.rb +1 -1
  54. data/app/controllers/decidim/admin/application_controller.rb +2 -1
  55. data/app/controllers/decidim/admin/area_types_controller.rb +8 -9
  56. data/app/controllers/decidim/admin/areas_controller.rb +1 -1
  57. data/app/controllers/decidim/admin/authorization_workflows_controller.rb +1 -1
  58. data/app/controllers/decidim/admin/block_user_controller.rb +1 -1
  59. data/app/controllers/decidim/admin/categories_controller.rb +2 -2
  60. data/app/controllers/decidim/admin/component_permissions_controller.rb +1 -1
  61. data/app/controllers/decidim/admin/components_controller.rb +2 -2
  62. data/app/controllers/decidim/admin/concerns/has_attachment_collections.rb +2 -2
  63. data/app/controllers/decidim/admin/concerns/has_attachments.rb +2 -2
  64. data/app/controllers/decidim/admin/concerns/has_private_users.rb +1 -1
  65. data/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb +1 -1
  66. data/app/controllers/decidim/admin/conflicts_controller.rb +6 -14
  67. data/app/controllers/decidim/admin/help_sections_controller.rb +1 -1
  68. data/app/controllers/decidim/admin/impersonations_controller.rb +0 -1
  69. data/app/controllers/decidim/admin/managed_users/promotions_controller.rb +1 -1
  70. data/app/controllers/decidim/admin/moderations/reports_controller.rb +4 -4
  71. data/app/controllers/decidim/admin/moderations_controller.rb +7 -7
  72. data/app/controllers/decidim/admin/newsletter_templates_controller.rb +1 -1
  73. data/app/controllers/decidim/admin/newsletters_controller.rb +6 -7
  74. data/app/controllers/decidim/admin/organization_appearance_controller.rb +1 -1
  75. data/app/controllers/decidim/admin/organization_controller.rb +1 -1
  76. data/app/controllers/decidim/admin/{organization_external_domain_whitelist_controller.rb → organization_external_domain_allowlist_controller.rb} +7 -7
  77. data/app/controllers/decidim/admin/scope_types_controller.rb +7 -8
  78. data/app/controllers/decidim/admin/scopes_controller.rb +1 -1
  79. data/app/controllers/decidim/admin/share_tokens_controller.rb +1 -1
  80. data/app/controllers/decidim/admin/static_page_topics_controller.rb +2 -2
  81. data/app/controllers/decidim/admin/static_pages_controller.rb +2 -2
  82. data/app/forms/decidim/admin/attachment_form.rb +7 -1
  83. data/app/forms/decidim/admin/help_section_form.rb +1 -1
  84. data/app/forms/decidim/admin/impersonate_user_form.rb +0 -5
  85. data/app/forms/decidim/admin/organization_appearance_form.rb +2 -5
  86. data/app/forms/decidim/admin/{organization_external_domain_whitelist_form.rb → organization_external_domain_allowlist_form.rb} +3 -3
  87. data/app/forms/decidim/admin/organization_form.rb +4 -4
  88. data/app/forms/decidim/admin/static_page_form.rb +1 -2
  89. data/app/forms/decidim/admin/transfer_user_form.rb +0 -15
  90. data/app/helpers/decidim/admin/application_helper.rb +0 -13
  91. data/app/helpers/decidim/admin/filterable_helper.rb +19 -3
  92. data/app/helpers/decidim/admin/moderations/reports_helper.rb +3 -1
  93. data/app/helpers/decidim/admin/newsletters_helper.rb +3 -3
  94. data/app/helpers/decidim/admin/paginable/per_page_helper.rb +22 -0
  95. data/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb +2 -2
  96. data/app/packs/entrypoints/decidim_admin.js +4 -1
  97. data/app/packs/src/decidim/admin/application.js +19 -15
  98. data/app/packs/src/decidim/admin/css_preview.js +39 -0
  99. data/app/packs/src/decidim/admin/form.js +18 -1
  100. data/app/packs/src/decidim/admin/newsletters.js +9 -18
  101. data/app/packs/src/decidim/admin/participatory_space_search.js +1 -1
  102. data/app/packs/src/decidim/admin/proposal_infinite_edit.js +2 -2
  103. data/app/packs/src/decidim/admin/sync_radio_buttons.js +27 -0
  104. data/app/packs/src/decidim/admin/text_copy.js +19 -0
  105. data/app/packs/stylesheets/decidim/admin/_cards.scss +1 -1
  106. data/app/packs/stylesheets/decidim/admin/_datepicker.scss +62 -0
  107. data/app/packs/stylesheets/decidim/admin/_item_edit.scss +1 -1
  108. data/app/packs/stylesheets/decidim/admin/_item_show.scss +8 -0
  109. data/app/packs/stylesheets/decidim/admin/_moderations.scss +0 -8
  110. data/app/packs/stylesheets/decidim/admin/_proposal_status.scss +5 -0
  111. data/app/packs/stylesheets/decidim/admin/application.scss +2 -0
  112. data/app/permissions/decidim/admin/permissions.rb +2 -2
  113. data/app/queries/decidim/admin/newsletter_recipients.rb +5 -9
  114. data/app/queries/decidim/admin/user_filter.rb +4 -4
  115. data/app/queries/decidim/admin/user_groups_evaluation.rb +1 -1
  116. data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -1
  117. data/app/views/decidim/admin/attachments/_form.html.erb +21 -2
  118. data/app/views/decidim/admin/attachments/index.html.erb +2 -2
  119. data/app/views/decidim/admin/authorization_workflows/index.html.erb +26 -8
  120. data/app/views/decidim/admin/block_user/new.html.erb +1 -1
  121. data/app/views/decidim/admin/categories/index.html.erb +2 -2
  122. data/app/views/decidim/admin/components/_form.html.erb +1 -1
  123. data/app/views/decidim/admin/components/index.html.erb +1 -5
  124. data/app/views/decidim/admin/conflicts/edit.html.erb +11 -21
  125. data/app/views/decidim/admin/conflicts/index.html.erb +6 -29
  126. data/app/views/decidim/admin/dashboard/_pending_moderations.html.erb +1 -1
  127. data/app/views/decidim/admin/dashboard/show.html.erb +1 -1
  128. data/app/views/decidim/admin/exports/_dropdown.html.erb +6 -6
  129. data/app/views/decidim/admin/impersonatable_users/index.html.erb +3 -3
  130. data/app/views/decidim/admin/imports/_dropdown.html.erb +5 -7
  131. data/app/views/decidim/admin/imports/new.html.erb +6 -7
  132. data/app/views/decidim/admin/logs/_filters.html.erb +3 -3
  133. data/app/views/decidim/admin/managed_users/promotions/new.html.erb +1 -1
  134. data/app/views/decidim/admin/moderated_users/index.html.erb +4 -4
  135. data/app/views/decidim/admin/moderations/index.html.erb +5 -5
  136. data/app/views/decidim/admin/moderations/reports/index.html.erb +6 -6
  137. data/app/views/decidim/admin/moderations/reports/show.html.erb +4 -4
  138. data/app/views/decidim/admin/newsletter_templates/index.html.erb +3 -2
  139. data/app/views/decidim/admin/newsletter_templates/show.html.erb +7 -7
  140. data/app/views/decidim/admin/newsletters/index.html.erb +1 -1
  141. data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +6 -7
  142. data/app/views/decidim/admin/newsletters/show.html.erb +1 -1
  143. data/app/views/decidim/admin/organization/_form.html.erb +3 -3
  144. data/app/views/decidim/admin/organization_appearance/form/_colors.html.erb +0 -3
  145. data/app/views/decidim/admin/organization_appearance/form/_images.html.erb +5 -5
  146. data/app/views/decidim/admin/organization_appearance/form/_minimap.html.erb +3 -3
  147. data/app/views/decidim/admin/{organization_external_domain_whitelist → organization_external_domain_allowlist}/_external_domain.html.erb +4 -4
  148. data/app/views/decidim/admin/{organization_external_domain_whitelist → organization_external_domain_allowlist}/_form.html.erb +2 -2
  149. data/app/views/decidim/admin/{organization_external_domain_whitelist → organization_external_domain_allowlist}/edit.html.erb +2 -2
  150. data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +1 -1
  151. data/app/views/decidim/admin/participatory_space_private_users_csv_imports/new.html.erb +1 -1
  152. data/app/views/decidim/admin/share_tokens/_share_tokens.html.erb +1 -1
  153. data/app/views/decidim/admin/shared/_adjacent_navigation.html.erb +30 -0
  154. data/app/views/decidim/admin/shared/_admin_confirm_modal.html.erb +7 -7
  155. data/app/views/decidim/admin/shared/_filters.html.erb +1 -1
  156. data/app/views/decidim/admin/shared/_gallery.html.erb +1 -1
  157. data/app/views/decidim/admin/shared/landing_page/_content_blocks.html.erb +2 -2
  158. data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +1 -1
  159. data/app/views/decidim/admin/static_page_topics/index.html.erb +1 -1
  160. data/app/views/decidim/admin/static_pages/_form.html.erb +0 -4
  161. data/app/views/decidim/admin/users_statistics/_users_count.html.erb +2 -2
  162. data/app/views/layouts/decidim/admin/_admin_timeout_modal.html.erb +2 -2
  163. data/app/views/layouts/decidim/admin/_application.html.erb +4 -4
  164. data/app/views/layouts/decidim/admin/_callouts_full.html.erb +1 -1
  165. data/app/views/layouts/decidim/admin/_js_configuration.html.erb +3 -1
  166. data/app/views/layouts/decidim/admin/_title_bar.html.erb +2 -2
  167. data/app/views/layouts/decidim/admin/_title_bar_responsive.html.erb +2 -2
  168. data/config/locales/ar.yml +1 -54
  169. data/config/locales/bg.yml +15 -12
  170. data/config/locales/ca.yml +18 -15
  171. data/config/locales/cs.yml +15 -17
  172. data/config/locales/de.yml +18 -15
  173. data/config/locales/el.yml +0 -11
  174. data/config/locales/en.yml +15 -12
  175. data/config/locales/es-MX.yml +17 -14
  176. data/config/locales/es-PY.yml +17 -14
  177. data/config/locales/es.yml +19 -16
  178. data/config/locales/eu.yml +145 -154
  179. data/config/locales/fi-plain.yml +18 -15
  180. data/config/locales/fi.yml +39 -36
  181. data/config/locales/fr-CA.yml +15 -12
  182. data/config/locales/fr.yml +13 -10
  183. data/config/locales/ga-IE.yml +0 -3
  184. data/config/locales/gl.yml +2 -6
  185. data/config/locales/hu.yml +9 -10
  186. data/config/locales/id-ID.yml +0 -7
  187. data/config/locales/is-IS.yml +0 -15
  188. data/config/locales/it.yml +3 -10
  189. data/config/locales/ja.yml +20 -17
  190. data/config/locales/kaa.yml +3 -3
  191. data/config/locales/ko.yml +1 -6
  192. data/config/locales/lb.yml +4 -11
  193. data/config/locales/lt.yml +0 -12
  194. data/config/locales/lv.yml +2 -6
  195. data/config/locales/nl.yml +1 -8
  196. data/config/locales/no.yml +1 -8
  197. data/config/locales/pl.yml +15 -10
  198. data/config/locales/pt-BR.yml +8 -12
  199. data/config/locales/pt.yml +0 -11
  200. data/config/locales/ro-RO.yml +5 -22
  201. data/config/locales/ru.yml +1 -6
  202. data/config/locales/sk.yml +2 -6
  203. data/config/locales/sl.yml +2 -0
  204. data/config/locales/sq-AL.yml +3 -3
  205. data/config/locales/sr-CS.yml +3 -6
  206. data/config/locales/sv.yml +209 -357
  207. data/config/locales/th-TH.yml +0 -13
  208. data/config/locales/tr-TR.yml +2 -6
  209. data/config/locales/uk.yml +0 -6
  210. data/config/locales/zh-CN.yml +6 -3
  211. data/config/locales/zh-TW.yml +0 -11
  212. data/config/routes.rb +2 -2
  213. data/decidim-admin.gemspec +2 -2
  214. data/lib/decidim/admin/engine.rb +0 -1
  215. data/lib/decidim/admin/import/creator.rb +1 -1
  216. data/lib/decidim/admin/import/importer_factory.rb +2 -2
  217. data/lib/decidim/admin/menu.rb +4 -4
  218. data/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb +3 -2
  219. data/lib/decidim/admin/test/commands/create_category_examples.rb +4 -2
  220. data/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb +3 -2
  221. data/lib/decidim/admin/test/commands/update_category_examples.rb +3 -2
  222. data/lib/decidim/admin/test/filterable_examples.rb +5 -3
  223. data/lib/decidim/admin/test/filters_participatory_space_user_roles_examples.rb +5 -5
  224. data/lib/decidim/admin/test/invite_participatory_space_admins_shared_examples.rb +1 -1
  225. data/lib/decidim/admin/test/invite_participatory_space_users_shared_context.rb +0 -1
  226. data/lib/decidim/admin/test/manage_attachment_collections_examples.rb +12 -12
  227. data/lib/decidim/admin/test/manage_attachments_examples.rb +52 -28
  228. data/lib/decidim/admin/test/manage_categories_examples.rb +13 -13
  229. data/lib/decidim/admin/test/manage_component_permissions_examples.rb +5 -5
  230. data/lib/decidim/admin/test/manage_hide_content_examples.rb +4 -4
  231. data/lib/decidim/admin/test/manage_moderations_examples.rb +21 -21
  232. data/lib/decidim/admin/test/manage_paginated_collection_examples.rb +5 -5
  233. data/lib/decidim/admin/test/manage_participatory_space_publications_examples.rb +2 -2
  234. data/lib/decidim/admin/version.rb +1 -1
  235. data/lib/decidim/admin.rb +15 -0
  236. metadata +28 -27
  237. data/app/commands/decidim/admin/destroy_share_token.rb +0 -46
  238. data/app/commands/decidim/admin/destroy_static_page.rb +0 -40
  239. data/app/commands/decidim/admin/destroy_static_page_topic.rb +0 -40
  240. data/app/controllers/concerns/decidim/admin/verification_conflicts/filterable.rb +0 -31
  241. data/app/views/layouts/decidim/admin/login.html.erb +0 -19
  242. data/config/locales/bn-BD.yml +0 -1
  243. data/config/locales/bs-BA.yml +0 -528
  244. /data/app/packs/src/decidim/admin/{external_domain_whitelist.js → external_domain_allowlist.js} +0 -0
@@ -1,10 +1,10 @@
1
1
  $(() => {
2
- const $limitiedTimeLabel = $("label[for='component_settings_proposal_edit_time_limited']")
2
+ const $limitedTimeLabel = $("label[for='component_settings_proposal_edit_time_limited']")
3
3
  const $limitedTimeRadioButton = $("#component_settings_proposal_edit_time_limited")
4
4
  const $infiniteTimeRadioButton = $("#component_settings_proposal_edit_time_infinite")
5
5
  const $editTimeContainer = $(".proposal_edit_before_minutes_container")
6
6
 
7
- $editTimeContainer.detach().appendTo($limitiedTimeLabel)
7
+ $editTimeContainer.detach().appendTo($limitedTimeLabel)
8
8
 
9
9
  if ($infiniteTimeRadioButton.is(":checked")) {
10
10
  $editTimeContainer.hide();
@@ -0,0 +1,27 @@
1
+ // Check one radio button when another is checked
2
+ //
3
+ // @example
4
+ // ```erb
5
+ // <%= form.radio_button :text_color, "Blue",
6
+ // data: {
7
+ // "sync-radio-buttons" => true,
8
+ // "sync-radio-buttons-value" => "unique-key"
9
+ // } %>
10
+ //
11
+ // <%= form.radio_button :bg_color, "Blue,"
12
+ // data: {
13
+ // "sync-radio-buttons-value-target" => "unique-key"
14
+ // } %>
15
+ // ```
16
+ //
17
+ window.addEventListener("DOMContentLoaded", () => {
18
+ document.querySelectorAll("input[data-sync-radio-buttons=true]").forEach((element) => {
19
+ element.addEventListener("change", (event) => {
20
+ const value = event.target.dataset.syncRadioButtonsValue;
21
+ const radio = document.querySelector(`input[data-sync-radio-buttons-value-target=${value}]`);
22
+
23
+ radio.checked = true;
24
+ radio.dispatchEvent(new Event("change"));
25
+ })
26
+ })
27
+ })
@@ -0,0 +1,19 @@
1
+ // Copy the value of a text input or textarea to another element.
2
+ //
3
+ // @example
4
+ // ```erb
5
+ // <%= form.translated :text_field, :example, data: { "text-copy" => true, "target" => "strong[data-copy-example]" } %>
6
+ //
7
+ // <div data-copy-example>
8
+ // <%= t(".preview") %>
9
+ // </div>
10
+ // ```
11
+ //
12
+ window.addEventListener("DOMContentLoaded", () => {
13
+ document.querySelectorAll("input[data-text-copy=true], textarea[data-text-copy=true]").forEach((element) => {
14
+ element.addEventListener("change", (event) => {
15
+ const target = document.querySelector(event.target.dataset.target);
16
+ target.innerText = event.target.value;
17
+ })
18
+ });
19
+ })
@@ -107,7 +107,7 @@
107
107
  }
108
108
 
109
109
  .fcell .label {
110
- @apply p-2 mb-2;
110
+ @apply p-2;
111
111
  }
112
112
 
113
113
  .card-section-draggable-list {
@@ -0,0 +1,62 @@
1
+ .wc-datepicker {
2
+ @apply z-[2];
3
+
4
+ &__current-month {
5
+ @apply mt-4;
6
+ }
7
+
8
+ &__next-month-button,
9
+ &__previous-month-button {
10
+ > svg {
11
+ @apply fill-none w-16 h-16;
12
+ }
13
+ }
14
+ }
15
+
16
+ .datepicker {
17
+ &__clock-button {
18
+ @apply top-0;
19
+ }
20
+
21
+ &__calendar-button {
22
+ @apply top-0;
23
+ }
24
+
25
+ &__pick-calendar {
26
+ @apply z-[3];
27
+ }
28
+
29
+ &__close-calendar {
30
+ @apply z-[3];
31
+ }
32
+
33
+ &__time-frame {
34
+ @apply z-[1];
35
+ }
36
+
37
+ &__hour-picker,
38
+ &__minute-picker {
39
+ @apply left-2 ml-px;
40
+ }
41
+
42
+ &__hour-down,
43
+ &__hour-up,
44
+ &__minute-up,
45
+ &__minute-down {
46
+ @apply h-6 w-full;
47
+
48
+ > svg {
49
+ @apply w-10 h-6 pr-1;
50
+ }
51
+ }
52
+ }
53
+
54
+ .item__edit {
55
+ &-form {
56
+ .form {
57
+ [type="number"].wc-datepicker__year-select {
58
+ @apply text-sm;
59
+ }
60
+ }
61
+ }
62
+ }
@@ -101,7 +101,7 @@
101
101
  }
102
102
 
103
103
  &-sticky {
104
- @apply w-full fixed left-0 bottom-0 bg-gray-2 border-t border-white;
104
+ @apply w-full fixed left-0 bottom-0 bg-gray-2 border-t border-white z-[4];
105
105
 
106
106
  &-container {
107
107
  @apply px-8 py-4 flex gap-x-4 justify-end;
@@ -16,6 +16,14 @@
16
16
  @apply font-normal;
17
17
  }
18
18
  }
19
+
20
+ &--with-action-options {
21
+ @apply flex-row flex-wrap;
22
+ }
23
+
24
+ &__action-options {
25
+ @apply flex bg-background p-8 w-full mt-4 w-full;
26
+ }
19
27
  }
20
28
 
21
29
  .item_show__content {
@@ -29,14 +29,6 @@
29
29
  list-style: none;
30
30
  margin: 0;
31
31
 
32
- li a {
33
- @apply flex items-center;
34
-
35
- svg {
36
- @apply ml-1;
37
- }
38
- }
39
-
40
32
  .icon {
41
33
  @apply ml-2;
42
34
  }
@@ -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)
@@ -20,7 +20,11 @@ module Decidim
20
20
  end
21
21
 
22
22
  def query
23
- recipients = recipients_base_query
23
+ recipients = Decidim::User.where(organization: @form.current_organization)
24
+ .where.not(newsletter_notifications_at: nil)
25
+ .where.not(email: nil)
26
+ .where.not(confirmed_at: nil)
27
+ .not_deleted
24
28
 
25
29
  recipients = recipients.interested_in_scopes(@form.scope_ids) if @form.scope_ids.present?
26
30
 
@@ -37,14 +41,6 @@ module Decidim
37
41
 
38
42
  private
39
43
 
40
- def recipients_base_query
41
- Decidim::User.available
42
- .where(organization: @form.current_organization)
43
- .where.not(newsletter_notifications_at: nil)
44
- .where.not(email: nil)
45
- .confirmed
46
- end
47
-
48
44
  # Return the ids of the ParticipatorySpace selected
49
45
  # in form, grouped by type
50
46
  # This will be used to take followers and
@@ -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>
@@ -27,28 +27,18 @@
27
27
  </div>
28
28
  </div>
29
29
 
30
- <div class="item__edit item__edit-1col">
31
- <div class="item__edit-form">
32
- <%= decidim_form_for(@form, url: conflict_path, method: :put, html: { class: "form form-defaults" }) do |f| %>
33
- <div class="form__wrapper">
34
- <div class="card pt-4">
35
- <div class="card-section">
36
- <div class="row column">
30
+ <%= decidim_form_for(@form, url: conflict_path, method: :put, html: { class: "form" }) do |f| %>
31
+ <div class="card">
32
+ <div class="card-section">
33
+ <div class="row column">
34
+ <%= f.text_field :reason, label: t("reason", scope: "decidim.admin.conflicts.transfer") %>
37
35
 
38
- <%= f.text_field :reason, label: t("reason", scope: "decidim.admin.conflicts.transfer") %>
39
- </div>
40
-
41
- <div class="row column">
42
-
43
- <%= f.text_field :email, label: t("email", scope: "decidim.admin.conflicts.transfer") %>
44
- </div>
45
- </div>
46
- </div>
36
+ <%= f.text_field :email, label: t("email", scope: "decidim.admin.conflicts.transfer") %>
47
37
  </div>
38
+ </div>
39
+ </div>
48
40
 
49
- <div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
50
- <%= f.submit t("title", scope: "decidim.admin.conflicts.transfer"), class: "button button__sm button__secondary" %>
51
- </div>
52
- <% end %>
41
+ <div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
42
+ <%= f.submit t("title", scope: "decidim.admin.conflicts.transfer"), class: "button button__sm button__secondary" %>
53
43
  </div>
54
- </div>
44
+ <% end %>
@@ -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>