decidim-participatory_processes 0.26.10 → 0.27.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -4
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/filters.erb +3 -3
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/show.erb +1 -0
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes_cell.rb +6 -11
- data/app/cells/decidim/participatory_process_groups/content_blocks/title/show.erb +1 -1
- data/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb +1 -8
- data/app/cells/decidim/participatory_process_groups/process_filters_cell.rb +15 -18
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/show.erb +1 -1
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/single_process.erb +1 -1
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_cell.rb +1 -1
- data/app/cells/decidim/participatory_processes/filtered_participatory_processes_cell.rb +11 -7
- data/app/cells/decidim/participatory_processes/process_filters/show.erb +13 -9
- data/app/cells/decidim/participatory_processes/process_filters/type_filter.erb +17 -0
- data/app/cells/decidim/participatory_processes/process_filters_cell.rb +49 -21
- data/app/cells/decidim/participatory_processes/process_group_s/image.erb +1 -1
- data/app/cells/decidim/participatory_processes/process_s/image.erb +1 -1
- data/app/commands/decidim/participatory_processes/admin/activate_participatory_process_step.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/copy_participatory_process.rb +11 -8
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process.rb +2 -1
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_step.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_type.rb +47 -0
- data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_admin.rb +1 -6
- data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_group.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_step.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_type.rb +49 -0
- data/app/commands/decidim/participatory_processes/admin/import_participatory_process.rb +9 -6
- data/app/commands/decidim/participatory_processes/admin/notify_role_assigned_to_participatory_process.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/publish_participatory_process.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/reorder_participatory_process_steps.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/unpublish_participatory_process.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +2 -1
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_group.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_step.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_type.rb +49 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_copies_controller.rb +1 -1
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_groups_controller.rb +3 -2
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_types_controller.rb +98 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb +1 -1
- data/app/controllers/decidim/participatory_processes/admin/reminders_controller.rb +14 -0
- data/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +8 -7
- data/app/events/decidim/participatory_process_role_assigned_event.rb +1 -1
- data/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +16 -0
- data/app/forms/decidim/participatory_processes/admin/participatory_process_import_form.rb +5 -7
- data/app/forms/decidim/participatory_processes/admin/participatory_process_type_form.rb +20 -0
- data/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +2 -2
- data/app/models/decidim/participatory_process.rb +35 -6
- data/app/models/decidim/participatory_process_type.rb +27 -0
- data/app/permissions/decidim/participatory_processes/permissions.rb +14 -0
- data/app/presenters/decidim/log/value_types/participatory_process_type_presenter.rb +27 -0
- data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_presenter.rb +3 -2
- data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_type_presenter.rb +38 -0
- data/app/presenters/decidim/participatory_processes/participatory_process_group_stats_presenter.rb +4 -1
- data/app/presenters/decidim/participatory_processes/participatory_process_metric_charts_presenter.rb +5 -1
- data/app/presenters/decidim/participatory_processes/participatory_process_stats_presenter.rb +4 -1
- data/app/queries/decidim/participatory_processes/admin/admin_users.rb +1 -1
- data/app/queries/decidim/participatory_processes/admin/moderators.rb +1 -1
- data/app/queries/decidim/participatory_processes/filtered_participatory_process_groups.rb +3 -5
- data/app/queries/decidim/participatory_processes/filtered_participatory_processes.rb +1 -1
- data/app/queries/decidim/participatory_processes/group_participatory_processes.rb +1 -1
- data/app/queries/decidim/participatory_processes/group_published_participatory_processes.rb +2 -2
- data/app/queries/decidim/participatory_processes/highlighted_participatory_processes.rb +1 -1
- data/app/queries/decidim/participatory_processes/organization_participatory_process_groups.rb +1 -1
- data/app/queries/decidim/participatory_processes/organization_participatory_processes.rb +1 -1
- data/app/queries/decidim/participatory_processes/organization_prioritized_participatory_process_groups.rb +2 -2
- data/app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb +2 -2
- data/app/queries/decidim/participatory_processes/organization_promoted_participatory_process_groups.rb +1 -1
- data/app/queries/decidim/participatory_processes/organization_published_participatory_processes.rb +2 -2
- data/app/queries/decidim/participatory_processes/participatory_processes_by_group.rb +1 -1
- data/app/queries/decidim/participatory_processes/prioritized_participatory_processes.rb +1 -1
- data/app/queries/decidim/participatory_processes/promoted_participatory_process_groups.rb +1 -1
- data/app/queries/decidim/participatory_processes/promoted_participatory_processes.rb +1 -1
- data/app/queries/decidim/participatory_processes/published_participatory_processes.rb +1 -1
- data/app/queries/decidim/participatory_processes/stats_followers_count.rb +2 -2
- data/app/queries/decidim/participatory_processes/stats_participants_count.rb +2 -14
- data/app/queries/decidim/participatory_processes/visible_participatory_process_groups.rb +1 -1
- data/app/queries/decidim/participatory_processes/visible_participatory_processes.rb +1 -1
- data/app/serializers/decidim/participatory_processes/participatory_process_importer.rb +4 -15
- data/app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb +1 -1
- data/app/views/decidim/participatory_processes/admin/participatory_process_copies/new.html.erb +2 -1
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/_form.html.erb +1 -1
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/edit.html.erb +0 -1
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/index.html.erb +0 -1
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/new.html.erb +0 -1
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/_form.html.erb +1 -1
- data/app/views/decidim/participatory_processes/admin/participatory_process_types/_form.html.erb +11 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_types/edit.html.erb +9 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_types/index.html.erb +60 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_types/new.html.erb +9 -0
- data/app/views/decidim/participatory_processes/admin/participatory_processes/_form.html.erb +11 -1
- data/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb +1 -0
- data/app/views/decidim/participatory_processes/admin/participatory_processes/new.html.erb +1 -0
- data/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb +3 -1
- data/app/views/decidim/participatory_processes/participatory_process_groups/show.js.erb +9 -6
- data/app/views/decidim/participatory_processes/participatory_process_steps/index.html.erb +1 -0
- data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process.html.erb +1 -1
- data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process_group.html.erb +1 -1
- data/app/views/decidim/participatory_processes/participatory_processes/index.html.erb +3 -1
- data/app/views/decidim/participatory_processes/participatory_processes/index.js.erb +3 -1
- data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +2 -2
- data/app/views/layouts/decidim/_process_header.html.erb +1 -1
- data/app/views/layouts/decidim/admin/participatory_process_type.html.erb +15 -0
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +10 -13
- data/config/locales/bg.yml +1 -6
- data/config/locales/ca.yml +51 -16
- data/config/locales/cs.yml +62 -27
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +20 -32
- data/config/locales/el.yml +9 -69
- data/config/locales/en.yml +42 -8
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +46 -11
- data/config/locales/es-PY.yml +46 -11
- data/config/locales/es.yml +47 -12
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +121 -136
- data/config/locales/fi-plain.yml +48 -13
- data/config/locales/fi.yml +49 -14
- data/config/locales/fr-CA.yml +49 -14
- data/config/locales/fr.yml +51 -16
- data/config/locales/ga-IE.yml +1 -2
- data/config/locales/gl.yml +14 -10
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +60 -136
- data/config/locales/id-ID.yml +10 -13
- data/config/locales/is-IS.yml +16 -6
- data/config/locales/it.yml +20 -15
- data/config/locales/ja.yml +53 -18
- data/config/locales/ko.yml +1 -0
- data/config/locales/lb.yml +8 -10
- data/config/locales/lt.yml +1 -505
- data/config/locales/lv.yml +10 -19
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +16 -11
- data/config/locales/no.yml +36 -15
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +19 -8
- data/config/locales/pt-BR.yml +14 -11
- data/config/locales/pt.yml +15 -10
- data/config/locales/ro-RO.yml +11 -15
- data/config/locales/ru.yml +10 -10
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +11 -19
- data/config/locales/sl.yml +1 -3
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +1 -0
- data/config/locales/sv.yml +29 -13
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +15 -10
- data/config/locales/uk.yml +10 -10
- data/config/locales/val-ES.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +10 -18
- data/config/locales/zh-TW.yml +1 -477
- data/db/migrate/20211125202008_create_decidim_participatory_process_types.rb +22 -0
- data/lib/decidim/api/participatory_process_type_type.rb +17 -0
- data/lib/decidim/participatory_processes/admin_engine.rb +12 -1
- data/lib/decidim/participatory_processes/api.rb +1 -0
- data/lib/decidim/participatory_processes/participatory_space.rb +17 -8
- data/lib/decidim/participatory_processes/query_extensions.rb +22 -0
- data/lib/decidim/participatory_processes/test/factories.rb +17 -4
- data/lib/decidim/participatory_processes/version.rb +1 -1
- metadata +31 -24
- data/app/services/decidim/participatory_processes/participatory_process_search.rb +0 -27
- data/config/environment.rb +0 -3
- data/config/locales/fa-IR.yml +0 -1
- data/config/locales/gn-PY.yml +0 -1
- data/config/locales/ka-GE.yml +0 -1
- data/config/locales/kaa.yml +0 -6
- data/config/locales/lo-LA.yml +0 -1
- data/config/locales/oc-FR.yml +0 -1
- data/config/locales/sq-AL.yml +0 -1
- data/config/locales/th-TH.yml +0 -1
@@ -74,7 +74,7 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
74
74
|
hashtag: Faker::Internet.slug,
|
75
75
|
group_url: Faker::Internet.url,
|
76
76
|
organization: organization,
|
77
|
-
hero_image: ActiveStorage::Blob.
|
77
|
+
hero_image: ActiveStorage::Blob.create_and_upload!(
|
78
78
|
io: File.open(File.join(seeds_root, "city.jpeg")),
|
79
79
|
filename: "hero_image.jpeg",
|
80
80
|
content_type: "image/jpeg",
|
@@ -104,6 +104,14 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
process_types = []
|
108
|
+
2.times do
|
109
|
+
process_types << Decidim::ParticipatoryProcessType.create!(
|
110
|
+
title: Decidim::Faker::Localized.word,
|
111
|
+
organization: organization
|
112
|
+
)
|
113
|
+
end
|
114
|
+
|
107
115
|
2.times do |n|
|
108
116
|
params = {
|
109
117
|
title: Decidim::Faker::Localized.sentence(word_count: 5),
|
@@ -117,13 +125,13 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
117
125
|
Decidim::Faker::Localized.paragraph(sentence_count: 3)
|
118
126
|
end,
|
119
127
|
organization: organization,
|
120
|
-
hero_image: ActiveStorage::Blob.
|
128
|
+
hero_image: ActiveStorage::Blob.create_and_upload!(
|
121
129
|
io: File.open(File.join(seeds_root, "city.jpeg")),
|
122
130
|
filename: "hero_image.jpeg",
|
123
131
|
content_type: "image/jpeg",
|
124
132
|
metadata: nil
|
125
133
|
), # Keep after organization
|
126
|
-
banner_image: ActiveStorage::Blob.
|
134
|
+
banner_image: ActiveStorage::Blob.create_and_upload!(
|
127
135
|
io: File.open(File.join(seeds_root, "city2.jpeg")),
|
128
136
|
filename: "banner_image.jpeg",
|
129
137
|
content_type: "image/jpeg",
|
@@ -140,6 +148,7 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
140
148
|
start_date: Date.current,
|
141
149
|
end_date: 2.months.from_now,
|
142
150
|
participatory_process_group: process_groups.sample,
|
151
|
+
participatory_process_type: process_types.sample,
|
143
152
|
scope: n.positive? ? nil : Decidim::Scope.reorder(Arel.sql("RANDOM()")).first
|
144
153
|
}
|
145
154
|
|
@@ -173,8 +182,8 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
173
182
|
user.update!(
|
174
183
|
name: Faker::Name.name,
|
175
184
|
nickname: Faker::Twitter.unique.screen_name,
|
176
|
-
password: "
|
177
|
-
password_confirmation: "
|
185
|
+
password: "decidim123456789",
|
186
|
+
password_confirmation: "decidim123456789",
|
178
187
|
organization: organization,
|
179
188
|
confirmed_at: Time.current,
|
180
189
|
locale: I18n.default_locale,
|
@@ -200,7 +209,7 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
200
209
|
attachment_collection: attachment_collection,
|
201
210
|
content_type: "application/pdf",
|
202
211
|
attached_to: process,
|
203
|
-
file: ActiveStorage::Blob.
|
212
|
+
file: ActiveStorage::Blob.create_and_upload!(
|
204
213
|
io: File.open(File.join(seeds_root, "Exampledocument.pdf")),
|
205
214
|
filename: "Exampledocument.pdf",
|
206
215
|
content_type: "application/pdf",
|
@@ -213,7 +222,7 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
213
222
|
description: Decidim::Faker::Localized.sentence(word_count: 5),
|
214
223
|
attached_to: process,
|
215
224
|
content_type: "image/jpeg",
|
216
|
-
file: ActiveStorage::Blob.
|
225
|
+
file: ActiveStorage::Blob.create_and_upload!(
|
217
226
|
io: File.open(File.join(seeds_root, "city.jpeg")),
|
218
227
|
filename: "city.jpeg",
|
219
228
|
content_type: "image/jpeg",
|
@@ -226,7 +235,7 @@ Decidim.register_participatory_space(:participatory_processes) do |participatory
|
|
226
235
|
description: Decidim::Faker::Localized.sentence(word_count: 5),
|
227
236
|
attached_to: process,
|
228
237
|
content_type: "application/pdf",
|
229
|
-
file: ActiveStorage::Blob.
|
238
|
+
file: ActiveStorage::Blob.create_and_upload!(
|
230
239
|
io: File.open(File.join(seeds_root, "Exampledocument.pdf")),
|
231
240
|
filename: "Exampledocument.pdf",
|
232
241
|
content_type: "application/pdf",
|
@@ -19,6 +19,15 @@ module Decidim
|
|
19
19
|
description "Finds a participatory process group"
|
20
20
|
argument :id, GraphQL::Types::ID, required: true, description: "The ID of the Participatory process group"
|
21
21
|
end
|
22
|
+
|
23
|
+
type.field :participatory_process_types, [ParticipatoryProcessTypeType],
|
24
|
+
null: false,
|
25
|
+
description: "List all participatory process types"
|
26
|
+
|
27
|
+
type.field :participatory_process_type, ParticipatoryProcessTypeType, null: true do
|
28
|
+
description "Finds a participatory process type"
|
29
|
+
argument :id, GraphQL::Types::ID, required: true, description: "The ID of the participatory process type"
|
30
|
+
end
|
22
31
|
end
|
23
32
|
|
24
33
|
def participatory_process_groups(*)
|
@@ -33,6 +42,19 @@ module Decidim
|
|
33
42
|
id: id
|
34
43
|
)
|
35
44
|
end
|
45
|
+
|
46
|
+
def participatory_process_types(*)
|
47
|
+
Decidim::ParticipatoryProcessType.where(
|
48
|
+
organization: context[:current_organization]
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
def participatory_process_type(id:)
|
53
|
+
Decidim::ParticipatoryProcessType.find_by(
|
54
|
+
organization: context[:current_organization],
|
55
|
+
id: id
|
56
|
+
)
|
57
|
+
end
|
36
58
|
end
|
37
59
|
end
|
38
60
|
end
|
@@ -128,13 +128,29 @@ FactoryBot.define do
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
+
factory :participatory_process_type, class: "Decidim::ParticipatoryProcessType" do
|
132
|
+
title { generate_localized_title }
|
133
|
+
organization
|
134
|
+
|
135
|
+
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)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
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)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
131
148
|
factory :process_admin, parent: :user, class: "Decidim::User" do
|
132
149
|
transient do
|
133
150
|
participatory_process { create(:participatory_process) }
|
134
151
|
end
|
135
152
|
|
136
153
|
organization { participatory_process.organization }
|
137
|
-
admin_terms_accepted_at { Time.current }
|
138
154
|
|
139
155
|
after(:create) do |user, evaluator|
|
140
156
|
create :participatory_process_user_role,
|
@@ -150,7 +166,6 @@ FactoryBot.define do
|
|
150
166
|
end
|
151
167
|
|
152
168
|
organization { participatory_process.organization }
|
153
|
-
admin_terms_accepted_at { Time.current }
|
154
169
|
|
155
170
|
after(:create) do |user, evaluator|
|
156
171
|
create :participatory_process_user_role,
|
@@ -166,7 +181,6 @@ FactoryBot.define do
|
|
166
181
|
end
|
167
182
|
|
168
183
|
organization { participatory_process.organization }
|
169
|
-
admin_terms_accepted_at { Time.current }
|
170
184
|
|
171
185
|
after(:create) do |user, evaluator|
|
172
186
|
create :participatory_process_user_role,
|
@@ -182,7 +196,6 @@ FactoryBot.define do
|
|
182
196
|
end
|
183
197
|
|
184
198
|
organization { participatory_process.organization }
|
185
|
-
admin_terms_accepted_at { Time.current }
|
186
199
|
|
187
200
|
after(:create) do |user, evaluator|
|
188
201
|
create :participatory_process_user_role,
|
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.
|
4
|
+
version: 0.27.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:
|
13
|
+
date: 2022-06-27 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.
|
21
|
+
version: 0.27.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
|
+
version: 0.27.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.
|
35
|
+
version: 0.27.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.
|
42
|
+
version: 0.27.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.
|
49
|
+
version: 0.27.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.
|
56
|
+
version: 0.27.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.
|
63
|
+
version: 0.27.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.
|
70
|
+
version: 0.27.0.rc1
|
71
71
|
description: Participatory processes component for decidim.
|
72
72
|
email:
|
73
73
|
- josepjaume@gmail.com
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- app/cells/decidim/participatory_processes/process_cell.rb
|
107
107
|
- app/cells/decidim/participatory_processes/process_filters/filter_tabs.erb
|
108
108
|
- app/cells/decidim/participatory_processes/process_filters/show.erb
|
109
|
+
- app/cells/decidim/participatory_processes/process_filters/type_filter.erb
|
109
110
|
- app/cells/decidim/participatory_processes/process_filters_cell.rb
|
110
111
|
- app/cells/decidim/participatory_processes/process_group_cell.rb
|
111
112
|
- app/cells/decidim/participatory_processes/process_group_m/footer.erb
|
@@ -126,9 +127,11 @@ files:
|
|
126
127
|
- app/commands/decidim/participatory_processes/admin/create_participatory_process_admin.rb
|
127
128
|
- app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb
|
128
129
|
- app/commands/decidim/participatory_processes/admin/create_participatory_process_step.rb
|
130
|
+
- app/commands/decidim/participatory_processes/admin/create_participatory_process_type.rb
|
129
131
|
- app/commands/decidim/participatory_processes/admin/destroy_participatory_process_admin.rb
|
130
132
|
- app/commands/decidim/participatory_processes/admin/destroy_participatory_process_group.rb
|
131
133
|
- app/commands/decidim/participatory_processes/admin/destroy_participatory_process_step.rb
|
134
|
+
- app/commands/decidim/participatory_processes/admin/destroy_participatory_process_type.rb
|
132
135
|
- app/commands/decidim/participatory_processes/admin/import_participatory_process.rb
|
133
136
|
- app/commands/decidim/participatory_processes/admin/notify_role_assigned_to_participatory_process.rb
|
134
137
|
- app/commands/decidim/participatory_processes/admin/publish_participatory_process.rb
|
@@ -138,6 +141,7 @@ files:
|
|
138
141
|
- app/commands/decidim/participatory_processes/admin/update_participatory_process_admin.rb
|
139
142
|
- app/commands/decidim/participatory_processes/admin/update_participatory_process_group.rb
|
140
143
|
- app/commands/decidim/participatory_processes/admin/update_participatory_process_step.rb
|
144
|
+
- app/commands/decidim/participatory_processes/admin/update_participatory_process_type.rb
|
141
145
|
- app/constraints/decidim/participatory_processes/current_component.rb
|
142
146
|
- app/constraints/decidim/participatory_processes/current_participatory_process.rb
|
143
147
|
- app/controllers/concerns/decidim/participatory_processes/admin/filterable.rb
|
@@ -162,10 +166,12 @@ files:
|
|
162
166
|
- app/controllers/decidim/participatory_processes/admin/participatory_process_step_activations_controller.rb
|
163
167
|
- app/controllers/decidim/participatory_processes/admin/participatory_process_step_ordering_controller.rb
|
164
168
|
- app/controllers/decidim/participatory_processes/admin/participatory_process_steps_controller.rb
|
169
|
+
- app/controllers/decidim/participatory_processes/admin/participatory_process_types_controller.rb
|
165
170
|
- app/controllers/decidim/participatory_processes/admin/participatory_process_user_roles_controller.rb
|
166
171
|
- app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb
|
167
172
|
- app/controllers/decidim/participatory_processes/admin/participatory_space_private_users_controller.rb
|
168
173
|
- app/controllers/decidim/participatory_processes/admin/participatory_space_private_users_csv_imports_controller.rb
|
174
|
+
- app/controllers/decidim/participatory_processes/admin/reminders_controller.rb
|
169
175
|
- app/controllers/decidim/participatory_processes/application_controller.rb
|
170
176
|
- app/controllers/decidim/participatory_processes/participatory_process_groups_controller.rb
|
171
177
|
- app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
|
@@ -179,6 +185,7 @@ files:
|
|
179
185
|
- app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb
|
180
186
|
- app/forms/decidim/participatory_processes/admin/participatory_process_import_form.rb
|
181
187
|
- app/forms/decidim/participatory_processes/admin/participatory_process_step_form.rb
|
188
|
+
- app/forms/decidim/participatory_processes/admin/participatory_process_type_form.rb
|
182
189
|
- app/forms/decidim/participatory_processes/admin/participatory_process_user_role_form.rb
|
183
190
|
- app/helpers/decidim/participatory_processes/admin/participatory_process_helper.rb
|
184
191
|
- app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
|
@@ -189,6 +196,7 @@ files:
|
|
189
196
|
- app/models/decidim/participatory_process.rb
|
190
197
|
- app/models/decidim/participatory_process_group.rb
|
191
198
|
- app/models/decidim/participatory_process_step.rb
|
199
|
+
- app/models/decidim/participatory_process_type.rb
|
192
200
|
- app/models/decidim/participatory_process_user_role.rb
|
193
201
|
- app/packs/entrypoints/decidim_participatory_processes.js
|
194
202
|
- app/packs/entrypoints/decidim_participatory_processes_admin.js
|
@@ -196,8 +204,10 @@ files:
|
|
196
204
|
- app/packs/src/decidim/participatory_processes/admin/participatory_processes.js
|
197
205
|
- app/packs/src/decidim/participatory_processes/filters.js
|
198
206
|
- app/permissions/decidim/participatory_processes/permissions.rb
|
207
|
+
- app/presenters/decidim/log/value_types/participatory_process_type_presenter.rb
|
199
208
|
- app/presenters/decidim/participatory_processes/admin_log/participatory_process_group_presenter.rb
|
200
209
|
- app/presenters/decidim/participatory_processes/admin_log/participatory_process_presenter.rb
|
210
|
+
- app/presenters/decidim/participatory_processes/admin_log/participatory_process_type_presenter.rb
|
201
211
|
- app/presenters/decidim/participatory_processes/admin_log/participatory_process_user_role_presenter.rb
|
202
212
|
- app/presenters/decidim/participatory_processes/admin_log/step_presenter.rb
|
203
213
|
- app/presenters/decidim/participatory_processes/admin_log/value_types/role_presenter.rb
|
@@ -232,7 +242,6 @@ files:
|
|
232
242
|
- app/queries/decidim/participatory_processes/visible_participatory_processes.rb
|
233
243
|
- app/serializers/decidim/participatory_processes/participatory_process_importer.rb
|
234
244
|
- app/serializers/decidim/participatory_processes/participatory_process_serializer.rb
|
235
|
-
- app/services/decidim/participatory_processes/participatory_process_search.rb
|
236
245
|
- app/views/decidim/participatory_process_groups/_participatory_process_group.html.erb
|
237
246
|
- app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb
|
238
247
|
- app/views/decidim/participatory_processes/_participatory_process.html.erb
|
@@ -249,6 +258,10 @@ files:
|
|
249
258
|
- app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb
|
250
259
|
- app/views/decidim/participatory_processes/admin/participatory_process_steps/new.html.erb
|
251
260
|
- app/views/decidim/participatory_processes/admin/participatory_process_steps/show.html.erb
|
261
|
+
- app/views/decidim/participatory_processes/admin/participatory_process_types/_form.html.erb
|
262
|
+
- app/views/decidim/participatory_processes/admin/participatory_process_types/edit.html.erb
|
263
|
+
- app/views/decidim/participatory_processes/admin/participatory_process_types/index.html.erb
|
264
|
+
- app/views/decidim/participatory_processes/admin/participatory_process_types/new.html.erb
|
252
265
|
- app/views/decidim/participatory_processes/admin/participatory_process_user_roles/_form.html.erb
|
253
266
|
- app/views/decidim/participatory_processes/admin/participatory_process_user_roles/edit.html.erb
|
254
267
|
- app/views/decidim/participatory_processes/admin/participatory_process_user_roles/index.html.erb
|
@@ -277,10 +290,10 @@ files:
|
|
277
290
|
- app/views/layouts/decidim/admin/participatory_process.html.erb
|
278
291
|
- app/views/layouts/decidim/admin/participatory_process_group.html.erb
|
279
292
|
- app/views/layouts/decidim/admin/participatory_process_groups.html.erb
|
293
|
+
- app/views/layouts/decidim/admin/participatory_process_type.html.erb
|
280
294
|
- app/views/layouts/decidim/admin/participatory_processes.html.erb
|
281
295
|
- app/views/layouts/decidim/participatory_process.html.erb
|
282
296
|
- config/assets.rb
|
283
|
-
- config/environment.rb
|
284
297
|
- config/locales/am-ET.yml
|
285
298
|
- config/locales/ar-SA.yml
|
286
299
|
- config/locales/ar.yml
|
@@ -303,7 +316,6 @@ files:
|
|
303
316
|
- config/locales/et-EE.yml
|
304
317
|
- config/locales/et.yml
|
305
318
|
- config/locales/eu.yml
|
306
|
-
- config/locales/fa-IR.yml
|
307
319
|
- config/locales/fi-pl.yml
|
308
320
|
- config/locales/fi-plain.yml
|
309
321
|
- config/locales/fi.yml
|
@@ -312,7 +324,6 @@ files:
|
|
312
324
|
- config/locales/fr.yml
|
313
325
|
- config/locales/ga-IE.yml
|
314
326
|
- config/locales/gl.yml
|
315
|
-
- config/locales/gn-PY.yml
|
316
327
|
- config/locales/hr-HR.yml
|
317
328
|
- config/locales/hr.yml
|
318
329
|
- config/locales/hu.yml
|
@@ -321,13 +332,10 @@ files:
|
|
321
332
|
- config/locales/is.yml
|
322
333
|
- config/locales/it.yml
|
323
334
|
- config/locales/ja.yml
|
324
|
-
- config/locales/ka-GE.yml
|
325
|
-
- config/locales/kaa.yml
|
326
335
|
- config/locales/ko-KR.yml
|
327
336
|
- config/locales/ko.yml
|
328
337
|
- config/locales/lb-LU.yml
|
329
338
|
- config/locales/lb.yml
|
330
|
-
- config/locales/lo-LA.yml
|
331
339
|
- config/locales/lt-LT.yml
|
332
340
|
- config/locales/lt.yml
|
333
341
|
- config/locales/lv.yml
|
@@ -335,7 +343,6 @@ files:
|
|
335
343
|
- config/locales/mt.yml
|
336
344
|
- config/locales/nl.yml
|
337
345
|
- config/locales/no.yml
|
338
|
-
- config/locales/oc-FR.yml
|
339
346
|
- config/locales/om-ET.yml
|
340
347
|
- config/locales/pl.yml
|
341
348
|
- config/locales/pt-BR.yml
|
@@ -347,11 +354,9 @@ files:
|
|
347
354
|
- config/locales/sk.yml
|
348
355
|
- config/locales/sl.yml
|
349
356
|
- config/locales/so-SO.yml
|
350
|
-
- config/locales/sq-AL.yml
|
351
357
|
- config/locales/sr-CS.yml
|
352
358
|
- config/locales/sv.yml
|
353
359
|
- config/locales/sw-KE.yml
|
354
|
-
- config/locales/th-TH.yml
|
355
360
|
- config/locales/ti-ER.yml
|
356
361
|
- config/locales/tr-TR.yml
|
357
362
|
- config/locales/uk.yml
|
@@ -406,6 +411,7 @@ files:
|
|
406
411
|
- db/migrate/20210204154593_add_weight_field_to_participatory_processes.rb
|
407
412
|
- db/migrate/20210310120750_add_followable_counter_cache_to_participatory_processes.rb
|
408
413
|
- db/migrate/20210415163339_allow_null_file_column_in_decidim_attachments_table.rb
|
414
|
+
- db/migrate/20211125202008_create_decidim_participatory_process_types.rb
|
409
415
|
- db/seeds/Exampledocument.pdf
|
410
416
|
- db/seeds/city.jpeg
|
411
417
|
- db/seeds/city2.jpeg
|
@@ -415,6 +421,7 @@ files:
|
|
415
421
|
- lib/decidim/api/participatory_process_input_sort.rb
|
416
422
|
- lib/decidim/api/participatory_process_step_type.rb
|
417
423
|
- lib/decidim/api/participatory_process_type.rb
|
424
|
+
- lib/decidim/api/participatory_process_type_type.rb
|
418
425
|
- lib/decidim/participatory_processes.rb
|
419
426
|
- lib/decidim/participatory_processes/admin.rb
|
420
427
|
- lib/decidim/participatory_processes/admin_engine.rb
|
@@ -436,14 +443,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
436
443
|
requirements:
|
437
444
|
- - ">="
|
438
445
|
- !ruby/object:Gem::Version
|
439
|
-
version: '
|
446
|
+
version: '3.0'
|
440
447
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
441
448
|
requirements:
|
442
|
-
- - "
|
449
|
+
- - ">"
|
443
450
|
- !ruby/object:Gem::Version
|
444
|
-
version:
|
451
|
+
version: 1.3.1
|
445
452
|
requirements: []
|
446
|
-
rubygems_version: 3.
|
453
|
+
rubygems_version: 3.2.22
|
447
454
|
signing_key:
|
448
455
|
specification_version: 4
|
449
456
|
summary: Decidim participatory processes module
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module ParticipatoryProcesses
|
5
|
-
# Service that encapsulates all logic related to filtering participatory processes.
|
6
|
-
class ParticipatoryProcessSearch < ParticipatorySpaceSearch
|
7
|
-
def initialize(options = {})
|
8
|
-
base_relation = options.has_key?(:base_relation) ? options.delete(:base_relation) : ParticipatoryProcess.all
|
9
|
-
super(base_relation, options)
|
10
|
-
end
|
11
|
-
|
12
|
-
def search_date
|
13
|
-
case date
|
14
|
-
when "active"
|
15
|
-
query.active.order(start_date: :desc)
|
16
|
-
when "past"
|
17
|
-
query.past.order(end_date: :desc)
|
18
|
-
when "upcoming"
|
19
|
-
query.upcoming.order(start_date: :asc)
|
20
|
-
else # Assume 'all'
|
21
|
-
timezone = ActiveSupport::TimeZone.find_tzinfo(Time.zone.name).identifier
|
22
|
-
query.order(Arel.sql("ABS(start_date - (CURRENT_DATE at time zone '#{timezone}')::date)").to_s)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
data/config/environment.rb
DELETED
data/config/locales/fa-IR.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
fa:
|
data/config/locales/gn-PY.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
gn:
|
data/config/locales/ka-GE.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ka:
|
data/config/locales/kaa.yml
DELETED
data/config/locales/lo-LA.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
lo:
|
data/config/locales/oc-FR.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
oc:
|
data/config/locales/sq-AL.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
sq:
|
data/config/locales/th-TH.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
th:
|