decidim-admin 0.27.4 → 0.27.5

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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb +36 -0
  3. data/app/controllers/concerns/decidim/moderations/admin/filterable.rb +4 -0
  4. data/app/forms/decidim/admin/organization_form.rb +2 -2
  5. data/app/packs/stylesheets/decidim/admin/_variables.scss +1 -1
  6. data/app/views/decidim/admin/components/_actions.html.erb +43 -0
  7. data/app/views/decidim/admin/components/_component.html.erb +3 -41
  8. data/config/environment.rb +2 -0
  9. data/config/locales/ar.yml +8 -13
  10. data/config/locales/bg.yml +0 -1
  11. data/config/locales/ca.yml +9 -9
  12. data/config/locales/cs.yml +6 -6
  13. data/config/locales/de.yml +26 -26
  14. data/config/locales/el.yml +1 -12
  15. data/config/locales/en.yml +2 -2
  16. data/config/locales/es-MX.yml +9 -9
  17. data/config/locales/es-PY.yml +9 -9
  18. data/config/locales/es.yml +9 -9
  19. data/config/locales/eu.yml +309 -282
  20. data/config/locales/fi-plain.yml +5 -5
  21. data/config/locales/fi.yml +5 -5
  22. data/config/locales/fr-CA.yml +9 -9
  23. data/config/locales/fr.yml +11 -11
  24. data/config/locales/ga-IE.yml +0 -1
  25. data/config/locales/gl.yml +2 -13
  26. data/config/locales/hu.yml +1 -12
  27. data/config/locales/id-ID.yml +3 -8
  28. data/config/locales/is-IS.yml +1 -3
  29. data/config/locales/it.yml +0 -11
  30. data/config/locales/ja.yml +9 -9
  31. data/config/locales/kaa.yml +15 -1
  32. data/config/locales/lb.yml +2 -13
  33. data/config/locales/lt.yml +31 -13
  34. data/config/locales/lv.yml +0 -10
  35. data/config/locales/nl.yml +2 -13
  36. data/config/locales/no.yml +0 -11
  37. data/config/locales/pl.yml +31 -6
  38. data/config/locales/pt-BR.yml +20 -13
  39. data/config/locales/pt.yml +3 -14
  40. data/config/locales/ro-RO.yml +2 -13
  41. data/config/locales/ru.yml +3 -9
  42. data/config/locales/sk.yml +0 -11
  43. data/config/locales/sl.yml +0 -1
  44. data/config/locales/sq-AL.yml +66 -0
  45. data/config/locales/sr-CS.yml +10 -6
  46. data/config/locales/sv.yml +1 -11
  47. data/config/locales/th-TH.yml +1 -0
  48. data/config/locales/tr-TR.yml +5 -14
  49. data/config/locales/uk.yml +1 -9
  50. data/config/locales/zh-CN.yml +0 -11
  51. data/config/locales/zh-TW.yml +0 -11
  52. data/config/routes.rb +2 -0
  53. data/lib/decidim/admin/test/admin_participatory_space_access_examples.rb +49 -0
  54. data/lib/decidim/admin/version.rb +1 -1
  55. metadata +19 -10
  56. data/app/controllers/decidim/admin/space_publications_controller.rb +0 -63
@@ -56,7 +56,6 @@ uk:
56
56
  omnipresent_banner_url: Веб-адреса
57
57
  reference_prefix: Довідковий префікс
58
58
  tos_version: Версія умов участі
59
- twitter_handler: Адреса Twitter
60
59
  youtube_handler: Адреса YouTube
61
60
  scope:
62
61
  code: Код
@@ -433,7 +432,6 @@ uk:
433
432
  github: ГітХаб
434
433
  instagram: Інстаграм
435
434
  social_handlers: Соціальні мережі
436
- twitter: Твіттер
437
435
  youtube: ЮТуб
438
436
  update:
439
437
  error: При спробі оновити цю організацію сталася помилка.
@@ -444,17 +442,12 @@ uk:
444
442
  form:
445
443
  colors:
446
444
  header_snippets_help: Використовуйте це поле, щоб додавати щось до заголовку HTML. Найпоширенішим використанням є інтеграція сторонніх служб, які потребують додаткового JavaScript або CSS. Також ви можете використовувати його для додавання додаткових метатегів до HTML. Зверніть увагу, що це буде показано лише на загальнодоступних сторінках, а не в розділі адміністратора.
