decidim-participatory_processes 0.29.2 → 0.30.0.rc2

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 (112) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/participatory_process_groups/process_filters_cell.rb +4 -5
  3. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_settings_form/show.erb +1 -1
  4. data/app/cells/decidim/participatory_processes/process_dropdown_metadata_cell.rb +7 -0
  5. data/app/cells/decidim/participatory_processes/process_filters/show.erb +0 -1
  6. data/app/cells/decidim/participatory_processes/process_filters_cell.rb +6 -32
  7. data/app/commands/decidim/participatory_processes/admin/copy_participatory_process.rb +2 -23
  8. data/app/commands/decidim/participatory_processes/admin/create_participatory_process.rb +3 -3
  9. data/app/commands/decidim/participatory_processes/admin/import_participatory_process.rb +0 -1
  10. data/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +3 -3
  11. data/app/controllers/decidim/participatory_processes/admin/component_share_tokens_controller.rb +18 -0
  12. data/app/controllers/decidim/participatory_processes/admin/participatory_process_share_tokens_controller.rb +16 -0
  13. data/app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb +15 -3
  14. data/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +2 -4
  15. data/app/controllers/decidim/participatory_processes/participatory_space_private_users_controller.rb +27 -0
  16. data/app/forms/decidim/participatory_processes/admin/participatory_process_copy_form.rb +0 -1
  17. data/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +3 -33
  18. data/app/forms/decidim/participatory_processes/admin/participatory_process_import_form.rb +0 -1
  19. data/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +28 -20
  20. data/app/jobs/decidim/participatory_processes/change_active_step_job.rb +1 -1
  21. data/app/models/decidim/participatory_process.rb +19 -3
  22. data/app/permissions/decidim/participatory_processes/permissions.rb +15 -14
  23. data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_presenter.rb +1 -1
  24. data/app/queries/decidim/participatory_processes/metrics/participatory_process_followers_metric_measure.rb +2 -2
  25. data/app/queries/decidim/participatory_processes/metrics/participatory_processes_metric_manage.rb +2 -2
  26. data/app/serializers/decidim/participatory_processes/open_data_participatory_process_serializer.rb +47 -0
  27. data/app/serializers/decidim/participatory_processes/participatory_process_importer.rb +1 -43
  28. data/app/serializers/decidim/participatory_processes/participatory_process_serializer.rb +17 -126
  29. data/app/views/decidim/participatory_processes/admin/participatory_process_copies/_form.html.erb +0 -4
  30. data/app/views/decidim/participatory_processes/admin/participatory_process_imports/_form.html.erb +0 -3
  31. data/app/views/decidim/participatory_processes/admin/participatory_processes/_form.html.erb +25 -60
  32. data/app/views/decidim/participatory_processes/admin/participatory_processes/_process_row.html.erb +83 -0
  33. data/app/views/decidim/participatory_processes/admin/participatory_processes/_processes_thead.html.erb +19 -0
  34. data/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb +16 -84
  35. data/app/views/decidim/participatory_processes/admin/participatory_processes/manage_trash.html.erb +20 -0
  36. data/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb +3 -1
  37. data/app/views/decidim/participatory_processes/participatory_processes/index.html.erb +3 -1
  38. data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +6 -6
  39. data/app/views/decidim/participatory_processes/participatory_space_private_users/index.html.erb +22 -0
  40. data/config/assets.rb +1 -2
  41. data/config/locales/ar.yml +2 -17
  42. data/config/locales/bg.yml +0 -36
  43. data/config/locales/bs-BA.yml +0 -9
  44. data/config/locales/ca.yml +61 -36
  45. data/config/locales/cs.yml +61 -36
  46. data/config/locales/de.yml +60 -35
  47. data/config/locales/el.yml +0 -36
  48. data/config/locales/en.yml +61 -36
  49. data/config/locales/es-MX.yml +60 -35
  50. data/config/locales/es-PY.yml +60 -35
  51. data/config/locales/es.yml +60 -35
  52. data/config/locales/eu.yml +60 -35
  53. data/config/locales/fi-plain.yml +61 -36
  54. data/config/locales/fi.yml +61 -36
  55. data/config/locales/fr-CA.yml +24 -35
  56. data/config/locales/fr.yml +24 -35
  57. data/config/locales/ga-IE.yml +0 -14
  58. data/config/locales/gl.yml +0 -18
  59. data/config/locales/hu.yml +0 -36
  60. data/config/locales/id-ID.yml +0 -17
  61. data/config/locales/is-IS.yml +0 -13
  62. data/config/locales/it.yml +0 -21
  63. data/config/locales/ja.yml +61 -36
  64. data/config/locales/lb.yml +0 -20
  65. data/config/locales/lt.yml +0 -36
  66. data/config/locales/lv.yml +0 -20
  67. data/config/locales/nl.yml +0 -21
  68. data/config/locales/no.yml +0 -36
  69. data/config/locales/pl.yml +0 -36
  70. data/config/locales/pt-BR.yml +0 -33
  71. data/config/locales/pt.yml +0 -21
  72. data/config/locales/ro-RO.yml +1 -36
  73. data/config/locales/ru.yml +0 -14
  74. data/config/locales/sk.yml +0 -20
  75. data/config/locales/sr-CS.yml +0 -9
  76. data/config/locales/sv.yml +53 -36
  77. data/config/locales/tr-TR.yml +0 -21
  78. data/config/locales/uk.yml +0 -14
  79. data/config/locales/zh-CN.yml +0 -20
  80. data/config/locales/zh-TW.yml +0 -36
  81. data/db/migrate/20210310120750_add_followable_counter_cache_to_participatory_processes.rb +1 -1
  82. data/db/migrate/20240822161355_add_deleted_at_to_decidim_participatory_processes.rb +8 -0
  83. data/db/migrate/20241108141423_remove_column_show_metrics_from_participatory_processes.rb +7 -0
  84. data/db/migrate/20241108141514_remove_column_banner_image_from_participatory_processes.rb +7 -0
  85. data/db/migrate/20241108141605_remove_column_show_statistics_from_participatory_processes.rb +7 -0
  86. data/decidim-participatory_processes.gemspec +1 -1
  87. data/lib/decidim/api/participatory_process_group_type.rb +3 -3
  88. data/lib/decidim/api/participatory_process_step_type.rb +7 -9
  89. data/lib/decidim/api/participatory_process_type.rb +18 -23
  90. data/lib/decidim/api/participatory_process_type_type.rb +3 -3
  91. data/lib/decidim/participatory_processes/admin_engine.rb +85 -59
  92. data/lib/decidim/participatory_processes/content_blocks/registry_manager.rb +11 -0
  93. data/lib/decidim/participatory_processes/engine.rb +7 -0
  94. data/lib/decidim/participatory_processes/menu.rb +9 -17
  95. data/lib/decidim/participatory_processes/participatory_space.rb +5 -2
  96. data/lib/decidim/participatory_processes/seeds.rb +8 -16
  97. data/lib/decidim/participatory_processes/test/factories.rb +14 -14
  98. data/lib/decidim/participatory_processes/version.rb +1 -1
  99. metadata +24 -25
  100. data/app/cells/decidim/participatory_processes/process_filters/type_filter.erb +0 -17
  101. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_type.rb +0 -17
  102. data/app/commands/decidim/participatory_processes/admin/update_participatory_process_type.rb +0 -13
  103. data/app/controllers/decidim/participatory_processes/admin/categories_controller.rb +0 -13
  104. data/app/controllers/decidim/participatory_processes/admin/participatory_process_types_controller.rb +0 -117
  105. data/app/forms/decidim/participatory_processes/admin/participatory_process_type_form.rb +0 -20
  106. data/app/helpers/decidim/participatory_processes/admin/participatory_process_helper.rb +0 -24
  107. data/app/packs/entrypoints/decidim_participatory_processes_admin.js +0 -1
  108. data/app/packs/src/decidim/participatory_processes/admin/participatory_processes.js +0 -18
  109. data/app/views/decidim/participatory_processes/admin/participatory_process_types/_form.html.erb +0 -9
  110. data/app/views/decidim/participatory_processes/admin/participatory_process_types/edit.html.erb +0 -18
  111. data/app/views/decidim/participatory_processes/admin/participatory_process_types/index.html.erb +0 -58
  112. data/app/views/decidim/participatory_processes/admin/participatory_process_types/new.html.erb +0 -18
