decidim-participatory_processes 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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/participatory_process_groups/content_blocks/extra_data_cell.rb +4 -4
  3. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_cell.rb +0 -2
  4. data/app/cells/decidim/participatory_processes/content_blocks/stats_cell.rb +1 -1
  5. data/app/cells/decidim/participatory_processes/process_filters/filter_tabs.erb +2 -2
  6. data/app/cells/decidim/participatory_processes/process_filters/show.erb +1 -1
  7. data/app/cells/decidim/participatory_processes/process_filters/type_filter.erb +1 -1
  8. data/app/cells/decidim/participatory_processes/process_filters_cell.rb +1 -2
  9. data/app/cells/decidim/participatory_processes/process_g_cell.rb +2 -2
  10. data/app/cells/decidim/participatory_processes/process_group_g_cell.rb +2 -2
  11. data/app/cells/decidim/participatory_processes/process_group_s_cell.rb +5 -1
  12. data/app/commands/decidim/participatory_processes/admin/copy_participatory_process.rb +5 -7
  13. data/app/commands/decidim/participatory_processes/admin/create_participatory_process.rb +27 -99
  14. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb +10 -53
  15. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_step.rb +9 -36
  16. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_type.rb +4 -34
  17. data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_step.rb +6 -37
  18. data/app/commands/decidim/participatory_processes/admin/import_participatory_process.rb +5 -4
  19. data/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +10 -80
  20. data/app/commands/decidim/participatory_processes/admin/update_participatory_process_group.rb +6 -55
  21. data/app/commands/decidim/participatory_processes/admin/update_participatory_process_step.rb +8 -52
  22. data/app/commands/decidim/participatory_processes/admin/update_participatory_process_type.rb +2 -38
  23. data/app/controllers/decidim/participatory_processes/admin/participatory_process_copies_controller.rb +1 -1
  24. data/app/controllers/decidim/participatory_processes/admin/participatory_process_groups_controller.rb +2 -2
  25. data/app/controllers/decidim/participatory_processes/admin/participatory_process_steps_controller.rb +2 -2
  26. data/app/controllers/decidim/participatory_processes/admin/participatory_process_types_controller.rb +2 -2
  27. data/app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb +1 -1
  28. data/app/controllers/decidim/participatory_processes/admin/participatory_space_private_users_controller.rb +1 -1
  29. data/app/controllers/decidim/participatory_processes/application_controller.rb +3 -0
  30. data/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +1 -6
  31. data/app/events/decidim/participatory_process_role_assigned_event.rb +0 -5
  32. data/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +3 -8
  33. data/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +1 -1
  34. data/app/models/decidim/participatory_process.rb +1 -4
  35. data/app/models/decidim/participatory_process_step.rb +1 -1
  36. data/app/permissions/decidim/participatory_processes/permissions.rb +1 -1
  37. data/app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb +1 -1
  38. data/app/presenters/decidim/participatory_processes/participatory_process_presenter.rb +1 -5
  39. data/app/queries/decidim/participatory_processes/stats_participants_count.rb +4 -4
  40. data/app/serializers/decidim/participatory_processes/participatory_process_importer.rb +2 -5
  41. data/app/serializers/decidim/participatory_processes/participatory_process_serializer.rb +0 -3
  42. data/app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb +1 -1
  43. data/app/views/decidim/participatory_processes/admin/participatory_process_steps/show.html.erb +1 -1
  44. data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/index.html.erb +1 -1
  45. data/app/views/decidim/participatory_processes/admin/participatory_processes/_form.html.erb +5 -17
  46. data/app/views/decidim/participatory_processes/participatory_processes/all_metrics.html.erb +4 -1
  47. data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +24 -20
  48. data/config/locales/ar.yml +3 -15
  49. data/config/locales/bg.yml +3 -4
  50. data/config/locales/ca.yml +5 -8
  51. data/config/locales/cs.yml +6 -14
  52. data/config/locales/de.yml +4 -7
  53. data/config/locales/el.yml +3 -5
  54. data/config/locales/en.yml +2 -5
  55. data/config/locales/es-MX.yml +3 -6
  56. data/config/locales/es-PY.yml +3 -6
  57. data/config/locales/es.yml +3 -6
  58. data/config/locales/eu.yml +51 -54
  59. data/config/locales/fi-plain.yml +3 -6
  60. data/config/locales/fi.yml +15 -18
  61. data/config/locales/fr-CA.yml +4 -7
  62. data/config/locales/fr.yml +4 -7
  63. data/config/locales/ga-IE.yml +0 -10
  64. data/config/locales/gl.yml +3 -16
  65. data/config/locales/hu.yml +3 -5
  66. data/config/locales/id-ID.yml +3 -13
  67. data/config/locales/is-IS.yml +1 -13
  68. data/config/locales/it.yml +3 -16
  69. data/config/locales/ja.yml +2 -5
  70. data/config/locales/lb.yml +3 -15
  71. data/config/locales/lt.yml +2 -4
  72. data/config/locales/lv.yml +3 -14
  73. data/config/locales/nl.yml +2 -15
  74. data/config/locales/no.yml +4 -6
  75. data/config/locales/pl.yml +3 -4
  76. data/config/locales/pt-BR.yml +3 -13
  77. data/config/locales/pt.yml +2 -21
  78. data/config/locales/ro-RO.yml +1 -10
  79. data/config/locales/ru.yml +1 -13
  80. data/config/locales/sk.yml +3 -14
  81. data/config/locales/sr-CS.yml +0 -1
  82. data/config/locales/sv.yml +147 -233
  83. data/config/locales/tr-TR.yml +3 -16
  84. data/config/locales/uk.yml +1 -13
  85. data/config/locales/zh-CN.yml +3 -14
  86. data/config/locales/zh-TW.yml +2 -4
  87. data/db/migrate/20240529161054_add_link_to_decidim_attachments.rb +7 -0
  88. data/decidim-participatory_processes.gemspec +2 -2
  89. data/lib/decidim/api/participatory_process_group_type.rb +1 -1
  90. data/lib/decidim/api/participatory_process_type.rb +1 -8
  91. data/lib/decidim/participatory_processes/content_blocks/registry_manager.rb +1 -1
  92. data/lib/decidim/participatory_processes/engine.rb +1 -0
  93. data/lib/decidim/participatory_processes/menu.rb +11 -0
  94. data/lib/decidim/participatory_processes/query_extensions.rb +0 -26
  95. data/lib/decidim/participatory_processes/seeds.rb +4 -12
  96. data/lib/decidim/participatory_processes/test/factories.rb +0 -3
  97. data/lib/decidim/participatory_processes/version.rb +1 -1
  98. data/lib/tasks/decidim_participatory_processes.rake +1 -1
  99. metadata +16 -22
  100. data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_group.rb +0 -46
  101. data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_type.rb +0 -49
  102. data/app/views/decidim/participatory_processes/participatory_processes/_statistics.html.erb +0 -0
  103. data/app/views/layouts/decidim/_process_header.html.erb +0 -17
  104. data/app/views/layouts/decidim/participatory_process.html.erb +0 -18
  105. data/config/locales/bn-BD.yml +0 -1
  106. data/config/locales/bs-BA.yml +0 -33