447
- cta_button_path_help: 'Ви можете змінити те, куди веде натискання кнопки "Закликати до дії" на головній сторінці. Використовуйте тут часткові шляхи, а не повні веб-адреси. Прийнятні літери, цифри, дефіс та скісна риска. Першою має бути літера. Кнопка "Закликати до дії" відображається на головній сторінці між привітальним текстом та описом. Приклад: %{url}'
448
445
  cta_button_text_help: Ви можете змінити текст кнопки "Закликати до дії" на головній сторінці для кожної доступної мови вашої організації. Якщо ви не задасте цей текст, буде використане значення за замовчуванням. Кнопка "Закликати до дії" відображається на домашній сторінці між привітальним текстом та описом.
449
446
  homepage_appearance_title: Редагувати вигляд головної сторінки
450
447
  homepage_highlighted_content_banner_title: Банер висвітленого вмісту
451
448
  images:
452
449
  layout_appearance_title: Редагувати зовнішній вигляд шаблону
453
450
  omnipresent_banner_appearance_title: Редагувати всюдисущий банер
454
- organization_homepage:
455
- edit:
456
- active_content_blocks: Блоки діючого вмісту
457
- inactive_content_blocks: Блоки недіючого вмісту
458
451
  organization_homepage_content_blocks:
459
452
  edit:
460
453
  update: Оновити
@@ -561,6 +554,7 @@ uk:
561
554
  users_statistics:
562
555
  users_count:
563
556
  admins: Адміністратори
557
+ view_public_page: Переглянути загальнодоступну сторінку
564
558
  moderations:
565
559
  actions:
566
560
  hidden: Приховано
@@ -594,5 +588,3 @@ uk:
594
588
  title: Розсилання новин
595
589
  settings:
596
590
  title: Налаштування
597
- users:
598
- title: Учасники
@@ -72,7 +72,6 @@ zh-CN:
72
72
  success_color: 成功
73
73
  time_zone: 时区
74
74
  tos_version: 服务条款版本
75
- twitter_handler: Twitter handler
76
75
  user_groups_enabled: 启用组
77
76
  warning_color: 警告
78
77
  welcome_notification_body: 欢迎通知机构
@@ -512,9 +511,6 @@ zh-CN:
512
511
  select_scopes: 筛选已激活其账户中任何选定范围的用户。
513
512
  select_spaces: 选择要断开通讯的空格
514
513
  select_users: 选择您想要发送消息的用户
515
- send_to_all_users: 发送给所有用户
516
- send_to_followers: 发送给关注者
517
- send_to_participants: 发送给参与者
518
514
  title: 选择要交付的收件人
519
515
  warning: "<strong>注意:</strong> 这份通讯将只发送给已激活 <em>我想在其通知设置中接收新闻简讯</em>。"
520
516
  send:
@@ -564,7 +560,6 @@ zh-CN:
564
560
  instagram: Instagram
565
561
  rich_text_editor_in_public_views_help: 在某些文本领域,参与者将能够通过使用丰富的文本编辑器插入一些HTML标签。
566
562
  social_handlers: 社交活动
567
- twitter: 推特
568
563
  youtube: YouTube
569
564
  update:
570
565
  error: 更新这个组织时出现问题。
@@ -576,7 +571,6 @@ zh-CN:
576
571
  colors:
577
572
  colors_title: 组织颜色
578
573
  header_snippets_help: 使用此字段将物品添加到HTML头部。 最常见的用途是集成第三方服务,需要额外的 JavaScript 或 CSS 另外,您可以使用它添加额外的元标签到 HTML。 请注意,这只会在公开页面中提供,而不会在管理部分提供。
579
- cta_button_path_help: '您可以覆盖主页链接中的通话动作按钮的位置。请使用部分路径,而不是这里的完整URL。 接受字母、 数字、 破折号和斜线,并且必须以字母开头。 “调用动作”按钮在主页的欢迎文本和描述之间显示。例如: %{url}'
580
574
  cta_button_text_help: 您可以在主页中为您的组织中的每种可用语言覆盖“通话动作”按钮文本。 如果未设置,将使用默认值。 “通话动作”按钮显示在欢迎文本和描述之间的主页。
581
575
  homepage_appearance_title: 编辑主页外观