@@ -23,6 +23,7 @@ FactoryBot.define do
23
23
  organization
24
24
  hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } # Keep after organization
25
25
  published_at { Time.current }
26
+ deleted_at { nil }
26
27
  meta_scope { generate_localized_word(:participatory_process_meta_scope, skip_injection:) }
27
28
  developer_group { generate_localized_title(:participatory_process_developer_group, skip_injection:) }
28
29
  local_area { generate_localized_title(:participatory_process_local_area, skip_injection:) }
@@ -47,6 +48,10 @@ FactoryBot.define do
47
48
  published_at { Time.current }
48
49
  end
49
50
 
51
+ trait :trashed do
52
+ deleted_at { Time.current }
53
+ end
54
+
50
55
  trait :private do
51
56
  private_space { true }
52
57
  end
@@ -80,11 +85,6 @@ FactoryBot.define do
80
85
  end_date { 2.weeks.from_now }
81
86
  end
82
87
 
83
- trait :with_scope do
84
- scopes_enabled { true }
85
- scope { create :scope, organization:, skip_injection: }
86
- end
87
-
88
88
  trait :with_content_blocks do
89
89
  transient { blocks_manifests { [:hero] } }
90
90
 
@@ -186,10 +186,10 @@ FactoryBot.define do
186
186
  admin_terms_accepted_at { Time.current }
