decidim-participatory_processes 0.27.4 → 0.27.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/filters.erb +1 -1
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes_cell.rb +1 -1
- data/app/cells/decidim/participatory_process_groups/content_blocks/title/show.erb +1 -1
- data/app/cells/decidim/participatory_process_groups/process_filters_cell.rb +1 -1
- data/app/cells/decidim/participatory_processes/process_filters_cell.rb +2 -2
- data/app/cells/decidim/participatory_processes/process_group_m_cell.rb +1 -1
- data/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +1 -1
- data/app/controllers/decidim/participatory_processes/widgets_controller.rb +12 -2
- data/app/models/decidim/participatory_process.rb +1 -1
- data/app/permissions/decidim/participatory_processes/permissions.rb +12 -0
- data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process_group.html.erb +1 -1
- data/config/locales/ar.yml +9 -7
- data/config/locales/bg.yml +66 -0
- data/config/locales/ca.yml +6 -6
- data/config/locales/cs.yml +8 -8
- data/config/locales/de.yml +14 -10
- data/config/locales/el.yml +0 -6
- data/config/locales/es-MX.yml +7 -3
- data/config/locales/es-PY.yml +7 -3
- data/config/locales/es.yml +3 -3
- data/config/locales/eu.yml +159 -112
- data/config/locales/fi-plain.yml +9 -5
- data/config/locales/fi.yml +10 -6
- data/config/locales/fr-CA.yml +9 -5
- data/config/locales/fr.yml +8 -7
- data/config/locales/ga-IE.yml +3 -0
- data/config/locales/gl.yml +5 -7
- data/config/locales/he-IL.yml +1 -0
- data/config/locales/hu.yml +2 -8
- data/config/locales/id-ID.yml +9 -7
- data/config/locales/is-IS.yml +8 -4
- data/config/locales/it.yml +5 -8
- data/config/locales/ja.yml +11 -7
- data/config/locales/lb.yml +109 -2
- data/config/locales/lt.yml +17 -6
- data/config/locales/lv.yml +10 -7
- data/config/locales/nl.yml +4 -7
- data/config/locales/no.yml +31 -9
- data/config/locales/pl.yml +36 -5
- data/config/locales/pt-BR.yml +45 -7
- data/config/locales/pt.yml +6 -9
- data/config/locales/ro-RO.yml +0 -6
- data/config/locales/ru.yml +9 -5
- data/config/locales/sk.yml +10 -8
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/sr-CS.yml +4 -0
- data/config/locales/sv.yml +3 -7
- data/config/locales/th-TH.yml +1 -0
- data/config/locales/tr-TR.yml +7 -9
- data/config/locales/uk.yml +9 -5
- data/config/locales/zh-CN.yml +8 -7
- data/config/locales/zh-TW.yml +0 -6
- data/decidim-participatory_processes.gemspec +31 -0
- data/lib/decidim/participatory_processes/admin_engine.rb +1 -1
- data/lib/decidim/participatory_processes/test/factories.rb +59 -36
- data/lib/decidim/participatory_processes/version.rb +1 -1
- metadata +19 -16
- data/config/environment.rb +0 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
4
|
+
|
5
|
+
require "decidim/participatory_processes/version"
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.version = Decidim::ParticipatoryProcesses.version
|
9
|
+
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
|
10
|
+
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
|
11
|
+
s.license = "AGPL-3.0"
|
12
|
+
s.homepage = "https://github.com/decidim/decidim"
|
13
|
+
s.required_ruby_version = "~> 3.0.0"
|
14
|
+
|
15
|
+
s.name = "decidim-participatory_processes"
|
16
|
+
s.summary = "Decidim participatory processes module"
|
17
|
+
s.description = "Participatory processes component for decidim."
|
18
|
+
|
19
|
+
s.files = Dir.chdir(__dir__) do
|
20
|
+
`git ls-files -z`.split("\x0").select do |f|
|
21
|
+
(File.expand_path(f) == __FILE__) ||
|
22
|
+
f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
s.add_dependency "decidim-core", Decidim::ParticipatoryProcesses.version
|
27
|
+
|
28
|
+
s.add_development_dependency "decidim-admin", Decidim::ParticipatoryProcesses.version
|
29
|
+
s.add_development_dependency "decidim-dev", Decidim::ParticipatoryProcesses.version
|
30
|
+
s.add_development_dependency "decidim-meetings", Decidim::ParticipatoryProcesses.version
|
31
|
+
end
|
@@ -153,7 +153,7 @@ module Decidim
|
|
153
153
|
initializer "decidim_participatory_processes.admin_process_components_menu" do
|
154
154
|
Decidim.menu :admin_participatory_process_components_menu do |menu|
|
155
155
|
current_participatory_space.components.each do |component|
|
156
|
-
caption =
|
156
|
+
caption = decidim_escape_translated(component.name)
|
157
157
|
if component.primary_stat.present?
|
158
158
|
caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter")
|
159
159
|
end
|
@@ -11,23 +11,26 @@ FactoryBot.define do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
factory :participatory_process, class: "Decidim::ParticipatoryProcess" do
|
14
|
-
|
14
|
+
transient do
|
15
|
+
skip_injection { false }
|
16
|
+
end
|
17
|
+
title { generate_localized_title(:participatory_process_title, skip_injection: skip_injection) }
|
15
18
|
slug { generate(:participatory_process_slug) }
|
16
|
-
subtitle { generate_localized_title }
|
19
|
+
subtitle { generate_localized_title(:participatory_process_subtitle, skip_injection: skip_injection) }
|
17
20
|
weight { 1 }
|
18
|
-
short_description {
|
19
|
-
description {
|
21
|
+
short_description { generate_localized_description(:participatory_process_short_description, skip_injection: skip_injection) }
|
22
|
+
description { generate_localized_description(:participatory_process_description, skip_injection: skip_injection) }
|
20
23
|
organization
|
21
24
|
hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") } # Keep after organization
|
22
25
|
banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") } # Keep after organization
|
23
26
|
published_at { Time.current }
|
24
|
-
meta_scope {
|
25
|
-
developer_group { generate_localized_title }
|
26
|
-
local_area { generate_localized_title }
|
27
|
-
target { generate_localized_title }
|
28
|
-
participatory_scope { generate_localized_title }
|
29
|
-
participatory_structure { generate_localized_title }
|
30
|
-
announcement { generate_localized_title }
|
27
|
+
meta_scope { generate_localized_word(:participatory_process_meta_scope, skip_injection: skip_injection) }
|
28
|
+
developer_group { generate_localized_title(:participatory_process_developer_group, skip_injection: skip_injection) }
|
29
|
+
local_area { generate_localized_title(:participatory_process_local_area, skip_injection: skip_injection) }
|
30
|
+
target { generate_localized_title(:participatory_process_target, skip_injection: skip_injection) }
|
31
|
+
participatory_scope { generate_localized_title(:participatory_process_participatory_scope, skip_injection: skip_injection) }
|
32
|
+
participatory_structure { generate_localized_title(:participatory_process_participatory_structure, skip_injection: skip_injection) }
|
33
|
+
announcement { generate_localized_title(:participatory_process_announcement, skip_injection: skip_injection) }
|
31
34
|
show_metrics { true }
|
32
35
|
show_statistics { true }
|
33
36
|
private_space { false }
|
@@ -58,6 +61,7 @@ FactoryBot.define do
|
|
58
61
|
create(:participatory_process_step,
|
59
62
|
active: true,
|
60
63
|
end_date: evaluator.current_step_ends,
|
64
|
+
skip_injection: evaluator.skip_injection,
|
61
65
|
participatory_process: participatory_process)
|
62
66
|
participatory_process.reload
|
63
67
|
participatory_process.steps.reload
|
@@ -86,33 +90,40 @@ FactoryBot.define do
|
|
86
90
|
end
|
87
91
|
|
88
92
|
factory :participatory_process_group, class: "Decidim::ParticipatoryProcessGroup" do
|
89
|
-
|
90
|
-
|
93
|
+
transient do
|
94
|
+
skip_injection { false }
|
95
|
+
end
|
96
|
+
title { generate_localized_title(:participatory_process_group_title, skip_injection: skip_injection) }
|
97
|
+
description { generate_localized_description(:participatory_process_group_description, skip_injection: skip_injection) }
|
91
98
|
hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
|
92
99
|
organization
|
93
100
|
hashtag { Faker::Internet.slug }
|
94
101
|
group_url { Faker::Internet.url }
|
95
|
-
developer_group { generate_localized_title }
|
96
|
-
local_area { generate_localized_title }
|
102
|
+
developer_group { generate_localized_title(:participatory_process_group_developer_group, skip_injection: skip_injection) }
|
103
|
+
local_area { generate_localized_title(:participatory_process_group_local_area, skip_injection: skip_injection) }
|
97
104
|
meta_scope { Decidim::Faker::Localized.word }
|
98
|
-
target { generate_localized_title }
|
99
|
-
participatory_scope { generate_localized_title }
|
100
|
-
participatory_structure { generate_localized_title }
|
105
|
+
target { generate_localized_title(:participatory_process_group_target, skip_injection: skip_injection) }
|
106
|
+
participatory_scope { generate_localized_title(:participatory_process_group_participatory_scope, skip_injection: skip_injection) }
|
107
|
+
participatory_structure { generate_localized_title(:participatory_process_group_participatory_structure, skip_injection: skip_injection) }
|
101
108
|
|
102
109
|
trait :promoted do
|
103
110
|
promoted { true }
|
104
111
|
end
|
105
112
|
|
106
113
|
trait :with_participatory_processes do
|
107
|
-
after(:create) do |participatory_process_group|
|
108
|
-
create_list(:participatory_process, 2, :published, organization: participatory_process_group.organization, participatory_process_group: participatory_process_group
|
114
|
+
after(:create) do |participatory_process_group, evaluator|
|
115
|
+
create_list(:participatory_process, 2, :published, organization: participatory_process_group.organization, participatory_process_group: participatory_process_group,
|
116
|
+
skip_injection: evaluator.skip_injection)
|
109
117
|
end
|
110
118
|
end
|
111
119
|
end
|
112
120
|
|
113
121
|
factory :participatory_process_step, class: "Decidim::ParticipatoryProcessStep" do
|
114
|
-
|
115
|
-
|
122
|
+
transient do
|
123
|
+
skip_injection { false }
|
124
|
+
end
|
125
|
+
title { generate_localized_title(:participatory_process_step_title, skip_injection: skip_injection) }
|
126
|
+
description { generate_localized_description(:participatory_process_step_description, skip_injection: skip_injection) }
|
116
127
|
start_date { 1.month.ago }
|
117
128
|
end_date { 2.months.from_now }
|
118
129
|
position { nil }
|
@@ -129,25 +140,31 @@ FactoryBot.define do
|
|
129
140
|
end
|
130
141
|
|
131
142
|
factory :participatory_process_type, class: "Decidim::ParticipatoryProcessType" do
|
132
|
-
|
143
|
+
transient do
|
144
|
+
skip_injection { false }
|
145
|
+
end
|
146
|
+
title { generate_localized_title(:participatory_process_type_title, skip_injection: skip_injection) }
|
133
147
|
organization
|
134
148
|
|
135
149
|
trait :with_active_participatory_processes do
|
136
|
-
after(:create) do |participatory_process_type|
|
137
|
-
create_list(:participatory_process, 2, :active, :published, organization: participatory_process_type.organization, participatory_process_type: participatory_process_type
|
150
|
+
after(:create) do |participatory_process_type, evaluator|
|
151
|
+
create_list(:participatory_process, 2, :active, :published, organization: participatory_process_type.organization, participatory_process_type: participatory_process_type,
|
152
|
+
skip_injection: evaluator.skip_injection)
|
138
153
|
end
|
139
154
|
end
|
140
155
|
|
141
156
|
trait :with_past_participatory_processes do
|
142
|
-
after(:create) do |participatory_process_type|
|
143
|
-
create_list(:participatory_process, 2, :past, :published, organization: participatory_process_type.organization, participatory_process_type: participatory_process_type
|
157
|
+
after(:create) do |participatory_process_type, evaluator|
|
158
|
+
create_list(:participatory_process, 2, :past, :published, organization: participatory_process_type.organization, participatory_process_type: participatory_process_type,
|
159
|
+
skip_injection: evaluator.skip_injection)
|
144
160
|
end
|
145
161
|
end
|
146
162
|
end
|
147
163
|
|
148
164
|
factory :process_admin, parent: :user, class: "Decidim::User" do
|
149
165
|
transient do
|
150
|
-
|
166
|
+
skip_injection { false }
|
167
|
+
participatory_process { create(:participatory_process, skip_injection: skip_injection) }
|
151
168
|
end
|
152
169
|
|
153
170
|
organization { participatory_process.organization }
|
@@ -157,13 +174,14 @@ FactoryBot.define do
|
|
157
174
|
create :participatory_process_user_role,
|
158
175
|
user: user,
|
159
176
|
participatory_process: evaluator.participatory_process,
|
160
|
-
role: :admin
|
177
|
+
role: :admin, skip_injection: evaluator.skip_injection
|
161
178
|
end
|
162
179
|
end
|
163
180
|
|
164
181
|
factory :process_collaborator, parent: :user, class: "Decidim::User" do
|
165
182
|
transient do
|
166
|
-
|
183
|
+
skip_injection { false }
|
184
|
+
participatory_process { create(:participatory_process, skip_injection: skip_injection) }
|
167
185
|
end
|
168
186
|
|
169
187
|
organization { participatory_process.organization }
|
@@ -173,13 +191,14 @@ FactoryBot.define do
|
|
173
191
|
create :participatory_process_user_role,
|
174
192
|
user: user,
|
175
193
|
participatory_process: evaluator.participatory_process,
|
176
|
-
role: :collaborator
|
194
|
+
role: :collaborator, skip_injection: evaluator.skip_injection
|
177
195
|
end
|
178
196
|
end
|
179
197
|
|
180
198
|
factory :process_moderator, parent: :user, class: "Decidim::User" do
|
181
199
|
transient do
|
182
|
-
|
200
|
+
skip_injection { false }
|
201
|
+
participatory_process { create(:participatory_process, skip_injection: skip_injection) }
|
183
202
|
end
|
184
203
|
|
185
204
|
organization { participatory_process.organization }
|
@@ -189,13 +208,14 @@ FactoryBot.define do
|
|
189
208
|
create :participatory_process_user_role,
|
190
209
|
user: user,
|
191
210
|
participatory_process: evaluator.participatory_process,
|
192
|
-
role: :moderator
|
211
|
+
role: :moderator, skip_injection: evaluator.skip_injection
|
193
212
|
end
|
194
213
|
end
|
195
214
|
|
196
215
|
factory :process_valuator, parent: :user, class: "Decidim::User" do
|
197
216
|
transient do
|
198
|
-
|
217
|
+
skip_injection { false }
|
218
|
+
participatory_process { create(:participatory_process, skip_injection: skip_injection) }
|
199
219
|
end
|
200
220
|
|
201
221
|
organization { participatory_process.organization }
|
@@ -205,13 +225,16 @@ FactoryBot.define do
|
|
205
225
|
create :participatory_process_user_role,
|
206
226
|
user: user,
|
207
227
|
participatory_process: evaluator.participatory_process,
|
208
|
-
role: :valuator
|
228
|
+
role: :valuator, skip_injection: evaluator.skip_injection
|
209
229
|
end
|
210
230
|
end
|
211
231
|
|
212
232
|
factory :participatory_process_user_role, class: "Decidim::ParticipatoryProcessUserRole" do
|
233
|
+
transient do
|
234
|
+
skip_injection { false }
|
235
|
+
end
|
213
236
|
user
|
214
|
-
participatory_process { create :participatory_process, organization: user.organization }
|
237
|
+
participatory_process { create :participatory_process, organization: user.organization, skip_injection: skip_injection }
|
215
238
|
role { "admin" }
|
216
239
|
end
|
217
240
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-participatory_processes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
8
8
|
- Marc Riera Casals
|
9
9
|
- Oriol Gual Oliva
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-04-30 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.27.
|
21
|
+
version: 0.27.6
|
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.27.
|
28
|
+
version: 0.27.6
|
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.27.
|
35
|
+
version: 0.27.6
|
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.27.
|
42
|
+
version: 0.27.6
|
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.27.
|
49
|
+
version: 0.27.6
|
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.27.
|
56
|
+
version: 0.27.6
|
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.27.
|
63
|
+
version: 0.27.6
|
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.27.
|
70
|
+
version: 0.27.6
|
71
71
|
description: Participatory processes component for decidim.
|
72
72
|
email:
|
73
73
|
- josepjaume@gmail.com
|
@@ -294,7 +294,6 @@ files:
|
|
294
294
|
- app/views/layouts/decidim/admin/participatory_processes.html.erb
|
295
295
|
- app/views/layouts/decidim/participatory_process.html.erb
|
296
296
|
- config/assets.rb
|
297
|
-
- config/environment.rb
|
298
297
|
- config/locales/am-ET.yml
|
299
298
|
- config/locales/ar-SA.yml
|
300
299
|
- config/locales/ar.yml
|
@@ -327,6 +326,7 @@ files:
|
|
327
326
|
- config/locales/ga-IE.yml
|
328
327
|
- config/locales/gl.yml
|
329
328
|
- config/locales/gn-PY.yml
|
329
|
+
- config/locales/he-IL.yml
|
330
330
|
- config/locales/hr-HR.yml
|
331
331
|
- config/locales/hr.yml
|
332
332
|
- config/locales/hu.yml
|
@@ -361,9 +361,11 @@ files:
|
|
361
361
|
- config/locales/sk.yml
|
362
362
|
- config/locales/sl.yml
|
363
363
|
- config/locales/so-SO.yml
|
364
|
+
- config/locales/sq-AL.yml
|
364
365
|
- config/locales/sr-CS.yml
|
365
366
|
- config/locales/sv.yml
|
366
367
|
- config/locales/sw-KE.yml
|
368
|
+
- config/locales/th-TH.yml
|
367
369
|
- config/locales/ti-ER.yml
|
368
370
|
- config/locales/tr-TR.yml
|
369
371
|
- config/locales/uk.yml
|
@@ -423,6 +425,7 @@ files:
|
|
423
425
|
- db/seeds/city.jpeg
|
424
426
|
- db/seeds/city2.jpeg
|
425
427
|
- db/seeds/homepage_image.jpg
|
428
|
+
- decidim-participatory_processes.gemspec
|
426
429
|
- lib/decidim/api/participatory_process_group_type.rb
|
427
430
|
- lib/decidim/api/participatory_process_input_filter.rb
|
428
431
|
- lib/decidim/api/participatory_process_input_sort.rb
|
@@ -442,15 +445,15 @@ homepage: https://github.com/decidim/decidim
|
|
442
445
|
licenses:
|
443
446
|
- AGPL-3.0
|
444
447
|
metadata: {}
|
445
|
-
post_install_message:
|
448
|
+
post_install_message:
|
446
449
|
rdoc_options: []
|
447
450
|
require_paths:
|
448
451
|
- lib
|
449
452
|
required_ruby_version: !ruby/object:Gem::Requirement
|
450
453
|
requirements:
|
451
|
-
- - "
|
454
|
+
- - "~>"
|
452
455
|
- !ruby/object:Gem::Version
|
453
|
-
version:
|
456
|
+
version: 3.0.0
|
454
457
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
455
458
|
requirements:
|
456
459
|
- - ">="
|
@@ -458,7 +461,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
458
461
|
version: '0'
|
459
462
|
requirements: []
|
460
463
|
rubygems_version: 3.2.22
|
461
|
-
signing_key:
|
464
|
+
signing_key:
|
462
465
|
specification_version: 4
|
463
466
|
summary: Decidim participatory processes module
|
464
467
|
test_files: []
|
data/config/environment.rb
DELETED
File without changes
|