decidim-consultations 0.26.8 → 0.27.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/consultations/consultation_m_cell.rb +3 -1
- data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +2 -2
- data/app/commands/decidim/consultations/admin/create_consultation.rb +1 -1
- data/app/commands/decidim/consultations/admin/create_question.rb +1 -1
- data/app/commands/decidim/consultations/admin/create_response.rb +1 -1
- data/app/commands/decidim/consultations/admin/create_response_group.rb +1 -1
- data/app/commands/decidim/consultations/admin/destroy_response_group.rb +1 -1
- data/app/commands/decidim/consultations/admin/publish_consultation.rb +1 -1
- data/app/commands/decidim/consultations/admin/publish_consultation_results.rb +1 -1
- data/app/commands/decidim/consultations/admin/publish_question.rb +1 -1
- data/app/commands/decidim/consultations/admin/unpublish_consultation.rb +1 -1
- data/app/commands/decidim/consultations/admin/unpublish_consultation_results.rb +1 -1
- data/app/commands/decidim/consultations/admin/unpublish_question.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_consultation.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_question.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_question_configuration.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_response.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_response_group.rb +1 -1
- data/app/commands/decidim/consultations/multiple_vote_question.rb +1 -1
- data/app/commands/decidim/consultations/unvote_question.rb +1 -1
- data/app/commands/decidim/consultations/vote_question.rb +1 -1
- data/app/controllers/decidim/consultations/consultations_controller.rb +5 -12
- data/app/forms/decidim/consultations/admin/consultation_form.rb +1 -1
- data/app/helpers/decidim/consultations/consultations_helper.rb +1 -1
- data/app/helpers/decidim/consultations/questions_helper.rb +3 -3
- data/app/models/decidim/consultation.rb +9 -3
- data/app/permissions/decidim/consultations/permissions.rb +1 -3
- data/app/presenters/decidim/consultations/question_stats_presenter.rb +4 -2
- data/app/queries/decidim/consultations/admin/admin_users.rb +1 -1
- data/app/queries/decidim/consultations/organization_active_consultations.rb +1 -1
- data/app/queries/decidim/consultations/organization_consultations.rb +1 -1
- data/app/queries/decidim/consultations/organization_questions.rb +1 -1
- data/app/views/decidim/consultations/_consultation.html.erb +1 -1
- data/app/views/decidim/consultations/admin/consultations/_form.html.erb +1 -1
- data/app/views/decidim/consultations/admin/consultations/edit.html.erb +0 -1
- data/app/views/decidim/consultations/admin/consultations/index.html.erb +0 -2
- data/app/views/decidim/consultations/admin/consultations/new.html.erb +0 -1
- data/app/views/decidim/consultations/admin/question_configuration/_form.html.erb +1 -1
- data/app/views/decidim/consultations/admin/questions/_form.html.erb +3 -3
- data/app/views/decidim/consultations/admin/questions/edit.html.erb +0 -1
- data/app/views/decidim/consultations/admin/questions/index.html.erb +0 -2
- data/app/views/decidim/consultations/admin/questions/new.html.erb +0 -1
- data/app/views/decidim/consultations/admin/responses/edit.html.erb +0 -1
- data/app/views/decidim/consultations/admin/responses/index.html.erb +0 -1
- data/app/views/decidim/consultations/admin/responses/new.html.erb +0 -1
- data/app/views/decidim/consultations/consultations/_consultation_card.html.erb +1 -1
- data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +2 -2
- data/app/views/decidim/consultations/consultations/_filters.html.erb +4 -4
- data/app/views/decidim/consultations/consultations/_question.html.erb +2 -2
- data/app/views/decidim/consultations/consultations/index.html.erb +3 -1
- data/app/views/decidim/consultations/question_multiple_votes/_voting_rules.html.erb +3 -1
- data/app/views/decidim/consultations/questions/_vote_button.html.erb +3 -1
- data/app/views/decidim/consultations/questions/_vote_modal.html.erb +1 -1
- data/app/views/decidim/consultations/questions/_vote_modal_confirm.html.erb +1 -0
- data/app/views/decidim/consultations/questions/show.html.erb +6 -4
- data/app/views/layouts/decidim/_consultation_header.html.erb +1 -1
- data/app/views/layouts/decidim/_question_header.html.erb +2 -2
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +2 -22
- data/config/locales/bg.yml +1 -0
- data/config/locales/ca.yml +2 -5
- data/config/locales/cs.yml +3 -6
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +2 -5
- data/config/locales/el.yml +1 -11
- data/config/locales/en.yml +1 -5
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +2 -5
- data/config/locales/es-PY.yml +2 -5
- data/config/locales/es.yml +2 -5
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +2 -2
- data/config/locales/fi-plain.yml +2 -5
- data/config/locales/fi.yml +2 -5
- data/config/locales/fr-CA.yml +3 -6
- data/config/locales/fr.yml +4 -7
- data/config/locales/ga-IE.yml +1 -1
- data/config/locales/gl.yml +2 -1
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +2 -11
- data/config/locales/id-ID.yml +1 -1
- data/config/locales/is-IS.yml +2 -1
- data/config/locales/it.yml +1 -1
- data/config/locales/ja.yml +2 -5
- data/config/locales/ko.yml +1 -0
- data/config/locales/lb.yml +1 -3
- data/config/locales/lt.yml +1 -394
- data/config/locales/lv.yml +1 -1
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +2 -2
- data/config/locales/no.yml +1 -1
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +1 -1
- data/config/locales/pt-BR.yml +2 -2
- data/config/locales/pt.yml +1 -1
- data/config/locales/ro-RO.yml +2 -5
- data/config/locales/ru.yml +1 -3
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +1 -1
- data/config/locales/sl.yml +1 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +1 -0
- data/config/locales/sv.yml +2 -5
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +1 -1
- data/config/locales/uk.yml +1 -3
- data/config/locales/val-ES.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +1 -1
- data/config/locales/zh-TW.yml +1 -368
- data/lib/decidim/consultations/participatory_space.rb +7 -7
- data/lib/decidim/consultations/version.rb +1 -1
- metadata +14 -23
- data/app/scrubbers/decidim/consultations/question_title_scrubber.rb +0 -17
- data/app/services/decidim/consultations/consultation_search.rb +0 -51
- data/config/environment.rb +0 -0
- 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 -15
- data/config/locales/lo-LA.yml +0 -1
- data/config/locales/oc-FR.yml +0 -1
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.27.0.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:
|
11
|
+
date: 2022-06-27 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.27.0.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.27.0.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.27.0.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.27.0.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.27.0.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.27.0.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.27.0.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.27.0.rc1
|
69
69
|
description: Extends Decidim adding a first level public consultation component
|
70
70
|
email:
|
71
71
|
- jsperezg@gmail.com
|
@@ -182,8 +182,6 @@ files:
|
|
182
182
|
- app/queries/decidim/consultations/organization_active_consultations.rb
|
183
183
|
- app/queries/decidim/consultations/organization_consultations.rb
|
184
184
|
- app/queries/decidim/consultations/organization_questions.rb
|
185
|
-
- app/scrubbers/decidim/consultations/question_title_scrubber.rb
|
186
|
-
- app/services/decidim/consultations/consultation_search.rb
|
187
185
|
- app/views/decidim/consultations/_consultation.html.erb
|
188
186
|
- app/views/decidim/consultations/admin/consultations/_form.html.erb
|
189
187
|
- app/views/decidim/consultations/admin/consultations/edit.html.erb
|
@@ -244,7 +242,6 @@ files:
|
|
244
242
|
- app/views/layouts/decidim/question.html.erb
|
245
243
|
- app/views/layouts/decidim/question_multivote.html.erb
|
246
244
|
- config/assets.rb
|
247
|
-
- config/environment.rb
|
248
245
|
- config/locales/am-ET.yml
|
249
246
|
- config/locales/ar-SA.yml
|
250
247
|
- config/locales/ar.yml
|
@@ -267,7 +264,6 @@ files:
|
|
267
264
|
- config/locales/et-EE.yml
|
268
265
|
- config/locales/et.yml
|
269
266
|
- config/locales/eu.yml
|
270
|
-
- config/locales/fa-IR.yml
|
271
267
|
- config/locales/fi-pl.yml
|
272
268
|
- config/locales/fi-plain.yml
|
273
269
|
- config/locales/fi.yml
|
@@ -276,7 +272,6 @@ files:
|
|
276
272
|
- config/locales/fr.yml
|
277
273
|
- config/locales/ga-IE.yml
|
278
274
|
- config/locales/gl.yml
|
279
|
-
- config/locales/gn-PY.yml
|
280
275
|
- config/locales/hr-HR.yml
|
281
276
|
- config/locales/hr.yml
|
282
277
|
- config/locales/hu.yml
|
@@ -285,13 +280,10 @@ files:
|
|
285
280
|
- config/locales/is.yml
|
286
281
|
- config/locales/it.yml
|
287
282
|
- config/locales/ja.yml
|
288
|
-
- config/locales/ka-GE.yml
|
289
|
-
- config/locales/kaa.yml
|
290
283
|
- config/locales/ko-KR.yml
|
291
284
|
- config/locales/ko.yml
|
292
285
|
- config/locales/lb-LU.yml
|
293
286
|
- config/locales/lb.yml
|
294
|
-
- config/locales/lo-LA.yml
|
295
287
|
- config/locales/lt-LT.yml
|
296
288
|
- config/locales/lt.yml
|
297
289
|
- config/locales/lv.yml
|
@@ -299,7 +291,6 @@ files:
|
|
299
291
|
- config/locales/mt.yml
|
300
292
|
- config/locales/nl.yml
|
301
293
|
- config/locales/no.yml
|
302
|
-
- config/locales/oc-FR.yml
|
303
294
|
- config/locales/om-ET.yml
|
304
295
|
- config/locales/pl.yml
|
305
296
|
- config/locales/pt-BR.yml
|
@@ -385,14 +376,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
385
376
|
requirements:
|
386
377
|
- - ">="
|
387
378
|
- !ruby/object:Gem::Version
|
388
|
-
version: '
|
379
|
+
version: '3.0'
|
389
380
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
390
381
|
requirements:
|
391
|
-
- - "
|
382
|
+
- - ">"
|
392
383
|
- !ruby/object:Gem::Version
|
393
|
-
version:
|
384
|
+
version: 1.3.1
|
394
385
|
requirements: []
|
395
|
-
rubygems_version: 3.
|
386
|
+
rubygems_version: 3.2.22
|
396
387
|
signing_key:
|
397
388
|
specification_version: 4
|
398
389
|
summary: Decidim consultations module
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Consultations
|
5
|
-
class QuestionTitleScrubber < Decidim::UserInputScrubber
|
6
|
-
private
|
7
|
-
|
8
|
-
def custom_allowed_tags
|
9
|
-
%w(strong em u b i br ul ol li p a code)
|
10
|
-
end
|
11
|
-
|
12
|
-
def custom_allowed_attributes
|
13
|
-
%w(class href target rel)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Consultations
|
5
|
-
# Service that encapsulates all logic related to filtering consultations.
|
6
|
-
class ConsultationSearch < Searchlight::Search
|
7
|
-
# Public: Initializes the service.
|
8
|
-
# page - The page number to paginate the results.
|
9
|
-
# per_page - The number of proposals to return per page.
|
10
|
-
def initialize(options = {})
|
11
|
-
super(options)
|
12
|
-
end
|
13
|
-
|
14
|
-
def base_query
|
15
|
-
Decidim::Consultation.where(organization: options[:organization]).published
|
16
|
-
end
|
17
|
-
|
18
|
-
# Handle the search_text filter
|
19
|
-
def search_search_text
|
20
|
-
query
|
21
|
-
.where(Arel.sql("title->>'#{current_locale}' ILIKE ?").to_s, "%#{search_text}%")
|
22
|
-
.or(
|
23
|
-
query.where(Arel.sql("description->>'#{current_locale}' ILIKE ?").to_s, "%#{search_text}%")
|
24
|
-
)
|
25
|
-
.or(
|
26
|
-
query.where(Arel.sql("subtitle->>'#{current_locale}' ILIKE ?").to_s, "%#{search_text}%")
|
27
|
-
)
|
28
|
-
end
|
29
|
-
|
30
|
-
# Handle the state filter
|
31
|
-
def search_state
|
32
|
-
case state
|
33
|
-
when "active"
|
34
|
-
query.active
|
35
|
-
when "upcoming"
|
36
|
-
query.upcoming
|
37
|
-
when "finished"
|
38
|
-
query.finished
|
39
|
-
else # Assume all
|
40
|
-
query
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
private
|
45
|
-
|
46
|
-
def current_locale
|
47
|
-
I18n.locale.to_s
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
data/config/environment.rb
DELETED
File without changes
|
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:
|