187
187
 
188
188
  after(:create) do |user, evaluator|
189
- create :participatory_process_user_role,
189
+ create(:participatory_process_user_role,
190
190
  user:,
191
191
  participatory_process: evaluator.participatory_process,
192
- role: :admin, skip_injection: evaluator.skip_injection
192
+ role: :admin, skip_injection: evaluator.skip_injection)
193
193
  end
194
194
  end
195
195
 
@@ -203,10 +203,10 @@ FactoryBot.define do
203
203
  admin_terms_accepted_at { Time.current }
204
204
 
205
205
  after(:create) do |user, evaluator|
206
- create :participatory_process_user_role,
206
+ create(:participatory_process_user_role,
207
207
  user:,
208
208
  participatory_process: evaluator.participatory_process,
209
- role: :collaborator, skip_injection: evaluator.skip_injection
209
+ role: :collaborator, skip_injection: evaluator.skip_injection)
210
210
  end
211
211
  end
212
212
 
@@ -220,10 +220,10 @@ FactoryBot.define do
220
220
  admin_terms_accepted_at { Time.current }
221
221
 
222
222
  after(:create) do |user, evaluator|
223
- create :participatory_process_user_role,
223
+ create(:participatory_process_user_role,
224
224
  user:,
225
225
  participatory_process: evaluator.participatory_process,
226
- role: :moderator, skip_injection: evaluator.skip_injection
226
+ role: :moderator, skip_injection: evaluator.skip_injection)
227
227
  end
228
228
  end
229
229
 
@@ -237,10 +237,10 @@ FactoryBot.define do
237
237
  admin_terms_accepted_at { Time.current }
238
238
 
239
239
  after(:create) do |user, evaluator|
240
- create :participatory_process_user_role,
240
+ create(:participatory_process_user_role,
241
241
  user:,
242
242
  participatory_process: evaluator.participatory_process,
243
- role: :valuator, skip_injection: evaluator.skip_injection
243
+ role: :valuator, skip_injection: evaluator.skip_injection)
244
244
  end
245
245
  end
246
246
 
@@ -249,7 +249,7 @@ FactoryBot.define do
249
249
  skip_injection { false }
250
250
  end
251
251
  user
252
- participatory_process { create :participatory_process, organization: user.organization, skip_injection: }
252
+ participatory_process { create(:participatory_process, organization: user.organization, skip_injection:) }
253
253
  role { "admin" }
254
254
  end
255
255
  end
@@ -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.29.2"
7
+ "0.30.0.rc2"
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-participatory_processes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.2
4
+ version: 0.30.0.rc2
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: 2025-03-03 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.29.2
21
+ version: 0.30.0.rc2
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.29.2
28
+ version: 0.30.0.rc2
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.29.2
35
+ version: 0.30.0.rc2
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.29.2
42
+ version: 0.30.0.rc2
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.29.2
49
+ version: 0.30.0.rc2
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.29.2
56
+ version: 0.30.0.rc2
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.29.2
63
+ version: 0.30.0.rc2
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.29.2
70
+ version: 0.30.0.rc2
71
71
  description: Participatory processes component for decidim.
72
72
  email:
73
73
  - josepjaume@gmail.com
@@ -109,7 +109,6 @@ files:
109
109
  - app/cells/decidim/participatory_processes/process_dropdown_metadata_cell.rb