@@ -5,7 +5,6 @@ tr:
5
5
  participatory_process:
6
6
  announcement: duyuru
7
7
  area_id: alan
8
- banner_image: Banner resmi
9
8
  copy_categories: Kategorileri kopyala
10
9
  copy_components: Bileşenleri kopyala
11
10
  copy_steps: Adımları kopyala
@@ -24,12 +23,10 @@ tr:
24
23
  promoted: Tanıtılan
25
24
  published_at: Yayınlandı
26
25
  related_process_ids: İlgili süreçler
27
- scope_id: Kapsam
26
+ scope_id: kapsam
28
27
  scope_type_max_depth_id: Kapsam filtre derinliği
29
28
  scopes_enabled: Kapsamlar etkin
30
29
  short_description: Kısa Açıklama
31
- show_metrics: Bütün istatistikleri göster
32
- show_statistics: İstatistikleri göster
33
30
  slug: URL özel bilgisi
34
31
  start_date: Başlangıç tarihi
35
32
  subtitle: Alt yazı
@@ -56,8 +53,6 @@ tr:
56
53
  short_description: Kısa Açıklama
57
54
  start_date: Başlangıç tarihi
58
55
  title: Başlık
59
- participatory_process_type:
60
- title: Başlık
61
56
  participatory_process_user_role:
