decidim-consultations 0.20.0 → 0.23.1.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/decidim/consultations/icon.svg +1 -3
- data/app/assets/images/decidim/consultations/icon2.svg +1 -88
- data/app/assets/stylesheets/decidim/consultations/_question.scss +0 -6
- data/app/assets/stylesheets/decidim/consultations/consultations/_consultations-header.scss +0 -1
- data/app/cells/decidim/consultations/consultation_m/data.erb +1 -1
- data/app/cells/decidim/consultations/consultation_m/footer.erb +1 -1
- data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +3 -3
- data/app/commands/decidim/consultations/admin/update_consultation.rb +9 -4
- data/app/controllers/concerns/decidim/consultations/admin/filterable.rb +27 -0
- data/app/controllers/decidim/consultations/admin/consultations_controller.rb +2 -1
- data/app/forms/decidim/consultations/admin/consultation_form.rb +5 -6
- data/app/forms/decidim/consultations/admin/question_form.rb +5 -6
- data/app/models/decidim/consultation.rb +14 -0
- data/app/models/decidim/consultations/question.rb +12 -1
- data/app/models/decidim/consultations/response.rb +4 -0
- data/app/models/decidim/consultations/response_group.rb +4 -0
- data/app/permissions/decidim/consultations/permissions.rb +2 -0
- data/app/presenters/decidim/consultations/question_stats_presenter.rb +1 -1
- data/app/types/decidim/consultations/consultation_question_type.rb +57 -0
- data/app/types/decidim/consultations/consultation_type.rb +32 -0
- data/app/views/decidim/consultations/admin/consultations/index.html.erb +3 -2
- data/app/views/decidim/consultations/consultations/_consultation_card.html.erb +3 -3
- data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +2 -2
- data/app/views/decidim/consultations/consultations/_filters.html.erb +9 -4
- data/app/views/decidim/consultations/consultations/_question.html.erb +2 -2
- data/app/views/decidim/consultations/consultations/index.html.erb +3 -3
- data/app/views/decidim/consultations/questions/_vote_button.html.erb +70 -67
- data/app/views/decidim/consultations/questions/_vote_modal.html.erb +1 -1
- data/app/views/decidim/consultations/questions/_vote_modal_confirm.html.erb +1 -1
- data/app/views/decidim/consultations/questions/show.html.erb +4 -4
- data/app/views/layouts/decidim/_question_components.html.erb +3 -3
- data/app/views/layouts/decidim/_question_header.html.erb +1 -1
- data/app/views/layouts/decidim/consultation.html.erb +1 -0
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +29 -1
- data/config/locales/bg-BG.yml +1 -0
- data/config/locales/bg.yml +1 -0
- data/config/locales/ca.yml +16 -1
- data/config/locales/cs.yml +12 -9
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +82 -1
- data/config/locales/el-GR.yml +1 -0
- data/config/locales/el.yml +377 -0
- data/config/locales/en.yml +4 -1
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +29 -1
- data/config/locales/es-PY.yml +29 -1
- data/config/locales/es.yml +29 -1
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +0 -1
- data/config/locales/fi-plain.yml +4 -1
- data/config/locales/fi.yml +15 -12
- data/config/locales/fr-CA.yml +377 -0
- data/config/locales/fr.yml +5 -2
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +0 -1
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +0 -1
- data/config/locales/id-ID.yml +0 -1
- data/config/locales/is-IS.yml +185 -0
- data/config/locales/is.yml +185 -0
- data/config/locales/it.yml +58 -55
- data/config/locales/ja-JP.yml +367 -0
- data/config/locales/ja.yml +367 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +383 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +4 -1
- data/config/locales/no.yml +310 -1
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +183 -102
- data/config/locales/pt-BR.yml +1 -2
- data/config/locales/pt.yml +156 -75
- data/config/locales/ro-RO.yml +338 -0
- data/config/locales/ru.yml +0 -1
- data/config/locales/sk-SK.yml +394 -0
- data/config/locales/sk.yml +393 -0
- data/config/locales/sl.yml +9 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +1 -0
- data/config/locales/sv.yml +46 -12
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +0 -1
- data/config/locales/uk.yml +0 -1
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +367 -0
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20200320105916_index_foreign_keys_in_decidim_consultations_votes.rb +7 -0
- data/db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb +9 -0
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/lib/decidim/consultations/admin_engine.rb +1 -0
- data/lib/decidim/consultations/participatory_space.rb +19 -17
- data/lib/decidim/consultations/test/factories.rb +1 -0
- data/lib/decidim/consultations/version.rb +1 -1
- metadata +55 -13
@@ -0,0 +1 @@
|
|
1
|
+
zh-TW:
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddCommentableCounterCacheToConsultations < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
add_column :decidim_consultations_questions, :comments_count, :integer, null: false, default: 0, index: true
|
6
|
+
Decidim::Consultations::Question.reset_column_information
|
7
|
+
Decidim::Consultations::Question.find_each(&:update_comments_count)
|
8
|
+
end
|
9
|
+
end
|
data/db/seeds/city.jpeg
CHANGED
Binary file
|
data/db/seeds/city2.jpeg
CHANGED
Binary file
|
@@ -10,6 +10,8 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
|
|
10
10
|
Decidim::Consultation.where(organization: organization)
|
11
11
|
end
|
12
12
|
|
13
|
+
participatory_space.query_type = "Decidim::Consultations::ConsultationType"
|
14
|
+
|
13
15
|
participatory_space.context(:public) do |context|
|
14
16
|
context.engine = Decidim::Consultations::Engine
|
15
17
|
context.layout = "layouts/decidim/question"
|
@@ -47,10 +49,10 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
|
|
47
49
|
published_at: Time.now.utc,
|
48
50
|
start_voting_date: Time.zone.today,
|
49
51
|
end_voting_date: Time.zone.today + 1.month,
|
50
|
-
|
52
|
+
organization: organization,
|
53
|
+
banner_image: File.new(File.join(seeds_root, "city2.jpeg")), # Keep after organization
|
51
54
|
introductory_video_url: "https://www.youtube.com/embed/zhMMW0TENNA",
|
52
|
-
decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id
|
53
|
-
organization: organization
|
55
|
+
decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id
|
54
56
|
}
|
55
57
|
|
56
58
|
active_consultation = Decidim.traceability.perform_action!(
|
@@ -74,10 +76,10 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
|
|
74
76
|
results_published_at: Time.zone.today - 1.month,
|
75
77
|
start_voting_date: Time.zone.today - 2.months,
|
76
78
|
end_voting_date: Time.zone.today - 1.month,
|
77
|
-
|
79
|
+
organization: organization,
|
80
|
+
banner_image: File.new(File.join(seeds_root, "city2.jpeg")), # Keep after organization
|
78
81
|
introductory_video_url: "https://www.youtube.com/embed/zhMMW0TENNA",
|
79
|
-
decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id
|
80
|
-
organization: organization
|
82
|
+
decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id
|
81
83
|
}
|
82
84
|
|
83
85
|
finished_consultation = Decidim.traceability.perform_action!(
|
@@ -100,10 +102,10 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
|
|
100
102
|
published_at: Time.zone.today + 1.month,
|
101
103
|
start_voting_date: Time.zone.today + 1.month + 1.day,
|
102
104
|
end_voting_date: Time.zone.today + 2.months,
|
103
|
-
|
105
|
+
organization: organization,
|
106
|
+
banner_image: File.new(File.join(seeds_root, "city2.jpeg")), # Keep after organization
|
104
107
|
introductory_video_url: "https://www.youtube.com/embed/zhMMW0TENNA",
|
105
|
-
decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id
|
106
|
-
organization: organization
|
108
|
+
decidim_highlighted_scope_id: Decidim::Scope.reorder(Arel.sql("RANDOM()")).first.id
|
107
109
|
}
|
108
110
|
|
109
111
|
upcoming_consultation = Decidim.traceability.perform_action!(
|
@@ -130,12 +132,12 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
|
|
130
132
|
question_context: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
131
133
|
Decidim::Faker::Localized.paragraph(3)
|
132
134
|
end,
|
133
|
-
|
134
|
-
|
135
|
+
organization: organization,
|
136
|
+
hero_image: File.new(File.join(seeds_root, "city.jpeg")), # Keep after organization
|
137
|
+
banner_image: File.new(File.join(seeds_root, "city2.jpeg")), # Keep after organization
|
135
138
|
promoter_group: Decidim::Faker::Localized.sentence(3),
|
136
139
|
participatory_scope: Decidim::Faker::Localized.sentence(3),
|
137
|
-
published_at: Time.now.utc
|
138
|
-
organization: organization
|
140
|
+
published_at: Time.now.utc
|
139
141
|
}
|
140
142
|
|
141
143
|
question = Decidim.traceability.perform_action!(
|
@@ -159,15 +161,15 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
|
|
159
161
|
Decidim::Attachment.create!(
|
160
162
|
title: Decidim::Faker::Localized.sentence(2),
|
161
163
|
description: Decidim::Faker::Localized.sentence(5),
|
162
|
-
|
163
|
-
|
164
|
+
attached_to: question,
|
165
|
+
file: File.new(File.join(seeds_root, "city.jpeg")) # Keep after attached_to
|
164
166
|
)
|
165
167
|
|
166
168
|
Decidim::Attachment.create!(
|
167
169
|
title: Decidim::Faker::Localized.sentence(2),
|
168
170
|
description: Decidim::Faker::Localized.sentence(5),
|
169
|
-
|
170
|
-
|
171
|
+
attached_to: question,
|
172
|
+
file: File.new(File.join(seeds_root, "Exampledocument.pdf")) # Keep after attached_to
|
171
173
|
)
|
172
174
|
end
|
173
175
|
end
|
@@ -22,6 +22,7 @@ FactoryBot.define do
|
|
22
22
|
published_at { Time.current }
|
23
23
|
start_voting_date { Time.zone.today }
|
24
24
|
end_voting_date { Time.zone.today + 1.month }
|
25
|
+
introductory_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
|
25
26
|
introductory_video_url { "https://www.youtube.com/embed/zhMMW0TENNA" }
|
26
27
|
decidim_highlighted_scope_id { create(:scope, organization: organization).id }
|
27
28
|
results_published_at { nil }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-consultations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.23.1.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Salvador Perez Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.23.1.rc1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.23.1.rc1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-comments
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.23.1.rc1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.23.1.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.23.1.rc1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.23.1.rc1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: decidim-dev
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.23.1.rc1
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.23.1.rc1
|
69
69
|
description: Extends Decidim adding a first level public consultation component
|
70
70
|
email:
|
71
71
|
- jsperezg@gmail.com
|
@@ -131,6 +131,7 @@ files:
|
|
131
131
|
- app/constraints/decidim/consultations/current_component.rb
|
132
132
|
- app/constraints/decidim/consultations/current_question.rb
|
133
133
|
- app/controllers/concerns/decidim/consultations/admin/consultation_admin.rb
|
134
|
+
- app/controllers/concerns/decidim/consultations/admin/filterable.rb
|
134
135
|
- app/controllers/concerns/decidim/consultations/admin/question_admin.rb
|
135
136
|
- app/controllers/concerns/decidim/consultations/needs_consultation.rb
|
136
137
|
- app/controllers/concerns/decidim/consultations/needs_question.rb
|
@@ -184,6 +185,8 @@ files:
|
|
184
185
|
- app/queries/decidim/consultations/organization_consultations.rb
|
185
186
|
- app/queries/decidim/consultations/organization_questions.rb
|
186
187
|
- app/services/decidim/consultations/consultation_search.rb
|
188
|
+
- app/types/decidim/consultations/consultation_question_type.rb
|
189
|
+
- app/types/decidim/consultations/consultation_type.rb
|
187
190
|
- app/views/decidim/consultations/_consultation.html.erb
|
188
191
|
- app/views/decidim/consultations/admin/consultations/_form.html.erb
|
189
192
|
- app/views/decidim/consultations/admin/consultations/edit.html.erb
|
@@ -243,35 +246,72 @@ files:
|
|
243
246
|
- app/views/layouts/decidim/consultation_choose.html.erb
|
244
247
|
- app/views/layouts/decidim/question.html.erb
|
245
248
|
- app/views/layouts/decidim/question_multivote.html.erb
|
249
|
+
- config/locales/am-ET.yml
|
246
250
|
- config/locales/ar-SA.yml
|
247
251
|
- config/locales/ar.yml
|
252
|
+
- config/locales/bg-BG.yml
|
253
|
+
- config/locales/bg.yml
|
248
254
|
- config/locales/ca.yml
|
249
255
|
- config/locales/cs-CZ.yml
|
250
256
|
- config/locales/cs.yml
|
257
|
+
- config/locales/da-DK.yml
|
258
|
+
- config/locales/da.yml
|
251
259
|
- config/locales/de.yml
|
260
|
+
- config/locales/el-GR.yml
|
261
|
+
- config/locales/el.yml
|
252
262
|
- config/locales/en.yml
|
253
263
|
- config/locales/eo-UY.yml
|
264
|
+
- config/locales/eo.yml
|
254
265
|
- config/locales/es-MX.yml
|
255
266
|
- config/locales/es-PY.yml
|
256
267
|
- config/locales/es.yml
|
268
|
+
- config/locales/et-EE.yml
|
269
|
+
- config/locales/et.yml
|
257
270
|
- config/locales/eu.yml
|
258
271
|
- config/locales/fi-pl.yml
|
259
272
|
- config/locales/fi-plain.yml
|
260
273
|
- config/locales/fi.yml
|
274
|
+
- config/locales/fr-CA.yml
|
261
275
|
- config/locales/fr.yml
|
276
|
+
- config/locales/ga-IE.yml
|
262
277
|
- config/locales/gl.yml
|
278
|
+
- config/locales/hr-HR.yml
|
279
|
+
- config/locales/hr.yml
|
263
280
|
- config/locales/hu.yml
|
264
281
|
- config/locales/id-ID.yml
|
282
|
+
- config/locales/is-IS.yml
|
283
|
+
- config/locales/is.yml
|
265
284
|
- config/locales/it.yml
|
285
|
+
- config/locales/ja-JP.yml
|
286
|
+
- config/locales/ja.yml
|
287
|
+
- config/locales/ko-KR.yml
|
288
|
+
- config/locales/ko.yml
|
289
|
+
- config/locales/lt-LT.yml
|
290
|
+
- config/locales/lt.yml
|
291
|
+
- config/locales/lv.yml
|
292
|
+
- config/locales/mt-MT.yml
|
293
|
+
- config/locales/mt.yml
|
266
294
|
- config/locales/nl.yml
|
267
295
|
- config/locales/no.yml
|
296
|
+
- config/locales/om-ET.yml
|
268
297
|
- config/locales/pl.yml
|
269
298
|
- config/locales/pt-BR.yml
|
270
299
|
- config/locales/pt.yml
|
300
|
+
- config/locales/ro-RO.yml
|
271
301
|
- config/locales/ru.yml
|
302
|
+
- config/locales/sk-SK.yml
|
303
|
+
- config/locales/sk.yml
|
304
|
+
- config/locales/sl.yml
|
305
|
+
- config/locales/so-SO.yml
|
306
|
+
- config/locales/sr-CS.yml
|
272
307
|
- config/locales/sv.yml
|
308
|
+
- config/locales/ti-ER.yml
|
273
309
|
- config/locales/tr-TR.yml
|
274
310
|
- config/locales/uk.yml
|
311
|
+
- config/locales/vi-VN.yml
|
312
|
+
- config/locales/vi.yml
|
313
|
+
- config/locales/zh-CN.yml
|
314
|
+
- config/locales/zh-TW.yml
|
275
315
|
- db/migrate/20180109092205_create_decidim_consultations.rb
|
276
316
|
- db/migrate/20180112053247_create_decidim_consultations_questions.rb
|
277
317
|
- db/migrate/20180115132000_add_end_voting_date_to_decidim_consultations.rb
|
@@ -305,6 +345,8 @@ files:
|
|
305
345
|
- db/migrate/20190708120345_add_response_groups_count_to_decidim_consultations_questions.rb
|
306
346
|
- db/migrate/20190708121643_add_response_groups_to_decidim_consultations_responses.rb
|
307
347
|
- db/migrate/20190710121122_add_free_instructions_field_to_consultations_questions.rb
|
348
|
+
- db/migrate/20200320105916_index_foreign_keys_in_decidim_consultations_votes.rb
|
349
|
+
- db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
|
308
350
|
- db/seeds/Exampledocument.pdf
|
309
351
|
- db/seeds/city.jpeg
|
310
352
|
- db/seeds/city2.jpeg
|
@@ -328,12 +370,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
328
370
|
requirements:
|
329
371
|
- - ">="
|
330
372
|
- !ruby/object:Gem::Version
|
331
|
-
version: '2.
|
373
|
+
version: '2.6'
|
332
374
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
333
375
|
requirements:
|
334
|
-
- - "
|
376
|
+
- - ">"
|
335
377
|
- !ruby/object:Gem::Version
|
336
|
-
version:
|
378
|
+
version: 1.3.1
|
337
379
|
requirements: []
|
338
380
|
rubygems_version: 3.0.3
|
339
381
|
signing_key:
|