110
110
  - app/cells/decidim/participatory_processes/process_filters/filter_tabs.erb
111
111
  - app/cells/decidim/participatory_processes/process_filters/show.erb
112
- - app/cells/decidim/participatory_processes/process_filters/type_filter.erb
113
112
  - app/cells/decidim/participatory_processes/process_filters_cell.rb
114
113
  - app/cells/decidim/participatory_processes/process_g_cell.rb
115
114
  - app/cells/decidim/participatory_processes/process_group_cell.rb
@@ -128,20 +127,18 @@ files:
128
127
  - app/commands/decidim/participatory_processes/admin/create_participatory_process.rb
129
128
  - app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb
130
129
  - app/commands/decidim/participatory_processes/admin/create_participatory_process_step.rb
131
- - app/commands/decidim/participatory_processes/admin/create_participatory_process_type.rb
132
130
  - app/commands/decidim/participatory_processes/admin/destroy_participatory_process_step.rb
133
131
  - app/commands/decidim/participatory_processes/admin/import_participatory_process.rb
134
132
  - app/commands/decidim/participatory_processes/admin/reorder_participatory_process_steps.rb
135
133
  - app/commands/decidim/participatory_processes/admin/update_participatory_process.rb
136
134
  - app/commands/decidim/participatory_processes/admin/update_participatory_process_group.rb
137
135
  - app/commands/decidim/participatory_processes/admin/update_participatory_process_step.rb
138
- - app/commands/decidim/participatory_processes/admin/update_participatory_process_type.rb
139
136
  - app/constraints/decidim/participatory_processes/current_component.rb
140
137
  - app/constraints/decidim/participatory_processes/current_participatory_process.rb
141
138
  - app/controllers/concerns/decidim/participatory_processes/admin/filterable.rb
142
139
  - app/controllers/decidim/participatory_processes/admin/application_controller.rb
143
- - app/controllers/decidim/participatory_processes/admin/categories_controller.rb
144
140
  - app/controllers/decidim/participatory_processes/admin/component_permissions_controller.rb
141
+ - app/controllers/decidim/participatory_processes/admin/component_share_tokens_controller.rb
145
142
  - app/controllers/decidim/participatory_processes/admin/components_controller.rb
146
143
  - app/controllers/decidim/participatory_processes/admin/concerns/participatory_process_admin.rb
147
144
  - app/controllers/decidim/participatory_processes/admin/exports_controller.rb
@@ -159,10 +156,10 @@ files:
159
156
  - app/controllers/decidim/participatory_processes/admin/participatory_process_landing_page_content_blocks_controller.rb
160
157
  - app/controllers/decidim/participatory_processes/admin/participatory_process_landing_page_controller.rb
161
158
  - app/controllers/decidim/participatory_processes/admin/participatory_process_publications_controller.rb
159
+ - app/controllers/decidim/participatory_processes/admin/participatory_process_share_tokens_controller.rb
162
160
  - app/controllers/decidim/participatory_processes/admin/participatory_process_step_activations_controller.rb
163
161
  - app/controllers/decidim/participatory_processes/admin/participatory_process_step_ordering_controller.rb
164
162
  - app/controllers/decidim/participatory_processes/admin/participatory_process_steps_controller.rb
165
- - app/controllers/decidim/participatory_processes/admin/participatory_process_types_controller.rb
166
163
  - app/controllers/decidim/participatory_processes/admin/participatory_process_user_roles_controller.rb
167
164
  - app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb
168
165
  - app/controllers/decidim/participatory_processes/admin/participatory_space_private_users_controller.rb
@@ -171,6 +168,7 @@ files:
171
168
  - app/controllers/decidim/participatory_processes/application_controller.rb
172
169
  - app/controllers/decidim/participatory_processes/participatory_process_groups_controller.rb
173
170
  - app/controllers/decidim/participatory_processes/participatory_processes_controller.rb
171
+ - app/controllers/decidim/participatory_processes/participatory_space_private_users_controller.rb
174
172
  - app/events/decidim/participatory_process_role_assigned_event.rb
175
173
  - app/events/decidim/participatory_process_step_activated_event.rb
176
174
  - app/events/decidim/participatory_process_step_changed_event.rb
@@ -179,9 +177,7 @@ files:
179
177
  - app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb
180
178
  - app/forms/decidim/participatory_processes/admin/participatory_process_import_form.rb
181
179
  - app/forms/decidim/participatory_processes/admin/participatory_process_step_form.rb
