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
@@ -97,16 +97,3 @@ th:
97
97
  success: ทำลายพื้นที่สำเร็จ
98
98
  edit:
99
99
  title: แก้ไขพื้นที่
100
- categories:
101
- edit:
102
- update: อัปเดต
103
- filters:
104
- scope_id_eq:
105
- label: ขอบเขต
106
- organization_external_domain_whitelist:
107
- edit:
108
- update: อัปเดต
109
- resources:
110
- index:
111
- headers:
112
- scope: ขอบเขต
@@ -427,7 +427,7 @@ tr:
427
427
  plural: Çoğul
428
428
  share_token:
429
429
  fields:
430
- created_at: Düzenlendi
430
+ created_at: Oluşturulma tarihi
431
431
  expires_at: Süre sonu
432
432
  last_used_at: Son kullanıldığı zaman
433
433
  times_used: Kullanım Sayısı
@@ -532,7 +532,7 @@ tr:
532
532
  confirm_deliver: Bu bülteni sunmak istediğinizden emin misiniz? Bu işlem geri alınamaz.
533
533
  deliver: Bülten sunun
534
534
  followers_help: Listede seçili herhangi bir katılımcı süreci takip eden bütün onaylanmış kullanıcılara haber bülteni gönderir.
535
- none: Yok
535
+ none: Hiçbiri
536
536
  participants_help: Listede seçili herhangi bir katılımcı sürece katılmış olan bütün onaylanmış kullanıcılara haber bülteni gönderir.
537
537
  recipients_count: Bu haber bülteni <strong id='recipients_count'>%{count}</strong> kullanıcıya gönderilecektir.
538
538
  scopes_help: Hesaplarındaki 'İlgi Alanlarım' ayarlarında etkinleştirilmiş herhangi bir seçili kapsam bulunan kullanıcılara haber bülteni gönderir.
@@ -603,9 +603,6 @@ tr:
603
603
  layout_appearance_title: Düzen görünümünü düzenle
604
604
  preview: Önizleme
605
605
  omnipresent_banner_appearance_title: Her yerde bulunan banner'ı düzenle
606
- organization_external_domain_whitelist:
607
- edit:
608
- update: Güncelleştirme
609
606
  participatory_space_private_users:
610
607
  create:
611
608
  error: Bu katılımcı alan için özel bir kullanıcı eklenirken bir hata oluştu.
@@ -717,7 +714,6 @@ tr:
717
714
  areas: alanlar
718
715
  authorization_workflows: Doğrulama yöntemleri
719
716
  dashboard: Pano
720
- edit_external_domains: Harici Güvenli Alan
721
717
  edit_landing_page: Sayfa İçeriği
722
718
  edit_organization_appearance: Ana Sayfayı Düzenleme
723
719
  impersonatable_users: Yönetilebilir kullanıcılar
@@ -326,9 +326,6 @@ uk:
326
326
  fields:
327
327
  name: Ім'я
328
328
  plural: Множина
329
- share_token:
330
- fields:
331
- created_at: 'Створено:'
332
329
  static_page:
333
330
  fields:
334
331
  created_at: 'Створено:'
@@ -428,9 +425,6 @@ uk:
428
425
  images:
429
426
  layout_appearance_title: Редагувати зовнішній вигляд шаблону
430
427
  omnipresent_banner_appearance_title: Редагувати всюдисущий банер
431
- organization_external_domain_whitelist:
432
- edit:
433
- update: Оновити
434
428
  participatory_space_private_users:
435
429
  create:
436
430
  error: При спробі додати приватного учасника до цього простору співучасті сталася помилка.
@@ -275,6 +275,8 @@ zh-CN:
275
275
  values:
276
276
  'false': 已发布
277
277
  'true': 未发布
278
+ scope_id_eq:
279
+ label: 范围
278
280
  search_label: 搜索
279
281
  search_placeholder:
280
282
  name_or_nickname_or_email_cont: 通过电子邮件、名称或昵称搜索 %{collection}。