62
57
  email: E-posta
63
58
  name: isim
@@ -131,10 +126,6 @@ tr:
131
126
  start_date: Başlangıç tarihi
132
127
  title: Başlık
133
128
  name: Katılımcı süreç adımı
134
- participatory_process_type:
135
- fields:
136
- created_at: Düzenlendi
137
- title: Başlık
138
129
  participatory_process_user_role:
139
130
  fields:
140
131
  email: E-posta
@@ -207,11 +198,6 @@ tr:
207
198
  update:
208
199
  error: Bu katılımcı süreç adımı güncellenirken bir hata oluştu.
209
200
  success: Katılımcı süreç adımı başarıyla güncellendi.
210
- participatory_process_types:
211
- edit:
212
- update: Güncelleştirme
213
- new:
214
- create: yaratmak
215
201
  participatory_process_user_roles:
216
202
  create:
217
203
  error: Bu katılımcı süreç için bir kullanıcı eklenirken bir hata oluştu.
@@ -363,12 +349,13 @@ tr:
363
349
  select_an_area: Bir alan seçin
364
350
  select_process_group: Bir işlem grubu seçin
365
351
  title: Genel bilgi
366
- visbility: Görünürlük
367
352
  content_blocks:
368
353
  highlighted_processes:
369
354
  name: Vurgulanan süreçler
370
355
  index:
371
356
  title: Katılımcı süreçler
357
+ last_activity:
358
+ new_participatory_process: Yeni katılımcı süreç
372
359
  participatory_process_steps:
373
360
  index:
374
361
  back_to_process: Süreç sayfasına geri dön
@@ -4,7 +4,6 @@ uk:
4
4
  attributes:
5
5
  participatory_process:
6
6
  announcement: Оголошення
7
- banner_image: Банерне зображення
8
7
  copy_categories: Скопіювати категорії
9
8
  copy_components: Копіювати складові
10
9
  copy_steps: Скопіювати кроки
@@ -22,9 +21,9 @@ uk:
22
21
  promoted: Висвітлено
23
22
  published_at: 'Оприлюднено:'
24
23
  related_process_ids: Супутні рухи
24
+ scope_id: Обсяг
25
25
  scopes_enabled: Обсяги увімкнено
26
26
  short_description: Стислий опис
27
- show_statistics: Показувати статистику
28
27
  slug: Скорочена веб-адреса
29
28
  start_date: Дата початку
30
29
  subtitle: Підзаголовок
@@ -40,8 +39,6 @@ uk:
40
39
  short_description: Стислий опис
41
40
  start_date: Дата початку
42
41
  title: Назва
43
- participatory_process_type:
44
- title: Назва
45
42
  participatory_process_user_role:
46
43
  email: Адреса електронної пошти
47
44
  name: Ім'я
@@ -112,10 +109,6 @@ uk:
112
109
  start_date: Дата початку
113
110
  title: Назва
114
111
  name: Крок руху співучасті
115
- participatory_process_type:
116
- fields:
117
- created_at: 'Додано:'
118
- title: Назва
119
112
  participatory_process_user_role:
120
113
  fields:
121
114
  email: Адреса електронної пошти
@@ -178,11 +171,6 @@ uk:
178
171
  update:
179
172
  error: При спробі оновити цей крок руху співучасті сталася помилка.
180
173
  success: Крок руху співучасті успішно оновлено.
181
- participatory_process_types:
182
- edit:
183
- update: Оновити
184
- new:
185
- create: Створити
186
174
  participatory_process_user_roles:
187
175
  create:
188
176
  error: При спробі додати учасника в цей рух співучасті сталася помилка.
@@ -5,7 +5,6 @@ zh-CN:
5
5
  participatory_process:
6
6
  announcement: 通 知
7
7
  area_id: 区域