582
576
  homepage_highlighted_content_banner_title: 高亮的内容素材
@@ -584,10 +578,6 @@ zh-CN:
584
578
  layout_appearance_title: 编辑布局外观
585
579
  preview: 预览
586
580
  omnipresent_banner_appearance_title: Edit omnipresent banner
587
- organization_homepage:
588
- edit:
589
- active_content_blocks: 活动内容块
590
- inactive_content_blocks: 非活动内容块
591
581
  organization_homepage_content_blocks:
592
582
  edit:
593
583
  update: 更新
@@ -698,7 +688,6 @@ zh-CN:
698
688
  update: 更新
699
689
  form:
700
690
  none: 无
701
- slug_help: '在这里使用部分路径,不是完整的 URL。接受字母、数字、破折号和斜线,并且必须以字母开头。例如: %{url}'
702
691
  index:
703
692
  last_notable_change: 上一次值得注意的变化
704
693
  new:
@@ -93,7 +93,6 @@ zh-TW:
93
93
  success_color: 成功
94
94
  time_zone: 時區
95
95
  tos_version: 服務條款版本
96
- twitter_handler: Twitter 處理器
97
96
  user_groups_enabled: 啟用群組功能
98
97
  users_registration_mode: 使用者註冊模式
99
98
  warning_color: 警告
@@ -732,9 +731,6 @@ zh-TW:
732
731
  select_scopes: 篩選條件為在其帳戶的「我的興趣」設置中啟用任何選定範圍的使用者。
733
732
  select_spaces: 選擇要將通訊進行分割的空間
734
733
  select_users: 選擇您想要發送通訊的使用者
735
- send_to_all_users: 傳送給所有使用者
736
- send_to_followers: 傳送給追蹤者
737
- send_to_participants: 傳送給參與者
738
734
  title: 選擇要傳送的收件人
739
735
  warning: "<strong>注意:</strong>此通訊將僅傳送給已在其通知設定中啟用<em>我想收到通訊</em>的使用者。"
740
736
  send:
@@ -795,7 +791,6 @@ zh-TW:
795
791
  instagram: Instagram
796
792
  rich_text_editor_in_public_views_help: 在某些文字區域中,參與者可以使用所提供的富文本編輯器插入一些 HTML 標籤。
797
793
  social_handlers: 社群
798
- twitter: Twitter
799
794
  url: 網址
800
795
  youtube: YouTube
801
796
  update:
@@ -809,7 +804,6 @@ zh-TW:
809
804
  colors_title: 組織顏色
810
805
  colors_warning_html: 警告!更改這些顏色可能會破壞可達性對比度。您可以使用<a href="%{link}">WebAIM對比度檢查器</a>或其他類似工具檢查您選擇的對比度。
811
806
  header_snippets_help: 使用此字段將內容添加到HTML的head部分。最常見的用途是整合需要額外JavaScript或CSS的第三方服務。此外,您還可以使用它來添加額外的HTML meta標籤。請注意,此內容僅在公開頁面中呈現,而不在管理部分中呈現。
812
- cta_button_path_help: '您可以覆蓋主頁上的"呼籲行動"按鈕的鏈接目標。在此處使用部分路徑,而不是完整的URL。它接受字母、數字、破折號和斜杠,並且必須以字母開頭。"呼籲行動"按鈕顯示在主頁的歡迎文本和描述之間。範例: %{url}'
813
807
  cta_button_text_help: 您可以覆蓋主頁上每種語言對應的"呼籲行動"按鈕文本。如果未設置,將使用默認值。"呼籲行動"按鈕顯示在主頁的歡迎文本和描述之間。
814
808
  homepage_appearance_title: 編輯主頁外觀
815
809
  homepage_highlighted_content_banner_title: 重點顯示的內容橫幅
@@ -828,10 +822,6 @@ zh-TW:
828
822
  form:
829
823
  add: 新增到白名單
830
824
  title: 外部域名白名單
831
- organization_homepage:
832
- edit:
833
- active_content_blocks: 啟用的內容區塊
834
- inactive_content_blocks: 停用的內容區塊
835
825
  organization_homepage_content_blocks:
836
826
  edit:
837
827
  update: 更新
@@ -957,7 +947,6 @@ zh-TW:
957
947
  update: 更新
958
948
  form:
959
949
  none: 無