182
- - app/forms/decidim/participatory_processes/admin/participatory_process_type_form.rb
183
180
  - app/forms/decidim/participatory_processes/admin/participatory_process_user_role_form.rb
184
- - app/helpers/decidim/participatory_processes/admin/participatory_process_helper.rb
185
181
  - app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
186
182
  - app/helpers/decidim/participatory_processes/admin/processes_for_select_helper.rb
187
183
  - app/helpers/decidim/participatory_processes/application_helper.rb
@@ -195,9 +191,7 @@ files:
195
191
  - app/models/decidim/participatory_process_type.rb
196
192
  - app/models/decidim/participatory_process_user_role.rb
197
193
  - app/packs/entrypoints/decidim_participatory_processes.js
198
- - app/packs/entrypoints/decidim_participatory_processes_admin.js
199
194
  - app/packs/images/decidim/participatory_processes/decidim_participatory_processes.svg
200
- - app/packs/src/decidim/participatory_processes/admin/participatory_processes.js
201
195
  - app/permissions/decidim/participatory_processes/permissions.rb
202
196
  - app/presenters/decidim/log/value_types/participatory_process_type_presenter.rb
203
197
  - app/presenters/decidim/participatory_processes/admin_log/participatory_process_group_presenter.rb
@@ -235,6 +229,7 @@ files:
235
229
  - app/queries/decidim/participatory_processes/stats_participants_count.rb
236
230
  - app/queries/decidim/participatory_processes/visible_participatory_process_groups.rb
237
231
  - app/queries/decidim/participatory_processes/visible_participatory_processes.rb
232
+ - app/serializers/decidim/participatory_processes/open_data_participatory_process_serializer.rb
238
233
  - app/serializers/decidim/participatory_processes/participatory_process_importer.rb
239
234
  - app/serializers/decidim/participatory_processes/participatory_process_serializer.rb
240
235
  - app/views/decidim/participatory_process_groups/_participatory_process_group.html.erb
@@ -252,17 +247,16 @@ files:
252
247
  - app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb
253
248
  - app/views/decidim/participatory_processes/admin/participatory_process_steps/new.html.erb
254
249
  - app/views/decidim/participatory_processes/admin/participatory_process_steps/show.html.erb
255
- - app/views/decidim/participatory_processes/admin/participatory_process_types/_form.html.erb
256
- - app/views/decidim/participatory_processes/admin/participatory_process_types/edit.html.erb
257
- - app/views/decidim/participatory_processes/admin/participatory_process_types/index.html.erb
258
- - app/views/decidim/participatory_processes/admin/participatory_process_types/new.html.erb
259
250
  - app/views/decidim/participatory_processes/admin/participatory_process_user_roles/_form.html.erb
260
251
  - app/views/decidim/participatory_processes/admin/participatory_process_user_roles/edit.html.erb
261
252
  - app/views/decidim/participatory_processes/admin/participatory_process_user_roles/index.html.erb
262
253
  - app/views/decidim/participatory_processes/admin/participatory_process_user_roles/new.html.erb
263
254
  - app/views/decidim/participatory_processes/admin/participatory_processes/_form.html.erb
255
+ - app/views/decidim/participatory_processes/admin/participatory_processes/_process_row.html.erb
256
+ - app/views/decidim/participatory_processes/admin/participatory_processes/_processes_thead.html.erb
264
257
  - app/views/decidim/participatory_processes/admin/participatory_processes/edit.html.erb
265
258
  - app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb
259
+ - app/views/decidim/participatory_processes/admin/participatory_processes/manage_trash.html.erb
266
260
  - app/views/decidim/participatory_processes/admin/participatory_processes/new.html.erb
267
261
  - app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb
268
262
  - app/views/decidim/participatory_processes/participatory_process_groups/show.js.erb
@@ -271,6 +265,7 @@ files:
271
265
  - app/views/decidim/participatory_processes/participatory_processes/index.html.erb
272
266
  - app/views/decidim/participatory_processes/participatory_processes/index.js.erb
273
267
  - app/views/decidim/participatory_processes/participatory_processes/show.html.erb
268
+ - app/views/decidim/participatory_processes/participatory_space_private_users/index.html.erb
274
269
  - app/views/layouts/decidim/_process_nav_item.html.erb
275
270
  - app/views/layouts/decidim/admin/_manage_processes.html.erb