@@ -538,9 +540,6 @@ zh-CN:
538
540
  layout_appearance_title: 编辑布局外观
539
541
  preview: 预览
540
542
  omnipresent_banner_appearance_title: Edit omnipresent banner
541
- organization_external_domain_whitelist:
542
- edit:
543
- update: 更新
544
543
  participatory_space_private_users:
545
544
  create:
546
545
  error: 在这种参与空间中添加私人参与者时出现了问题。
@@ -562,6 +561,10 @@ zh-CN:
562
561
  title: 编辑权限
563
562
  update:
564
563
  success: 权限更新成功。
564
+ resources:
565
+ index:
566
+ headers:
567
+ scope: 范围
565
568
  scope_types:
566
569
  create:
567
570
  error: 创建新的范围类型时出现问题。
@@ -359,10 +359,6 @@ zh-TW:
359
359
  title: 等待的操作
360
360
  show:
361
361
  view_more_logs: 檢視更多記錄
362
- domain_whitelist:
363
- update:
364
- error: 網址白名單更新失敗
365
- success: 網址白名單更新成功.
366
362
  exports:
367
363
  export_as: "%{name} 成為 %{export_format}"
368
364
  formats:
@@ -429,7 +425,6 @@ zh-TW:
429
425
  report_count_eq: 報告數量等於
430
426
  reported_id_string_or_reported_content_cont: 按報告 Id 或內容搜索%{collection}。
431
427
  title_cont: 按標題搜索%{collection}。
432
- user_name_or_user_email_cont: 按名稱或電子郵件搜索%{collection}。
433
428
  user_name_or_user_nickname_or_user_email_cont: 按電子郵件、姓名或暱稱搜索%{collection}。
434
429
  state_eq:
435
430
  label: 狀態
@@ -808,12 +803,6 @@ zh-TW:
808
803
  layout_appearance_title: 編輯版面外觀
809
804
  preview: 預覽
810
805
  omnipresent_banner_appearance_title: 編輯無處不在的橫幅
811
- organization_external_domain_whitelist:
812
- edit:
813
- update: 更新
814
- form:
815
- add: 新增到白名單
816
- title: 外部域名白名單
817
806
  participatory_space_private_users:
818
807
  create:
819
808
  error: 在此參與空間中添加私人參與者時出現問題。
data/config/routes.rb CHANGED
@@ -7,7 +7,7 @@ Decidim::Admin::Engine.routes.draw do
7
7
  resource :homepage, only: [:edit, :update], controller: "organization_homepage" do
8
8
  resources :content_blocks, only: [:edit, :update, :destroy, :create], controller: "organization_homepage_content_blocks"
9
9
  end
10
- resource :external_domain_whitelist, only: [:edit, :update], controller: "organization_external_domain_whitelist"
10
+ resource :external_domain_allowlist, only: [:edit, :update], controller: "organization_external_domain_allowlist"
11
11
 
12
12
  member do
13
13
  get :users
@@ -84,7 +84,7 @@ Decidim::Admin::Engine.routes.draw do
84
84
 
85
85
  resources :newsletters, except: [:new, :create] do
86
86
  member do
87
- post :recipients_count
87
+ get :recipients_count
88
88
  post :send_to_user
89
89
  get :preview
90
90
  get :select_recipients_to_deliver
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.version = Decidim::Admin.version
11
11
  s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
12
12
  s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
13
- s.license = "AGPL-3.0-or-later"
13
+ s.license = "AGPL-3.0"
14
14
  s.homepage = "https://decidim.org"
15
15
  s.metadata = {
16
16
  "bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  "homepage_uri" => "https://decidim.org",
20
20
  "source_code_uri" => "https://github.com/decidim/decidim"
21
21
  }
22
- s.required_ruby_version = "~> 3.1.0"
22
+ s.required_ruby_version = "~> 3.2.0"
23
23
 
24
24
  s.name = "decidim-admin"
25
25
  s.summary = "Decidim organization administration"