8
- banner_image: 横幅图像
9
8
  copy_categories: 复制类别
10
9
  copy_components: 复制组件
11
10
  copy_steps: 复制步骤
@@ -24,11 +23,10 @@ zh-CN:
24
23
  promoted: 已升级
25
24
  published_at: 发布于
26
25
  related_process_ids: 相关进程
26
+ scope_id: 范围
27
27
  scope_type_max_depth_id: 范围过滤器深度:
28
28
  scopes_enabled: 范围已启用
29
29
  short_description: 简短描述
30
- show_metrics: 显示指标
31
- show_statistics: 显示统计
32
30
  slug: URL 名称
33
31
  start_date: 开始日期
34
32
  subtitle: 字幕
@@ -46,8 +44,6 @@ zh-CN:
46
44
  short_description: 简短描述
47
45
  start_date: 开始日期
48
46
  title: 标题
49
- participatory_process_type:
50
- title: 标题
51
47
  participatory_process_user_role:
52
48
  email: 电子邮件地址
53
49
  name: 名称
@@ -110,10 +106,6 @@ zh-CN:
110
106
  start_date: 开始日期
111
107
  title: 标题
112
108
  name: 参与进程阶段
113
- participatory_process_type:
114
- fields:
115
- created_at: 创建于
116
- title: 标题
117
109
  participatory_process_user_role:
118
110
  fields:
119
111
  email: 电子邮件地址
@@ -186,11 +178,6 @@ zh-CN:
186
178
  update:
187
179
  error: 在更新这一阶段的参与进程时遇到了问题。
188
180
  success: 参与阶段更新成功。
189
- participatory_process_types:
190
- edit:
191
- update: 更新
192
- new:
193
- create: 创建
194
181
  participatory_process_user_roles:
195
182
  create:
196
183
  error: 在这个参与进程中增加参与者时遇到了问题。
@@ -325,6 +312,8 @@ zh-CN:
325
312
  name: 高亮的进程
326
313
  index:
327
314
  title: 参与进程
315
+ last_activity:
316
+ new_participatory_process: 新的参与进程
328
317
  participatory_process_steps:
329
318
  index:
330
319
  back_to_process: 返回进程页面
@@ -5,7 +5,6 @@ zh-TW:
5
5
  participatory_process:
6
6
  announcement: 公告
7
7
  area_id: 區域
8
- banner_image: 橫幅圖片
9
8
  copy_categories: 複製類別
10
9
  copy_components: 複製組件
11
10
  copy_steps: 複製步驟
@@ -35,8 +34,6 @@ zh-TW:
35
34
  scope_type_max_depth_id: 範圍篩選深度
36
35
  scopes_enabled: 啟用範圍
37
36
  short_description: 簡短說明
38
- show_metrics: 顯示度量
39
- show_statistics: 顯示統計資料
40
37
  slug: URL網址
41
38
  start_date: 開始日期
42
39
  subtitle: 子標題
@@ -398,12 +395,13 @@ zh-TW:
398
395
  select_participatory_process_type: 選擇一個程序類型
399
396
  select_process_group: 選擇一個程序群組
400
397
  title: 基本資訊
401
- visbility: 可見度
402
398
  content_blocks:
403
399
  highlighted_processes:
404
400
  name: 精選程序
405
401
  index:
406
402
  title: 參與程序
403
+ last_activity:
404
+ new_participatory_process: 新的參與程序
407
405
  participatory_process_steps:
408
406
  index:
409
407
  back_to_process: 返回程序頁
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddLinkToDecidimAttachments < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column :decidim_attachments, :link, :string
6
+ end
7
+ end
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.version = Decidim::ParticipatoryProcesses.version
9
9
  s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
10
10
  s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
11
- s.license = "AGPL-3.0-or-later"
11
+ s.license = "AGPL-3.0"
12
12
  s.homepage = "https://decidim.org"
13
13
  s.metadata = {
14
14
  "bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  "homepage_uri" => "https://decidim.org",
18
18
  "source_code_uri" => "https://github.com/decidim/decidim"
19
19
  }