276
271
  - app/views/layouts/decidim/admin/participatory_process.html.erb
@@ -410,6 +405,10 @@ files:
410
405
  - db/migrate/20211125202008_create_decidim_participatory_process_types.rb
411
406
  - db/migrate/20220315100140_change_steps_dates_to_datetime.rb
412
407
  - db/migrate/20240529161054_add_link_to_decidim_attachments.rb
408
+ - db/migrate/20240822161355_add_deleted_at_to_decidim_participatory_processes.rb
409
+ - db/migrate/20241108141423_remove_column_show_metrics_from_participatory_processes.rb
410
+ - db/migrate/20241108141514_remove_column_banner_image_from_participatory_processes.rb
411
+ - db/migrate/20241108141605_remove_column_show_statistics_from_participatory_processes.rb
413
412
  - decidim-participatory_processes.gemspec
414
413
  - lib/decidim/api/participatory_process_group_type.rb
415
414
  - lib/decidim/api/participatory_process_input_filter.rb
@@ -447,14 +446,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
447
446
  requirements:
448
447
  - - "~>"
449
448
  - !ruby/object:Gem::Version
450
- version: 3.2.0
449
+ version: 3.3.0
451
450
  required_rubygems_version: !ruby/object:Gem::Requirement
452
451
  requirements:
453
452
  - - ">="
454
453
  - !ruby/object:Gem::Version
455
454
  version: '0'
456
455
  requirements: []
457
- rubygems_version: 3.4.10
456
+ rubygems_version: 3.5.11
458
457
  signing_key:
459
458
  specification_version: 4
460
459
  summary: Decidim participatory processes module