@@ -26,7 +26,6 @@ module Decidim
26
26
  end
27
27
 
28
28
  initializer "decidim_admin.register_icons" do |_app|
29
- Decidim.icons.register(name: "lock-2-line", icon: "lock-2-line", category: "system", description: "Block user icon", engine: :admin)
30
29
  Decidim.icons.register(name: "layout-masonry-line", icon: "layout-masonry-line", category: "system", description: "", engine: :admin)
31
30
  Decidim.icons.register(name: "service-line", icon: "service-line", category: "system", description: "", engine: :admin)
32
31
  Decidim.icons.register(name: "fullscreen-line", icon: "fullscreen-line", category: "system", description: "", engine: :admin)
@@ -12,7 +12,7 @@ module Decidim
12
12
  # own creator or this default will be used.
13
13
  class Creator
14
14
  class << self
15
- # Retuns the resource class to be created with the provided data.
15
+ # Returns the resource class to be created with the provided data.
16
16
  def resource_klass
17
17
  raise NotImplementedError, "#{self.class.name} does not define resource class"
18
18
  end
@@ -5,11 +5,11 @@ module Decidim
5
5
  module Import
6
6
  # A factory class providing easier way to create new importers.
7
7
  class ImporterFactory
8
- def self.build(file, mime_type, **keyword_args)
8
+ def self.build(file, mime_type, **)
9
9
  reader = Readers.search_by_mime_type(mime_type)
10
10
  raise NotImplementedError, "No reader implemented for mime type: #{mime_type}" if reader.nil?
11
11
 
12
- Importer.new(file:, reader:, **keyword_args)
12
+ Importer.new(file:, reader:, **)
13
13
  end
14
14
  end
15
15
  end
@@ -192,9 +192,9 @@ module Decidim
192
192
  position: 1.6,
193
193
  if: allowed_to?(:update, :help_sections)
194
194
 
195
- menu.add_item :external_domain_whitelist,
196
- I18n.t("menu.external_domain_whitelist", scope: "decidim.admin"),
197
- decidim_admin.edit_organization_external_domain_whitelist_path,
195
+ menu.add_item :external_domain_allowlist,
196
+ I18n.t("menu.external_domain_allowlist", scope: "decidim.admin"),
197
+ decidim_admin.edit_organization_external_domain_allowlist_path,
198
198
  icon_name: "computer-line",
199
199
  position: 1.7,
200
200
  if: allowed_to?(:update, :organization, organization: current_organization)
@@ -270,7 +270,7 @@ module Decidim
270
270
  decidim/admin/scope_types
271
271
  decidim/admin/areas decidim/admin/area_types
272
272
  decidim/admin/help_sections
273
- decidim/admin/organization_external_domain_whitelist
273
+ decidim/admin/organization_external_domain_allowlist
274
274
  ),
275
275
  []
276
276
  ],
@@ -25,10 +25,11 @@ module Decidim
25
25
  form_params,
26
26
  collection_for:
27
27
  ).with_context(
28
- current_organization: organization
28
+ current_organization: organization,
29
+ current_user: user
29
30
  )
30
31
  end
31
- let(:command) { described_class.new(form, collection_for, user) }
32
+ let(:command) { described_class.new(form, collection_for) }
32
33
 
33
34
  describe "when the form is not valid" do
34
35
  before do
@@ -22,10 +22,12 @@ module Decidim
22
22
  form_params,
23
23
  current_participatory_space: participatory_space
24
24
  ).with_context(
25
- current_organization: organization
25
+ current_organization: organization,
26
+ current_participatory_space: participatory_space,
27
+ current_user: user
26
28
  )
27
29
  end
28
- let(:command) { described_class.new(form, participatory_space, user) }
30
+ let(:command) { described_class.new(form) }
29
31
 
30
32
  describe "when the form is not valid" do
31
33
  before do
@@ -26,10 +26,11 @@ module Decidim
26
26
  form_params,
27
27
  collection_for:
28
28
  ).with_context(
29
- current_organization: organization
29
+ current_organization: organization,
30
+ current_user: user
30
31
  )
31
32
  end
32
- let(:command) { described_class.new(attachment_collection, form, user) }
33
+ let(:command) { described_class.new(attachment_collection, form) }
33
34
 
34
35
  describe "when the form is not valid" do
35
36
  before do
@@ -23,10 +23,11 @@ module Decidim
23
23
  form_params,
24
24
  current_participatory_space: participatory_space
25
25
  ).with_context(
26
- current_organization: organization
26
+ current_organization: organization,
27
+ current_user: user
27
28
  )
28
29
  end
29
- let(:command) { described_class.new(category, form, user) }
30
+ let(:command) { described_class.new(form, category) }
30
31
 
31
32
  describe "when the form is not valid" do
32
33
  before do
@@ -11,13 +11,15 @@ shared_context "with filterable context" do
11
11
  within(".filters__section") do
12
12
  find_link("Filter").hover
13
13
  find_link(options).hover
14
- click_link(filter, href: /q/)
14
+ within ".submenu > .is-active > .submenu" do
15
+ click_on(filter)
16
+ end
15
17
  end
16
18
  end
17
19
 
18
20
  def remove_applied_filter(filter)
19
21
  within("[data-applied-filters-tags] .label", text: /#{filter}/i) do
20
- click_link("Cancel")
22
+ click_on("Cancel")
21
23
  end
22
24
  end
23
25
 
@@ -50,7 +52,7 @@ shared_context "with filterable context" do
50
52
  before { apply_filter(options, filter) }
51
53
 
52
54
  it { expect(page).to have_content(in_filter) }
53
- it { expect(page).not_to have_content(not_in_filter) }
55
+ it { expect(page).to have_no_content(not_in_filter) }
54
56
 
55
57
  it_behaves_like "searching by text" do
56
58
  let(:text) { in_filter }
@@ -14,7 +14,7 @@ shared_examples "sortable participatory space user roles" do
14
14
  let(:sort_by) { "name asc" }
15
15
 
16
16
  it "displays the result" do
17
- expect(page).not_to have_content(user.name)
17
+ expect(page).to have_no_content(user.name)
18
18
  end
19
19
  end
20
20
  end
@@ -32,7 +32,7 @@ shared_examples "sortable participatory space user roles" do
32
32
  let(:sort_by) { "email asc" }
33
33
 
34
34
  it "displays the result" do
35
- expect(page).not_to have_content(user.name)
35
+ expect(page).to have_no_content(user.name)
36
36
  end
37
37
  end
38
38
  end
@@ -50,7 +50,7 @@ shared_examples "sortable participatory space user roles" do
50
50
  let(:sort_by) { "last_sign_in_at asc" }
51
51
 
52
52
  it "displays the result" do
53
- expect(page).not_to have_content(user.name)
53
+ expect(page).to have_no_content(user.name)
54
54
  end
55
55
  end
56
56
  end
@@ -68,7 +68,7 @@ shared_examples "sortable participatory space user roles" do
68
68
  let(:sort_by) { "invitation_accepted_at asc" }
69
69
 
70
70
  it "displays the result" do
71
- expect(page).not_to have_content(user.name)
71
+ expect(page).to have_no_content(user.name)
72
72
  end
73
73
  end
74
74
  end
@@ -86,7 +86,7 @@ shared_examples "sortable participatory space user roles" do
86
86
  let(:sort_by) { "role asc" }
87
87
 
88
88
  it "displays the result" do
89
- expect(page).not_to have_content(user.name)
89
+ expect(page).to have_no_content(user.name)
90
90
  end
91
91
  end
92
92
  end
@@ -17,7 +17,7 @@ shared_examples "inviting participatory space admins" do |check_private_space: t
17
17
  expect(page).to have_content("Categories")
18
18
  expect(page).to have_content("Attachments")
19
19
  expect(page).to have_content(space_admins_label)
20
- expect(page).not_to have_content("Private participants") if participatory_space.respond_to?(:private_space)
20
+ expect(page).to have_no_content("Private participants") if participatory_space.respond_to?(:private_space)
21
21
  expect(page).to have_content("Moderations")
22
22
  end
23
23
  end
@@ -18,7 +18,6 @@ shared_context "when inviting participatory space users" do
18
18
  fill_in "Email", with: email
19
19
  select role, from: "Role"
20
20
  click_on "Create"
21
- expect(page).to have_content("successfully added")
22
21
  logout :user
23
22
  end
24
23
 
@@ -16,16 +16,16 @@ shared_examples "manage attachment collections examples" do
16
16
 
17
17
  it "can view an attachment collection details" do
18
18
  within "#attachment_collections table" do
19
- click_link "Edit"
19
+ click_on "Edit"
20
20
  end
21
21
 
22
- expect(page).to have_selector("input#attachment_collection_name_en[value='#{translated(attachment_collection.name, locale: :en)}']")
23
- expect(page).to have_selector("input#attachment_collection_weight[value='#{attachment_collection.weight}']")
24
- expect(page).to have_selector("input#attachment_collection_description_en[value='#{translated(attachment_collection.description, locale: :en)}']")
22
+ expect(page).to have_css("input#attachment_collection_name_en[value='#{translated(attachment_collection.name, locale: :en)}']")
23
+ expect(page).to have_css("input#attachment_collection_weight[value='#{attachment_collection.weight}']")
24
+ expect(page).to have_css("input#attachment_collection_description_en[value='#{translated(attachment_collection.description, locale: :en)}']")
25
25
  end
26
26
 
27
27
  it "can add attachment collections to a process" do
28
- click_link "New attachment folder"
28
+ click_on "New attachment folder"
29
29
 
30
30
  within ".new_attachment_collection" do
31
31
  fill_in_i18n(
@@ -55,8 +55,8 @@ shared_examples "manage attachment collections examples" do
55
55
 
56
56
  it "can update an attachment collection" do
57
57
  within "#attachment_collections" do
58
- within find("tr", text: translated(attachment_collection.name)) do
59
- click_link "Edit"
58
+ within "tr", text: translated(attachment_collection.name) do
59
+ click_on "Edit"
60
60
  end
61
61
  end
62
62
 
@@ -89,14 +89,14 @@ shared_examples "manage attachment collections examples" do
89
89
  end
90
90
 
91
91
  it "can delete the attachment collection" do
92
- within find("tr", text: translated(attachment_collection2.name)) do
93
- accept_confirm { click_link "Delete" }
92
+ within "tr", text: translated(attachment_collection2.name) do
93
+ accept_confirm { click_on "Delete" }
94
94
  end
95
95
 
96
96
  expect(page).to have_admin_callout("successfully")
97
97
 
98
98
  within "#attachment_collections table" do
99
- expect(page).not_to have_content(translated(attachment_collection2.name))
99
+ expect(page).to have_no_content(translated(attachment_collection2.name))
100
100
  end
101
101
  end
102
102
  end
@@ -109,8 +109,8 @@ shared_examples "manage attachment collections examples" do
109
109
  end
110
110
 
111
111
  it "cannot delete it" do
112
- within find("tr", text: translated(attachment_collection.name)) do
113
- expect(page).not_to have_selector("a.action-icon--remove")
112
+ within "tr", text: translated(attachment_collection.name) do
113
+ expect(page).to have_no_css("a.action-icon--remove")
114
114
  end
115
115
  end
116
116
  end
@@ -19,30 +19,18 @@ shared_examples "manage attachments examples" do
19
19
 
20
20
  it "can view an attachment details" do
21
21
  within "#attachments table" do
22
- click_link "Edit"
22
+ click_on "Edit"
23
23
  end
24
24
 
25
- expect(page).to have_selector("input#attachment_title_en[value='#{translated(attachment.title, locale: :en)}']")
26
- expect(page).to have_selector("input#attachment_description_en[value='#{translated(attachment.description, locale: :en)}']")
27
- expect(page).to have_selector("input#attachment_weight[value='#{attachment.weight}']")
25
+ expect(page).to have_css("input#attachment_title_en[value='#{translated(attachment.title, locale: :en)}']")
26
+ expect(page).to have_css("input#attachment_description_en[value='#{translated(attachment.description, locale: :en)}']")
27
+ expect(page).to have_css("input#attachment_weight[value='#{attachment.weight}']")
28
28
  expect(page).to have_select("attachment_attachment_collection_id", selected: translated(attachment_collection.name, locale: :en))
29
-
30
- # The image's URL changes every time it is requested because the disk
31
- # service generates a unique URL based on the expiry time of the link.
32
- # This expiry time is calculated at the time when the URL is requested
33
- # which is why it changes every time to different URL. This changes the
34
- # JSON encoded file identifier which includes the expiry time as well as
35
- # the digest of the URL because the digest is calculated based on the
36
- # passed data.
37
- filename = attachment.file.blob.filename
38
- within %([data-active-uploads] [data-filename="#{filename}"]) do
39
- src = page.find("img")["src"]
40
- expect(src).to be_blob_url(attachment.file.blob)
41
- end
29
+ expect(page).to have_css("img[src~='#{attachment.url}']")
42
30
  end
43
31
 
44
32
  it "can add attachments without a collection to a process" do
45
- click_link "New attachment"
33
+ click_on "New attachment"
46
34
 
47
35
  within ".new_attachment" do
48
36
  fill_in_i18n(
@@ -75,8 +63,44 @@ shared_examples "manage attachments examples" do
75
63
  end
76
64
  end
77
65
 
66
+ it "can add attachments with a link to a process" do
67
+ click_on "New attachment"
68
+
69
+ within ".new_attachment" do
70
+ fill_in_i18n(
71
+ :attachment_title,
72
+ "#attachment-title-tabs",
73
+ en: "Very Important Document",
74
+ es: "Documento Muy Importante",
75
+ ca: "Document Molt Important"
76
+ )
77
+
78
+ fill_in_i18n(
79
+ :attachment_description,
80
+ "#attachment-description-tabs",
81
+ en: "This document contains important information",
82
+ es: "Este documento contiene información importante",
83
+ ca: "Aquest document conté informació important"
84
+ )
85
+ end
86
+
87
+ within ".new_attachment" do
88
+ find_by_id("trigger-link").click
89
+
90
+ fill_in "attachment[link]", with: "https://example.com/docs.pdf"
91
+
92
+ find("*[type=submit]").click
93
+ end
94
+
95
+ expect(page).to have_admin_callout("successfully")
96
+
97
+ within "#attachments table" do
98
+ expect(page).to have_text("Very Important Document")
99
+ end
100
+ end
101
+
78
102
  it "can add attachments within a collection to a process" do
79
- click_link "New attachment"
103
+ click_on "New attachment"
80
104
 
81
105
  within ".new_attachment" do
82
106
  fill_in_i18n(
@@ -114,9 +138,9 @@ shared_examples "manage attachments examples" do
114
138
 
115
139
  it "can remove an attachment from a collection" do
116
140
  within "#attachments" do
117
- within find("tr", text: translated(attachment.title)) do
141
+ within "tr", text: translated(attachment.title) do
118
142
  expect(page).to have_text(translated(attachment_collection.name, locale: :en))
119
- click_link "Edit"
143
+ click_on "Edit"
120
144
  end
121
145
  end
122
146
 
@@ -127,26 +151,26 @@ shared_examples "manage attachments examples" do
127
151
  end
128
152
 
129
153
  within "#attachments" do
130
- within find("tr", text: translated(attachment.title)) do
131
- expect(page).not_to have_text(translated(attachment_collection.name, locale: :en))
154
+ within "tr", text: translated(attachment.title) do
155
+ expect(page).to have_no_text(translated(attachment_collection.name, locale: :en))
132
156
  end
133
157
  end
134
158
  end
135
159
 
136
160
  it "can delete an attachment from a process" do
137
- within find("tr", text: translated(attachment.title)) do
138
- accept_confirm { click_link "Delete" }
161
+ within "tr", text: translated(attachment.title) do
162
+ accept_confirm { click_on "Delete" }
139
163
  end
140
164
 
141
165
  expect(page).to have_admin_callout("successfully")
142
166
 
143
- expect(page).not_to have_content(translated(attachment.title, locale: :en))
167
+ expect(page).to have_no_content(translated(attachment.title, locale: :en))
144
168
  end
145
169
 
146
170
  it "can update an attachment" do
147
171
  within "#attachments" do
148
- within find("tr", text: translated(attachment.title)) do
149
- click_link "Edit"
172
+ within "tr", text: translated(attachment.title) do
173
+ click_on "Edit"
150
174
  end
151
175
  end
152
176
 
@@ -10,17 +10,17 @@ shared_examples "manage categories examples" do
10
10
 
11
11
  it "can view a category detail" do
12
12
  within "#categories table" do
13
- click_link translated(category.name, locale: :en)
13
+ click_on translated(category.name, locale: :en)
14
14
  end
15
15
 
16
- expect(page).to have_selector("input#category_name_en[value='#{translated(category.name, locale: :en)}']")
17
- expect(page).to have_selector("input#category_weight[value='#{category.weight}']")
16
+ expect(page).to have_css("input#category_name_en[value='#{translated(category.name, locale: :en)}']")
17
+ expect(page).to have_css("input#category_weight[value='#{category.weight}']")
18
18
 
19
19
  expect(page).to have_select(id: "category_parent_id")
20
20
  end
21
21
 
22
22
  it "creates a new category" do
23
- click_link "New category"
23
+ click_on "New category"
24
24
 
25
25
  within ".new_category" do
26
26
  fill_in_i18n(
@@ -44,8 +44,8 @@ shared_examples "manage categories examples" do
44
44
 
45
45
  it "updates a category" do
46
46
  within "#categories" do
47
- within find("tr", text: translated(category.name)) do
48
- click_link "Edit"
47
+ within "tr", text: translated(category.name) do
48
+ click_on "Edit"
49
49
  end
50
50
  end
51
51
 
@@ -79,14 +79,14 @@ shared_examples "manage categories examples" do
79
79
  end
80
80
 
81
81
  it "deletes a category" do
82
- within find("tr", text: translated(category2.name)) do
83
- accept_confirm { click_link "Delete" }
82
+ within "tr", text: translated(category2.name) do
83
+ accept_confirm { click_on "Delete" }
84
84
  end
85
85
 
86
86
  expect(page).to have_admin_callout("successfully")
87
87
 
88
88
  within "#categories table" do
89
- expect(page).not_to have_content(translated(category2.name))
89
+ expect(page).to have_no_content(translated(category2.name))
90
90
  end
91
91
  end
92
92
  end
@@ -99,8 +99,8 @@ shared_examples "manage categories examples" do
99
99
  end
100
100
 
101
101
  it "deletes a category" do
102
- within find("tr", text: translated(category2.name)) do
103
- accept_confirm { click_link "Delete" }
102
+ within "tr", text: translated(category2.name) do
103
+ accept_confirm { click_on "Delete" }
104
104
  end
105
105
 
106
106
  expect(page).to have_admin_callout("problem deleting")
@@ -119,8 +119,8 @@ shared_examples "manage categories examples" do
119
119
  it "cannot delete it" do
120
120
  visit current_path
121
121
 
122
- within find("tr", text: translated(category.name)) do
123
- expect(page).not_to have_selector("a.action-icon--remove")
122
+ within "tr", text: translated(category.name) do
123
+ expect(page).to have_no_css("a.action-icon--remove")
124
124
  end
125
125
  end
126
126
  end