20
- s.required_ruby_version = "~> 3.1.0"
20
+ s.required_ruby_version = "~> 3.2.0"
21
21
 
22
22
  s.name = "decidim-participatory_processes"
23
23
  s.summary = "Decidim participatory processes module"
@@ -14,7 +14,7 @@ module Decidim
14
14
  field :hero_image, GraphQL::Types::String, "The hero image for this participatory process group", null: true
15
15
 
16
16
  def hero_image
17
- object.attached_uploader(:hero_image).url
17
+ object.attached_uploader(:hero_image).path
18
18
  end
19
19
  end
20
20
  end
@@ -24,7 +24,6 @@ module Decidim
24
24
  field :start_date, Decidim::Core::DateType, "This participatory process' start date.", null: true
25
25
  field :end_date, Decidim::Core::DateType, "This participatory process' end date.", null: true
26
26
 
27
- field :banner_image, GraphQL::Types::String, "The banner image for this participatory process", null: true
28
27
  field :hero_image, GraphQL::Types::String, "The hero image for this participatory process", null: true
29
28
  field :promoted, GraphQL::Types::Boolean, "If this participatory process is promoted (therefore in the homepage)", null: true
30
29
  field :developer_group, Decidim::Core::TranslatedFieldType, "The promoter group of this participatory process.", null: true
@@ -33,8 +32,6 @@ module Decidim
33
32
  field :target, Decidim::Core::TranslatedFieldType, "Who participates in this participatory process.", null: true
34
33
  field :participatory_scope, Decidim::Core::TranslatedFieldType, "What is decided on this participatory process.", null: true
35
34
  field :participatory_structure, Decidim::Core::TranslatedFieldType, "How it is decided on this participatory process.", null: true
36
- field :show_metrics, GraphQL::Types::Boolean, "If this participatory process should show metrics", null: true
37
- field :show_statistics, GraphQL::Types::Boolean, "If this participatory process should show statistics", null: true
38
35
  field :scopes_enabled, GraphQL::Types::Boolean, "If this participatory process has scopes enabled", null: true
39
36
 
40
37
  field :announcement, Decidim::Core::TranslatedFieldType, "Highlighted announcement for this participatory process.", null: true
@@ -46,12 +43,8 @@ module Decidim
46
43
  null: true,
47
44
  description: "The participatory process group in which this process belong to"
48
45
 
49
- def banner_image
50
- object.attached_uploader(:banner_image).path
51
- end
52
-
53
46
  def hero_image
54
- object.attached_uploader(:hero_image).url
47
+ object.attached_uploader(:hero_image).path
55
48
  end
56
49
  end
57
50
  end
@@ -116,7 +116,7 @@ module Decidim
116
116
  content_block.public_name_key = "decidim.content_blocks.last_activity.name"
117
117
  content_block.settings_form_cell = "decidim/content_blocks/last_activity_settings_form"
118
118
  content_block.settings do |settings|
119
- settings.attribute :max_last_activity_users, type: :integer, default: Decidim::ContentBlocks::ParticipatorySpaceLastActivityCell::DEFAULT_MAX_LAST_ACTIVITY_USERS
119
+ settings.attribute :max_last_activity_users, type: :integer, default: Decidim.default_max_last_activity_users
120
120
  end
121
121
  end
122
122
 
@@ -65,6 +65,7 @@ module Decidim
65
65
 
66
66
  initializer "decidim_participatory_processes.menu" do
67
67
  Decidim::ParticipatoryProcesses::Menu.register_menu!
68
+ Decidim::ParticipatoryProcesses::Menu.register_mobile_menu!
68
69
  Decidim::ParticipatoryProcesses::Menu.register_home_content_block_menu!
69
70
  end
70
71
 
@@ -14,6 +14,17 @@ module Decidim
14
14
  end
15
15
  end
16
16
 
17
+ def self.register_mobile_menu!
18
+ Decidim.menu :mobile_menu do |menu|
19
+ menu.add_item :participatory_processes,
20
+ I18n.t("menu.processes", scope: "decidim"),
21
+ decidim_participatory_processes.participatory_processes_path,
22
+ position: 2,
23
+ if: Decidim::ParticipatoryProcess.where(organization: current_organization).published.any?,
24
+ active: %r{^/process(es|_groups)}
25
+ end
26
+ end
27
+
17
28
  def self.register_home_content_block_menu!