960
- slug_help: '在此處使用部分路徑,而不是完整的URL。只接受字母、數字、破折號和斜線,且必須以字母開頭。例如: %{url}'
961
950
  index:
962
951
  last_notable_change: 最後重要更改
963
952
  new:
data/config/routes.rb CHANGED
@@ -36,6 +36,8 @@ Decidim::Admin::Engine.routes.draw do
36
36
  mount manifest.admin_engine, at: "/#{manifest.name}", as: "decidim_admin_#{manifest.name}"
37
37
  end
38
38
 
39
+ mount Decidim::Templates::AdminEngine, at: "/templates", as: "decidim_admin_templates" if Decidim.module_installed?(:templates)
40
+
39
41
  resources :users, except: [:edit, :update], controller: "users" do
40
42
  member do
41
43
  post :resend_invitation, to: "users#resend_invitation"
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ shared_examples "accessing the participatory space" do
4
+ it "shows the page" do
5
+ expect(page).to have_content("View public page")
6
+ expect(page).to have_content("My space")
7
+ end
8
+ end
9
+
10
+ shared_examples "showing the unauthorized error message" do
11
+ it "redirects to the relevant unauthorized page" do
12
+ expect(page).to have_content("You are not authorized to perform this action")
13
+ expect(page).to have_current_path("/admin/")
14
+ end
15
+ end
16
+
17
+ shared_examples "admin participatory space access" do
18
+ before do
19
+ switch_to_host(organization.host)
20
+ login_as user, scope: :user
21
+ end
22
+
23
+ context "when the user is a normal user" do
24
+ let(:user) { create(:user, :confirmed, organization: organization) }
25
+ let(:unauthorized_path) { "/" }
26
+
27
+ it_behaves_like "a 404 page"
28
+ end
29
+
30
+ context "when the user has the role" do
31
+ let(:user) { role }
32
+
33
+ context "and has permission" do
34
+ before do
35
+ visit target_path
36
+ end
37
+
38
+ it_behaves_like "accessing the participatory space"
39
+ end
40
+
41
+ context "and does not have permission" do
42
+ before do
43
+ visit unauthorized_target_path
44
+ end
45
+
46
+ it_behaves_like "showing the unauthorized error message"
47
+ end
48
+ end
49
+ end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-admin version.
5
5
  module Admin
6
6
  def self.version
7
- "0.27.4"
7
+ "0.27.5"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.4
4
+ version: 0.27.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-07-27 00:00:00.000000000 Z
13
+ date: 2023-12-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_link_to
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.27.4
35
+ version: 0.27.5
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.27.4
42
+ version: 0.27.5
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: devise
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -75,6 +75,9 @@ dependencies:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
77
  version: '2.0'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 2.0.9
78
81
  type: :runtime
79
82
  prerelease: false
80
83
  version_requirements: !ruby/object:Gem::Requirement
@@ -82,34 +85,37 @@ dependencies:
82
85
  - - "~>"
83
86
  - !ruby/object:Gem::Version
84
87
  version: '2.0'
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 2.0.9
85
91
  - !ruby/object:Gem::Dependency
86
92
  name: decidim-dev
87
93
  requirement: !ruby/object:Gem::Requirement
88
94
  requirements:
89
95
  - - '='
90
96
  - !ruby/object:Gem::Version
91
- version: 0.27.4
97
+ version: 0.27.5
92
98
  type: :development
93
99
  prerelease: false
94
100
  version_requirements: !ruby/object:Gem::Requirement
95
101
  requirements:
96
102
  - - '='
97
103
  - !ruby/object:Gem::Version
98
- version: 0.27.4
104
+ version: 0.27.5
99
105
  - !ruby/object:Gem::Dependency
100
106
  name: decidim-participatory_processes
101
107
  requirement: !ruby/object:Gem::Requirement
102
108
  requirements:
103
109
  - - '='
104
110
  - !ruby/object:Gem::Version
105
- version: 0.27.4
111
+ version: 0.27.5
106
112
  type: :development
107
113
  prerelease: false
108
114
  version_requirements: !ruby/object:Gem::Requirement
109
115
  requirements:
110
116
  - - '='
111
117
  - !ruby/object:Gem::Version
112
- version: 0.27.4
118
+ version: 0.27.5
113
119
  description: Organization administration to manage a single organization.