@@ -1,17 +0,0 @@
1
- <div id="process-type-filter">
2
- <div id="inline-filter-sort" class="dropdown-pane" data-position="bottom" data-alignment="right" data-dropdown data-auto-focus="true">
3
- <ul>
4
- <% participatory_process_types_for_select.each do |title, id| %>
5
- <li>
6
- <%= link_to filter_link(current_filter, id), remote: true do %>
7
- <%= title %>
8
- <% end %>
9
- </li>
10
- <% end %>
11
- </ul>
12
- </div>
13
- <label>
14
- <span><%= filter_type_label %></span>
15
- <button id="button-text" data-toggle="inline-filter-sort"><%= current_type_filter_name %></button>
16
- </label>
17
- </div>
@@ -1,17 +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 creating a new participatory
7
- # process type in the system.
8
- class CreateParticipatoryProcessType < Decidim::Commands::CreateResource
9
- fetch_form_attributes :title, :organization
10
-
11
- protected
12
-
13
- def resource_class = Decidim::ParticipatoryProcessType
14
- end
15
- end
16
- end
17
- end
@@ -1,13 +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 updating a participatory
7
- # process type in the system.
8
- class UpdateParticipatoryProcessType < Decidim::Commands::UpdateResource
9
- fetch_form_attributes :title
10
- end
11
- end
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module ParticipatoryProcesses
5
- module Admin
6
- # Controller that allows managing categories for participatory processes.
7
- #
8
- class CategoriesController < Decidim::Admin::CategoriesController
9
- include Concerns::ParticipatoryProcessAdmin
10
- end
11
- end
12
- end
13
- end
@@ -1,117 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module ParticipatoryProcesses
5
- module Admin
6
- # Controller used to manage participatory process types for the current
7
- # organization
8
- class ParticipatoryProcessTypesController < Decidim::ParticipatoryProcesses::Admin::ApplicationController
9
- include Decidim::TranslatableAttributes
10
- before_action :set_controller_breadcrumb
11
-
12
- helper_method :collection, :current_participatory_process_type
13
- layout "decidim/admin/participatory_process_type"
14
-
15
- # GET /admin/participatory_process_types
16
- def index
17
- enforce_permission_to :index, :participatory_process_type
18
- end
19
-
20
- # GET /admin/participatory_process_types/new
21
- def new
22
- enforce_permission_to :create, :participatory_process_type
23
- @form = participatory_process_type_form.instance
24
- end
25
-
26
- # POST /admin/participatory_process_types
27
- def create
28
- enforce_permission_to :create, :participatory_process_type
29
- @form = participatory_process_type_form.from_params(params)
30
-
31
- CreateParticipatoryProcessType.call(@form) do
32
- on(:ok) do |_process_type|
33
- flash[:notice] = I18n.t("participatory_process_types.create.success", scope: "decidim.admin")
34
- redirect_to participatory_process_types_path
35
- end
36
-
37
- on(:invalid) do
38
- flash.now[:alert] = I18n.t("participatory_process_types.create.error", scope: "decidim.admin")
39
- render :new
40
- end
41
- end
42
- end
43
-
44
- # GET /admin/participatory_process_types/:id/edit
45
- def edit
46
- enforce_permission_to :edit, :participatory_process_type, participatory_process_type: current_participatory_process_type
47
- @form = participatory_process_type_form.from_model(
48
- current_participatory_process_type,
49
- participatory_process_type: current_participatory_process_type
50
- )
51
- end
52
-
53
- # PUT /admin/participatory_process_types/:id
54
- def update
55
- enforce_permission_to :update, :participatory_process_type, participatory_process_type: current_participatory_process_type
56
-
57
- @form = participatory_process_type_form
58
- .from_params(params, participatory_process_type: current_participatory_process_type)
59
-
60
- UpdateParticipatoryProcessType.call(@form, current_participatory_process_type) do
61
- on(:ok) do
62
- flash[:notice] = I18n.t("participatory_process_types.update.success", scope: "decidim.admin")
63
- redirect_to participatory_process_types_path
64
- end
65
-
66
- on(:invalid) do
67
- flash.now[:alert] = I18n.t("participatory_process_types.update.error", scope: "decidim.admin")
68
- render :edit
69
- end
70
- end
71
- end
72
-
73
- # DELETE /admin/participatory_process_types/:id
74
- def destroy
75
- enforce_permission_to :destroy, :participatory_process_type, participatory_process_type: current_participatory_process_type
76
-
77
- Decidim::Commands::DestroyResource.call(current_participatory_process_type, current_user) do
78
- on(:ok) do
79
- flash[:notice] = I18n.t("participatory_process_types.destroy.success", scope: "decidim.admin")
80
- redirect_to participatory_process_types_path
81
- end
82
- end
83
- end
84
-
85
- private
86
-
87
- def set_controller_breadcrumb
88
- controller_breadcrumb_items << {
89
- label: t("participatory_process_types", scope: "decidim.admin.menu"),
90
- url: participatory_process_types_path,
91
- active: false
92
- }
93
-
94
- return if params[:id].blank?
95
-
96
- controller_breadcrumb_items << {
97
- label: translated_attribute(current_participatory_process_type.title),
98
- url: edit_participatory_process_type_path(current_participatory_process_type),
99
- active: true
100
- }
101
- end
102
-
103
- def participatory_process_type_form
104
- form(Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessTypeForm)
105
- end
106
-
107
- def current_participatory_process_type
108
- @current_participatory_process_type ||= collection.find(params[:id])
109
- end
110
-
111
- def collection
112
- @collection ||= Decidim::ParticipatoryProcessType.where(organization: current_organization)
113
- end
114
- end
115
- end
116
- end
117
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module ParticipatoryProcesses
5
- module Admin
6
- # A form object used to create participatory process types from the admin
7
- # dashboard.
8
- #
9
- class ParticipatoryProcessTypeForm < Form
10
- include TranslatableAttributes
11
-
12
- mimic :participatory_process_type
13
-
14
- translatable_attribute :title, String
15
-
16
- validates :title, translatable_presence: true
17
- end
18
- end
19
- end
20
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module ParticipatoryProcesses
5
- module Admin
6
- # Helpers related to the Admin of Participatory Process layout.
7
- module ParticipatoryProcessHelper
8
- def scope_type_depth_select_options
9
- {
10
- include_blank: true,
11
- help_text: t("scope_type_max_depth_help", scope: "decidim.participatory_processes.admin.participatory_processes.form"),
12
- selected: current_participatory_process.try(:decidim_scope_type_id)
13
- }
14
- end
15
-
16
- def scope_type_depth_select_html_options
17
- html_options = {}
18
- html_options[:disabled] = "disabled" unless current_participatory_process.try(:scopes_enabled)
19
- html_options
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1 +0,0 @@
1
- import "src/decidim/participatory_processes/admin/participatory_processes"
@@ -1,18 +0,0 @@
1
- $(() => {
2
- const $participatoryProcessScopeEnabled = $("#participatory_process_scopes_enabled");
3
- const $participatoryProcessScopeId = $("#participatory_process_scope_id");
4
- const $participatoryProcessScopeTypeId = $("#participatory_process_scope_type_max_depth_id");
5
-
6
- if ($(".edit_participatory_process, .new_participatory_process").length > 0) {
7
- $participatoryProcessScopeEnabled.on("change", (event) => {
8
- const checked = event.target.checked;
9
- $participatoryProcessScopeId.attr("disabled", !checked);
10
- if (checked === true) {
11
- $participatoryProcessScopeTypeId.removeAttr("disabled");
12
- } else {
13
- $participatoryProcessScopeTypeId.attr("disabled", true)
14
- }
15
- $participatoryProcessScopeId.attr("disabled", !$participatoryProcessScopeEnabled.prop("checked"));
16
- })
17
- }
18
- });
@@ -1,9 +0,0 @@
1
- <div class="form__wrapper">
2
- <div class="card pt-4">
3
- <div class="card-section">
4
- <div class="row column">
5
- <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
6
- </div>
7
- </div>
8
- </div>
9
- </div>
@@ -1,18 +0,0 @@
1
- <% add_decidim_page_title t("participatory_process_types.edit.title", scope: "decidim.admin") %>
2
- <div class="item_show__header">
3
- <h1 class="item_show__header-title">
4
- <%= t("participatory_process_types.edit.title", scope: "decidim.admin") %>
5
- </h1>
6
- </div>
7
- <div class="item__edit item__edit-1col">
8
- <div class="item__edit-form">
9
- <%= decidim_form_for(@form, html: { class: "form-defaults form edit_participatory_process_type" }) do |f| %>
10
- <%= render partial: "form", object: f %>
11
- <div class="item__edit-sticky">
12
- <div class="item__edit-sticky-container">
13
- <%= f.submit t("participatory_process_types.edit.update", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
14
- </div>
15
- </div>
16
- <% end %>
17
- </div>
18
- </div>
@@ -1,58 +0,0 @@
1
- <% add_decidim_page_title(t("titles.participatory_process_types", scope: "decidim.admin")) %>
2
- <div class="card" id="participatory-process-types">
3
- <div class="item_show__header">
4
- <h1 class="item_show__header-title">
5
- <%= t("titles.participatory_process_types", scope: "decidim.admin") %>
6
- <%= link_to(
7
- t("actions.new_process_type", scope: "decidim.admin"),
8
- [:new, :participatory_process_type],
9
- class: "button button__sm button__secondary"
10
- ) if allowed_to? :create, :participatory_process_type %>
11
- </h1>
12
- </div>
13
- <div class="table-scroll">
14
- <table class="table-list">
15
- <thead>
16
- <tr>
17
- <th><%= t("models.participatory_process_type.fields.title", scope: "decidim.admin") %></th>
18
- <th><%= t("models.participatory_process_type.fields.created_at", scope: "decidim.admin") %></th>
19
- <th></th>
20
- </tr>
21
- </thead>
22
- <tbody>
23
- <% collection.each do |participatory_process_type| %>
24
- <tr>
25
- <td>
26
- <% if allowed_to?(:update, :participatory_process_type, participatory_process_type: participatory_process_type) %>
27
- <%= link_to translated_attribute(participatory_process_type.title), edit_participatory_process_type_path(participatory_process_type) %>
28
- <% else %>
29
- <%= translated_attribute(participatory_process_type.title) %>
30
- <% end %>
31
- </td>
32
- <td><%= l(participatory_process_type.created_at, format: :short) %></td>
33
- <td class="table-list__actions">
34
- <% if allowed_to?(:update, :participatory_process_type, participatory_process_type: participatory_process_type) %>
35
- <%= icon_link_to(
36
- "pencil-line",
37
- edit_participatory_process_type_path(participatory_process_type),
38
- t("actions.edit", scope: "decidim.admin"),
39
- class: "action-icon--new"
40
- ) %>
41
- <% end %>
42
- <% if allowed_to?(:destroy, :participatory_process_type, participatory_process_type: participatory_process_type) %>
43
- <%= icon_link_to(
44
- "delete-bin-line",
45
- participatory_process_type_path(participatory_process_type),
46
- t("actions.destroy", scope: "decidim.admin"),
47
- class: "action-icon--remove",
48
- method: :delete,
49
- data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") }
50
- ) %>
51
- <% end %>
52
- </td>
53
- </tr>
54
- <% end %>
55
- </tbody>
56
- </table>
57
- </div>
58
- </div>