18
29
  Decidim.menu :home_content_block_menu do |menu|
19
30
  menu.add_item :participatory_processes,
@@ -11,22 +11,6 @@ module Decidim
11
11
  #
12
12
  # Returns nothing.
13
13
  def self.included(type)
14
- type.field :participatory_processes,
15
- [Decidim::ParticipatoryProcesses::ParticipatoryProcessType],
16
- null: true,
17
- description: "Lists all participatory_processes" do
18
- argument :filter, Decidim::ParticipatoryProcesses::ParticipatoryProcessInputFilter, "This argument lets you filter the results", required: false
19
- argument :order, Decidim::ParticipatoryProcesses::ParticipatoryProcessInputSort, "This argument lets you order the results", required: false
20
- end
21
-
22
- type.field :participatory_process,
23
- Decidim::ParticipatoryProcesses::ParticipatoryProcessType,
24
- null: true,
25
- description: "Finds a participatory_process" do
26
- argument :id, GraphQL::Types::ID, "The ID of the participatory space", required: false
27
- argument :slug, String, "The slug of the participatory process", required: false
28
- end
29
-
30
14
  type.field :participatory_process_groups, [ParticipatoryProcessGroupType],
31
15
  null: false,
32
16
  description: "Lists all participatory process groups"
@@ -46,16 +30,6 @@ module Decidim
46
30
  end
47
31
  end
48
32
 
49
- def participatory_processes(filter: {}, order: {})
50
- manifest = Decidim.participatory_space_manifests.select { |m| m.name == :participatory_processes }.first
51
- Decidim::Core::ParticipatorySpaceListBase.new(manifest:).call(object, { filter:, order: }, context)
52
- end
53
-
54
- def participatory_process(id: nil, slug: nil)
55
- manifest = Decidim.participatory_space_manifests.select { |m| m.name == :participatory_processes }.first
56
- Decidim::Core::ParticipatorySpaceFinderBase.new(manifest:).call(object, { id:, slug: }, context)
57
- end
58
-
59
33
  def participatory_process_groups(*)