114
120
  email:
115
121
  - josepjaume@gmail.com
@@ -251,7 +257,6 @@ files:
251
257
  - app/controllers/decidim/admin/scope_types_controller.rb
252
258
  - app/controllers/decidim/admin/scopes_controller.rb
253
259
  - app/controllers/decidim/admin/share_tokens_controller.rb
254
- - app/controllers/decidim/admin/space_publications_controller.rb
255
260
  - app/controllers/decidim/admin/static_page_topics_controller.rb
256
261
  - app/controllers/decidim/admin/static_pages_controller.rb
257
262
  - app/controllers/decidim/admin/user_groups_controller.rb
@@ -472,6 +477,7 @@ files:
472
477
  - app/views/decidim/admin/categories/index.html.erb
473
478
  - app/views/decidim/admin/categories/new.html.erb
474
479
  - app/views/decidim/admin/categories/show.html.erb
480
+ - app/views/decidim/admin/components/_actions.html.erb
475
481
  - app/views/decidim/admin/components/_component.html.erb
476
482
  - app/views/decidim/admin/components/_form.html.erb
477
483
  - app/views/decidim/admin/components/_settings_fields.html.erb
@@ -650,9 +656,11 @@ files:
650
656
  - config/locales/sk.yml
651
657
  - config/locales/sl.yml
652
658
  - config/locales/so-SO.yml
659
+ - config/locales/sq-AL.yml
653
660
  - config/locales/sr-CS.yml
654
661
  - config/locales/sv.yml
655
662
  - config/locales/sw-KE.yml
663
+ - config/locales/th-TH.yml
656
664
  - config/locales/ti-ER.yml
657
665
  - config/locales/tr-TR.yml
658
666
  - config/locales/uk.yml
@@ -682,6 +690,7 @@ files:
682
690
  - lib/decidim/admin/import/readers/xlsx.rb
683
691
  - lib/decidim/admin/import/verifier.rb
684
692
  - lib/decidim/admin/test.rb
693
+ - lib/decidim/admin/test/admin_participatory_space_access_examples.rb
685
694
  - lib/decidim/admin/test/commands/create_attachment_collection_examples.rb
686
695
  - lib/decidim/admin/test/commands/create_category_examples.rb
687
696
  - lib/decidim/admin/test/commands/destroy_category_examples.rb
@@ -720,7 +729,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
720
729
  - !ruby/object:Gem::Version
721
730
  version: '0'
722
731
  requirements: []
723
- rubygems_version: 3.2.22
732
+ rubygems_version: 3.4.22
724
733
  signing_key:
725
734
  specification_version: 4
726
735
  summary: Decidim organization administration
@@ -1,63 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Admin
5
- # Base controller that can be inherited by other spaces to publish and unpublish the Space
6
- #
7
- class SpacePublicationsController < Decidim::Assemblies::Admin::ApplicationController
8
- def create
9
- enforce_permission_to_publish
10
-
11
- publish_command.call(current_assembly, current_user) do
12
- on(:ok) do
13
- flash[:notice] = I18n.t("create.success", scope: i18n_scope)
14
- end
15
-
16
- on(:invalid) do
17
- flash.now[:alert] = I18n.t("create.error", scope: i18n_scope)
18
- end
19
-
20
- redirect_back(fallback_location: assemblies_path)
21
- end
22
- end
23
-
24
- def destroy
25
- enforce_permission_to_publish
26
-
27
- unpublish_command.call(current_assembly, current_user) do
28
- on(:ok) do
29
- flash[:notice] = I18n.t("destroy.success", scope: i18n_scope)
30
- end
31
-
32
- on(:invalid) do
33
- flash.now[:alert] = I18n.t("destroy.error", scope: i18n_scope)
34
- end
35
-
36
- redirect_back(fallback_location: assemblies_path)
37
- end
38
- end
39
-
40
- private
41
-
42
- def current_participatory_space
43
- raise "Not implemented"
44
- end
45
-
46
- def enforce_permission_to_publish
47
- raise "Not implemented"
48
- end
49
-
50
- def publish_command
51
- raise "Not implemented"
52
- end
53
-
54
- def unpublish_command
55
- raise "Not implemented"
56
- end
57
-
58
- def i18n_scope
59
- raise "Not implemented"
60
- end
61
- end
62
- end
63
- end