60
34
  Decidim::ParticipatoryProcessGroup.where(
61
35
  organization: context[:current_organization]
@@ -26,6 +26,9 @@ module Decidim
26
26
  2.times do |_n|
27
27
  process = create_process!(process_group: process_groups.sample, process_type: process_types.sample)
28
28
 
29
+ create_follow!(Decidim::User.where(organization:, admin: true).first, process)
30
+ create_follow!(Decidim::User.where(organization:, admin: false).first, process)
31
+
29
32
  create_process_step!(process:)
30
33
 
31
34
  create_process_user_roles!(process:)
@@ -93,7 +96,6 @@ module Decidim
93
96
  end,
94
97
  organization:,
95
98
  hero_image: ::Faker::Boolean.boolean(true_ratio: 0.5) ? hero_image : nil, # Keep after organization
96
- banner_image: ::Faker::Boolean.boolean(true_ratio: 0.5) ? banner_image : nil, # Keep after organization
97
99
  promoted: true,
98
100
  published_at: 2.weeks.ago,
99
101
  meta_scope: Decidim::Faker::Localized.word,
@@ -140,17 +142,7 @@ module Decidim
140
142
  # Create users with specific roles
141
143
  Decidim::ParticipatoryProcessUserRole::ROLES.each do |role|
142
144
  email = "participatory_process_#{process.id}_#{role}@example.org"
143
-
144
- user = Decidim::User.find_or_initialize_by(email:)
145
- user.update!(
146
- name: ::Faker::Name.name,
147
- nickname: ::Faker::Twitter.unique.screen_name,
148
- password: "decidim123456789",
149
- organization:,
150
- confirmed_at: Time.current,
151
- locale: I18n.default_locale,
152
- tos_agreement: true
153
- )
145
+ user = find_or_initialize_user_by(email:)
154
146
 
155
147
  Decidim::ParticipatoryProcessUserRole.find_or_create_by!(
156
148
  user:,
@@ -22,7 +22,6 @@ FactoryBot.define do
22
22
  description { generate_localized_description(:participatory_process_description, skip_injection:) }
23
23
  organization
24
24
  hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } # Keep after organization
25
- banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") } # Keep after organization
26
25
  published_at { Time.current }
27
26
  meta_scope { generate_localized_word(:participatory_process_meta_scope, skip_injection:) }
28
27
  developer_group { generate_localized_title(:participatory_process_developer_group, skip_injection:) }
@@ -31,8 +30,6 @@ FactoryBot.define do
31
30
  participatory_scope { generate_localized_title(:participatory_process_participatory_scope, skip_injection:) }
32
31
  participatory_structure { generate_localized_title(:participatory_process_participatory_structure, skip_injection:) }
33
32
  announcement { generate_localized_title(:participatory_process_announcement, skip_injection:) }
34
- show_metrics { true }
35
- show_statistics { true }
36
33
  private_space { false }
37
34
  start_date { Date.current }
38
35
  end_date { 2.months.from_now }
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-participatory_processes version.
5
5
  module ParticipatoryProcesses
6
6
  def self.version
7
- "0.28.5"
7
+ "0.29.0.rc1"
8
8
  end
9
9
  end
10
10
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  namespace :decidim_participatory_processes do
4
- desc "Change active step automatically in participatory processes"
4
+ desc "Changes active step automatically in participatory processes"
5
5
  task :change_active_step, [] => :environment do
6
6
  Decidim::ParticipatoryProcesses::ChangeActiveStepJob.perform_later
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-participatory_processes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.5
4
+ version: 0.29.0.rc1
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: 2025-02-12 00:00:00.000000000 Z
13
+ date: 2024-07-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,56 +18,56 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.28.5
21
+ version: 0.29.0.rc1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.28.5
28
+ version: 0.29.0.rc1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-admin
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.28.5
35
+ version: 0.29.0.rc1
36
36
  type: :development
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.28.5
42
+ version: 0.29.0.rc1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-dev
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.28.5
49
+ version: 0.29.0.rc1
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.28.5
56
+ version: 0.29.0.rc1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: decidim-meetings
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.28.5
63
+ version: 0.29.0.rc1
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.28.5
70
+ version: 0.29.0.rc1
71
71
  description: Participatory processes component for decidim.
72
72
  email:
73
73
  - josepjaume@gmail.com
@@ -129,9 +129,7 @@ files:
129
129
  - app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb
130
130
  - app/commands/decidim/participatory_processes/admin/create_participatory_process_step.rb
131
131
  - app/commands/decidim/participatory_processes/admin/create_participatory_process_type.rb
132
- - app/commands/decidim/participatory_processes/admin/destroy_participatory_process_group.rb
133
132
  - app/commands/decidim/participatory_processes/admin/destroy_participatory_process_step.rb
134
- - app/commands/decidim/participatory_processes/admin/destroy_participatory_process_type.rb
135
133
  - app/commands/decidim/participatory_processes/admin/import_participatory_process.rb
136
134
  - app/commands/decidim/participatory_processes/admin/reorder_participatory_process_steps.rb
137
135
  - app/commands/decidim/participatory_processes/admin/update_participatory_process.rb
@@ -269,12 +267,10 @@ files:
269
267
  - app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb
270
268
  - app/views/decidim/participatory_processes/participatory_process_groups/show.js.erb
271
269
  - app/views/decidim/participatory_processes/participatory_processes/_collection.html.erb
272
- - app/views/decidim/participatory_processes/participatory_processes/_statistics.html.erb
273
270
  - app/views/decidim/participatory_processes/participatory_processes/all_metrics.html.erb
274
271
  - app/views/decidim/participatory_processes/participatory_processes/index.html.erb
275
272
  - app/views/decidim/participatory_processes/participatory_processes/index.js.erb
276
273
  - app/views/decidim/participatory_processes/participatory_processes/show.html.erb
277
- - app/views/layouts/decidim/_process_header.html.erb
278
274
  - app/views/layouts/decidim/_process_nav_item.html.erb
279
275
  - app/views/layouts/decidim/admin/_manage_processes.html.erb
280
276
  - app/views/layouts/decidim/admin/participatory_process.html.erb
@@ -282,15 +278,12 @@ files:
282
278
  - app/views/layouts/decidim/admin/participatory_process_groups.html.erb
283
279
  - app/views/layouts/decidim/admin/participatory_process_type.html.erb
284
280
  - app/views/layouts/decidim/admin/participatory_processes.html.erb
285
- - app/views/layouts/decidim/participatory_process.html.erb
286
281
  - config/assets.rb
287
282
  - config/locales/am-ET.yml
288
283
  - config/locales/ar-SA.yml
289
284
  - config/locales/ar.yml
290
285
  - config/locales/bg-BG.yml
291
286
  - config/locales/bg.yml
292
- - config/locales/bn-BD.yml
293
- - config/locales/bs-BA.yml
294
287
  - config/locales/ca.yml
295
288
  - config/locales/cs-CZ.yml
296
289
  - config/locales/cs.yml
@@ -414,6 +407,7 @@ files:
414
407
  - db/migrate/20210415163339_allow_null_file_column_in_decidim_attachments_table.rb
415
408
  - db/migrate/20211125202008_create_decidim_participatory_process_types.rb
416
409
  - db/migrate/20220315100140_change_steps_dates_to_datetime.rb
410
+ - db/migrate/20240529161054_add_link_to_decidim_attachments.rb
417
411
  - decidim-participatory_processes.gemspec
418
412
  - lib/decidim/api/participatory_process_group_type.rb
419
413
  - lib/decidim/api/participatory_process_input_filter.rb
@@ -436,7 +430,7 @@ files:
436
430
  - lib/tasks/decidim_participatory_processes.rake
437
431
  homepage: https://decidim.org
438
432
  licenses:
439
- - AGPL-3.0-or-later
433
+ - AGPL-3.0
440
434
  metadata:
441
435
  bug_tracker_uri: https://github.com/decidim/decidim/issues
442
436
  documentation_uri: https://docs.decidim.org/
@@ -451,14 +445,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
451
445
  requirements:
452
446
  - - "~>"
453
447
  - !ruby/object:Gem::Version
454
- version: 3.1.0
448
+ version: 3.2.0
455
449
  required_rubygems_version: !ruby/object:Gem::Requirement
456
450
  requirements:
457
- - - ">="
451
+ - - ">"
458
452
  - !ruby/object:Gem::Version
459
- version: '0'
453
+ version: 1.3.1
460
454
  requirements: []
461
- rubygems_version: 3.3.7
455
+ rubygems_version: 3.4.10
462
456
  signing_key:
463
457
  specification_version: 4
464
458
  summary: Decidim participatory processes module
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module ParticipatoryProcesses
5
- module Admin
6
- # A command with all the business logic when deleting a ParticipatoryProcessGroup.
7
- class DestroyParticipatoryProcessGroup < Decidim::Command
8
- # Public: Initializes the command.
9
- #
10
- # participatory_process_group - the ParticipatoryProcessGroup to delete.
11
- # current_user - the user performing this action
12
- def initialize(participatory_process_group, current_user)
13
- @participatory_process_group = participatory_process_group
14
- @current_user = current_user
15
- end
16
-
17
- # Executes the command. Broadcasts these events:
18
- #
19
- # - :ok when the record could be deleted.
20
- # - :invalid when the record could not be deleted.
21
- #
22
- # Returns nothing.
23
- def call
24
- destroy_process_group
25
- broadcast(:ok)
26
- rescue ActiveRecord::RecordNotDestroyed
27
- broadcast(:invalid)
28
- end
29
-
30
- private
31
-
32
- attr_reader :participatory_process_group, :current_user
33
-
34
- def destroy_process_group
35
- Decidim.traceability.perform_action!(
36
- "delete",
37
- participatory_process_group,
38
- current_user
39
- ) do
40
- participatory_process_group.destroy!
41
- end
42
- end
43
- end
44
- end
45
- end
46
- end