decidim-consultations 0.26.2 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +1 -1
  3. data/app/commands/decidim/consultations/admin/create_consultation.rb +1 -1
  4. data/app/commands/decidim/consultations/admin/create_question.rb +1 -1
  5. data/app/commands/decidim/consultations/admin/create_response.rb +1 -1
  6. data/app/commands/decidim/consultations/admin/create_response_group.rb +1 -1
  7. data/app/commands/decidim/consultations/admin/destroy_response_group.rb +1 -1
  8. data/app/commands/decidim/consultations/admin/publish_consultation.rb +1 -1
  9. data/app/commands/decidim/consultations/admin/publish_consultation_results.rb +1 -1
  10. data/app/commands/decidim/consultations/admin/publish_question.rb +1 -1
  11. data/app/commands/decidim/consultations/admin/unpublish_consultation.rb +1 -1
  12. data/app/commands/decidim/consultations/admin/unpublish_consultation_results.rb +1 -1
  13. data/app/commands/decidim/consultations/admin/unpublish_question.rb +1 -1
  14. data/app/commands/decidim/consultations/admin/update_consultation.rb +1 -1
  15. data/app/commands/decidim/consultations/admin/update_question.rb +1 -1
  16. data/app/commands/decidim/consultations/admin/update_question_configuration.rb +1 -1
  17. data/app/commands/decidim/consultations/admin/update_response.rb +1 -1
  18. data/app/commands/decidim/consultations/admin/update_response_group.rb +1 -1
  19. data/app/commands/decidim/consultations/multiple_vote_question.rb +1 -1
  20. data/app/commands/decidim/consultations/unvote_question.rb +1 -1
  21. data/app/commands/decidim/consultations/vote_question.rb +1 -1
  22. data/app/controllers/decidim/consultations/consultations_controller.rb +5 -12
  23. data/app/forms/decidim/consultations/admin/consultation_form.rb +1 -1
  24. data/app/helpers/decidim/consultations/consultations_helper.rb +1 -1
  25. data/app/helpers/decidim/consultations/questions_helper.rb +3 -3
  26. data/app/models/decidim/consultation.rb +9 -3
  27. data/app/permissions/decidim/consultations/permissions.rb +1 -3
  28. data/app/presenters/decidim/consultations/question_stats_presenter.rb +4 -2
  29. data/app/queries/decidim/consultations/admin/admin_users.rb +1 -1
  30. data/app/queries/decidim/consultations/organization_active_consultations.rb +1 -1
  31. data/app/queries/decidim/consultations/organization_consultations.rb +1 -1
  32. data/app/queries/decidim/consultations/organization_questions.rb +1 -1
  33. data/app/views/decidim/consultations/consultations/_filters.html.erb +4 -4
  34. data/app/views/decidim/consultations/consultations/index.html.erb +3 -1
  35. data/app/views/decidim/consultations/question_multiple_votes/_voting_rules.html.erb +3 -1
  36. data/app/views/decidim/consultations/questions/_vote_button.html.erb +3 -1
  37. data/app/views/decidim/consultations/questions/_vote_modal_confirm.html.erb +1 -0
  38. data/app/views/decidim/consultations/questions/show.html.erb +3 -1
  39. data/config/locales/am-ET.yml +1 -0
  40. data/config/locales/ar.yml +2 -1
  41. data/config/locales/bg.yml +1 -0
  42. data/config/locales/ca.yml +2 -1
  43. data/config/locales/cs.yml +2 -1
  44. data/config/locales/da.yml +1 -0
  45. data/config/locales/de.yml +2 -1
  46. data/config/locales/el.yml +1 -1
  47. data/config/locales/en.yml +1 -1
  48. data/config/locales/eo.yml +1 -0
  49. data/config/locales/es-MX.yml +2 -1
  50. data/config/locales/es-PY.yml +2 -1
  51. data/config/locales/es.yml +2 -1
  52. data/config/locales/et.yml +1 -0
  53. data/config/locales/eu.yml +1 -1
  54. data/config/locales/fi-plain.yml +2 -1
  55. data/config/locales/fi.yml +2 -1
  56. data/config/locales/fr-CA.yml +2 -1
  57. data/config/locales/fr.yml +2 -1
  58. data/config/locales/ga-IE.yml +1 -1
  59. data/config/locales/gl.yml +2 -1
  60. data/config/locales/hr.yml +1 -0
  61. data/config/locales/hu.yml +2 -1
  62. data/config/locales/id-ID.yml +1 -1
  63. data/config/locales/is-IS.yml +2 -1
  64. data/config/locales/it.yml +1 -1
  65. data/config/locales/ja.yml +2 -1
  66. data/config/locales/ko.yml +1 -0
  67. data/config/locales/lb.yml +1 -1
  68. data/config/locales/lt.yml +1 -0
  69. data/config/locales/lv.yml +1 -1
  70. data/config/locales/mt.yml +1 -0
  71. data/config/locales/nl.yml +1 -1
  72. data/config/locales/no.yml +1 -1
  73. data/config/locales/om-ET.yml +1 -0
  74. data/config/locales/pl.yml +1 -1
  75. data/config/locales/pt-BR.yml +2 -2
  76. data/config/locales/pt.yml +1 -1
  77. data/config/locales/ro-RO.yml +2 -1
  78. data/config/locales/ru.yml +1 -1
  79. data/config/locales/si-LK.yml +1 -0
  80. data/config/locales/sk.yml +1 -1
  81. data/config/locales/sl.yml +1 -0
  82. data/config/locales/so-SO.yml +1 -0
  83. data/config/locales/sr-CS.yml +1 -0
  84. data/config/locales/sv.yml +2 -1
  85. data/config/locales/sw-KE.yml +1 -0
  86. data/config/locales/ti-ER.yml +1 -0
  87. data/config/locales/tr-TR.yml +1 -1
  88. data/config/locales/uk.yml +1 -1
  89. data/config/locales/val-ES.yml +1 -0
  90. data/config/locales/vi.yml +1 -0
  91. data/config/locales/zh-CN.yml +1 -1
  92. data/config/locales/zh-TW.yml +1 -0
  93. data/lib/decidim/consultations/participatory_space.rb +7 -7
  94. data/lib/decidim/consultations/version.rb +1 -1
  95. metadata +14 -15
  96. data/app/services/decidim/consultations/consultation_search.rb +0 -51
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fi-pl:
2
3
  activemodel:
3
4
  attributes:
@@ -251,9 +252,9 @@ fi-pl:
251
252
  filters:
252
253
  active: Aktiiviset
253
254
  all: Kaikki
255
+ date: Päivämäärä
254
256
  finished: Valmiit
255
257
  search: Hae
256
- state: Tila
257
258
  upcoming: Tulevat
258
259
  filters_small_view:
259
260
  close_modal: Sulje ikkuna
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fi:
2
3
  activemodel:
3
4
  attributes:
@@ -251,9 +252,9 @@ fi:
251
252
  filters:
252
253
  active: Aktiiviset
253
254
  all: Kaikki
255
+ date: Päivämäärä
254
256
  finished: Valmiit
255
257
  search: Hae
256
- state: Tila
257
258
  upcoming: Tulevat
258
259
  filters_small_view:
259
260
  close_modal: Sulje ikkuna
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fr-CA:
2
3
  activemodel:
3
4
  attributes:
@@ -251,9 +252,9 @@ fr-CA:
251
252
  filters:
252
253
  active: Actives
253
254
  all: Tout
255
+ date: Date
254
256
  finished: Passées
255
257
  search: Rechercher
256
- state: État
257
258
  upcoming: À venir
258
259
  filters_small_view:
259
260
  close_modal: Fermer la fenêtre
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fr:
2
3
  activemodel:
3
4
  attributes:
@@ -251,9 +252,9 @@ fr:
251
252
  filters:
252
253
  active: Actives
253
254
  all: Tout
255
+ date: Date
254
256
  finished: Passées
255
257
  search: Rechercher
256
- state: État
257
258
  upcoming: À venir
258
259
  filters_small_view:
259
260
  close_modal: Fermer la fenêtre
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ga:
2
3
  activemodel:
3
4
  attributes:
@@ -95,7 +96,6 @@ ga:
95
96
  all: Uile
96
97
  finished: Críochnaithe
97
98
  search: Cuardaigh
98
- state: Stádas
99
99
  upcoming: Le teacht
100
100
  filters_small_view:
101
101
  filter: Scag
@@ -1,3 +1,4 @@
1
+ ---
1
2
  gl:
2
3
  activemodel:
3
4
  attributes:
@@ -197,9 +198,9 @@ gl:
197
198
  filters:
198
199
  active: Activo
199
200
  all: Todo
201
+ date: Data
200
202
  finished: Terminado
201
203
  search: Busca
202
- state: Estado
203
204
  upcoming: Próximos
204
205
  filters_small_view:
205
206
  close_modal: Pechar ventá
@@ -1 +1,2 @@
1
+ ---
1
2
  hr:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  hu:
2
3
  activemodel:
3
4
  attributes:
@@ -248,9 +249,9 @@ hu:
248
249
  filters:
249
250
  active: Aktív
250
251
  all: Összes
252
+ date: Dátum
251
253
  finished: Befejezett
252
254
  search: Keresés
253
- state: Állapot
254
255
  upcoming: Közelgő
255
256
  filters_small_view:
256
257
  close_modal: Ablak bezárása
@@ -1,3 +1,4 @@
1
+ ---
1
2
  id:
2
3
  activemodel:
3
4
  attributes:
@@ -191,7 +192,6 @@ id:
191
192
  all: Semua
192
193
  finished: Jadi
193
194
  search: Pencarian
194
- state: Negara
195
195
  upcoming: Mendatang
196
196
  filters_small_view:
197
197
  close_modal: Tutup jendela
@@ -1,4 +1,5 @@
1
- is-IS:
1
+ ---
2
+ is:
2
3
  activemodel:
3
4
  attributes:
4
5
  consultation:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  it:
2
3
  activemodel:
3
4
  attributes:
@@ -253,7 +254,6 @@ it:
253
254
  all: Tutti
254
255
  finished: Finito
255
256
  search: Ricerca
256
- state: Stato
257
257
  upcoming: Prossime
258
258
  filters_small_view:
259
259
  close_modal: Chiudi la finestra
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ja:
2
3
  activemodel:
3
4
  attributes:
@@ -243,9 +244,9 @@ ja:
243
244
  filters:
244
245
  active: アクティブ
245
246
  all: すべて
247
+ date: 日付
246
248
  finished: 完了
247
249
  search: 検索
248
- state: ステータス
249
250
  upcoming: 近日公開
250
251
  filters_small_view:
251
252
  close_modal: ウィンドウを閉じる
@@ -1 +1,2 @@
1
+ ---
1
2
  ko:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lb:
2
3
  activemodel:
3
4
  attributes:
@@ -176,7 +177,6 @@ lb:
176
177
  all: Alle
177
178
  finished: Fertig
178
179
  search: Suche
179
- state: Zustand
180
180
  upcoming: Bevorstehende
181
181
  filters_small_view:
182
182
  close_modal: Fenster schließen
@@ -1 +1,2 @@
1
+ ---
1
2
  lt:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lv:
2
3
  activemodel:
3
4
  attributes:
@@ -258,7 +259,6 @@ lv:
258
259
  all: Visi
259
260
  finished: Pabeigtas
260
261
  search: Meklēt
261
- state: Statuss
262
262
  upcoming: Gaidāmās
263
263
  filters_small_view:
264
264
  close_modal: Aizvērt logu
@@ -1 +1,2 @@
1
+ ---
1
2
  mt:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  nl:
2
3
  activemodel:
3
4
  attributes:
@@ -253,7 +254,6 @@ nl:
253
254
  all: Alle
254
255
  finished: Voltooid
255
256
  search: Zoeken
256
- state: Staat
257
257
  upcoming: Toekomstige
258
258
  filters_small_view:
259
259
  close_modal: Sluit venster
@@ -1,3 +1,4 @@
1
+ ---
1
2
  "no":
2
3
  activemodel:
3
4
  attributes:
@@ -253,7 +254,6 @@
253
254
  all: Alle
254
255
  finished: Fullført
255
256
  search: Søk
256
- state: Status
257
257
  upcoming: Kommende
258
258
  filters_small_view:
259
259
  close_modal: Lukk vindu
@@ -1 +1,2 @@
1
+ ---
1
2
  om:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pl:
2
3
  activemodel:
3
4
  attributes:
@@ -269,7 +270,6 @@ pl:
269
270
  all: Wszystko
270
271
  finished: Zakończone
271
272
  search: Szukaj
272
- state: Status
273
273
  upcoming: Nadchodzące
274
274
  filters_small_view:
275
275
  close_modal: Zamknij okno
@@ -1,4 +1,5 @@
1
- pt-BR:
1
+ ---
2
+ pt:
2
3
  activemodel:
3
4
  attributes:
4
5
  consultation:
@@ -253,7 +254,6 @@ pt-BR:
253
254
  all: Todos
254
255
  finished: Acabado
255
256
  search: Pesquisa
256
- state: Estado
257
257
  upcoming: próximos
258
258
  filters_small_view:
259
259
  close_modal: Janela fechada
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pt:
2
3
  activemodel:
3
4
  attributes:
@@ -253,7 +254,6 @@ pt:
253
254
  all: Todos
254
255
  finished: Acabado
255
256
  search: Pesquisar
256
- state: Estado
257
257
  upcoming: Próximas
258
258
  filters_small_view:
259
259
  close_modal: Fechar janela
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ro:
2
3
  activemodel:
3
4
  attributes:
@@ -259,9 +260,9 @@ ro:
259
260
  filters:
260
261
  active: Activ
261
262
  all: Toate
263
+ date: Data
262
264
  finished: Terminat
263
265
  search: Caută
264
- state: Status
265
266
  upcoming: Urmează
266
267
  filters_small_view:
267
268
  close_modal: Închide fereastra
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ru:
2
3
  activemodel:
3
4
  attributes:
@@ -203,7 +204,6 @@ ru:
203
204
  all: Все
204
205
  finished: Завершившиеся
205
206
  search: Поиск
206
- state: Cостояние
207
207
  upcoming: Предстоящие
208
208
  filters_small_view:
209
209
  close_modal: Закрыть окно
@@ -1 +1,2 @@
1
+ ---
1
2
  si:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sk:
2
3
  activemodel:
3
4
  attributes:
@@ -266,7 +267,6 @@ sk:
266
267
  all: Všetko
267
268
  finished: Dokončené
268
269
  search: Hľadať
269
- state: Stav
270
270
  upcoming: Nadchádzajúce
271
271
  filters_small_view:
272
272
  close_modal: Zavrieť okno
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sl:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  so:
@@ -1 +1,2 @@
1
+ ---
1
2
  sr:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sv:
2
3
  activemodel:
3
4
  attributes:
@@ -251,9 +252,9 @@ sv:
251
252
  filters:
252
253
  active: Aktiv
253
254
  all: Alla
255
+ date: Datum
254
256
  finished: Avslutade
255
257
  search: Sök
256
- state: Status
257
258
  upcoming: Kommande
258
259
  filters_small_view:
259
260
  close_modal: Stäng fönstret
@@ -1 +1,2 @@
1
+ ---
1
2
  sw:
@@ -1 +1,2 @@
1
+ ---
1
2
  ti:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  tr:
2
3
  activemodel:
3
4
  attributes:
@@ -252,7 +253,6 @@ tr:
252
253
  all: Tümü
253
254
  finished: Bitti
254
255
  search: Arama
255
- state: Statü
256
256
  upcoming: Yaklaşan
257
257
  filters_small_view:
258
258
  close_modal: Pencereyi kapat
@@ -1,3 +1,4 @@
1
+ ---
1
2
  uk:
2
3
  activemodel:
3
4
  attributes:
@@ -203,7 +204,6 @@ uk:
203
204
  all: Усі
204
205
  finished: Завершені
205
206
  search: Шукати
206
- state: Стан
207
207
  upcoming: Прийдешні
208
208
  filters_small_view:
209
209
  close_modal: Закрити вікно
@@ -1 +1,2 @@
1
+ ---
1
2
  val:
@@ -1 +1,2 @@
1
+ ---
1
2
  vi:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  zh-CN:
2
3
  activemodel:
3
4
  attributes:
@@ -244,7 +245,6 @@ zh-CN:
244
245
  all: 所有的
245
246
  finished: 已完成
246
247
  search: 搜索
247
- state: 状态
248
248
  upcoming: 即将到来的
249
249
  filters_small_view:
250
250
  close_modal: 关闭窗口
@@ -1 +1,2 @@
1
+ ---
1
2
  zh-TW:
@@ -50,7 +50,7 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
50
50
  start_voting_date: Time.zone.today,
51
51
  end_voting_date: Time.zone.today + 1.month,
52
52
  organization: organization,
53
- banner_image: ActiveStorage::Blob.create_after_upload!(
53
+ banner_image: ActiveStorage::Blob.create_and_upload!(
54
54
  io: File.open(File.join(seeds_root, "city2.jpeg")),
55
55
  filename: "banner_image.jpeg",
56
56
  content_type: "image/jpeg",
@@ -82,7 +82,7 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
82
82
  start_voting_date: Time.zone.today - 2.months,
83
83
  end_voting_date: Time.zone.today - 1.month,
84
84
  organization: organization,
85
- banner_image: ActiveStorage::Blob.create_after_upload!(
85
+ banner_image: ActiveStorage::Blob.create_and_upload!(
86
86
  io: File.open(File.join(seeds_root, "city2.jpeg")),
87
87
  filename: "banner_image.jpeg",
88
88
  content_type: "image/jpeg",
@@ -113,7 +113,7 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
113
113
  start_voting_date: Time.zone.today + 1.month + 1.day,
114
114
  end_voting_date: Time.zone.today + 2.months,
115
115
  organization: organization,
116
- banner_image: ActiveStorage::Blob.create_after_upload!(
116
+ banner_image: ActiveStorage::Blob.create_and_upload!(
117
117
  io: File.open(File.join(seeds_root, "city2.jpeg")),
118
118
  filename: "banner_image.jpeg",
119
119
  content_type: "image/jpeg",
@@ -148,13 +148,13 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
148
148
  Decidim::Faker::Localized.paragraph(sentence_count: 3)
149
149
  end,
150
150
  organization: organization,
151
- hero_image: ActiveStorage::Blob.create_after_upload!(
151
+ hero_image: ActiveStorage::Blob.create_and_upload!(
152
152
  io: File.open(File.join(seeds_root, "city.jpeg")),
153
153
  filename: "hero_image.jpeg",
154
154
  content_type: "image/jpeg",
155
155
  metadata: nil
156
156
  ), # Keep after organization
157
- banner_image: ActiveStorage::Blob.create_after_upload!(
157
+ banner_image: ActiveStorage::Blob.create_and_upload!(
158
158
  io: File.open(File.join(seeds_root, "city2.jpeg")),
159
159
  filename: "banner_image.jpeg",
160
160
  content_type: "image/jpeg",
@@ -188,7 +188,7 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
188
188
  description: Decidim::Faker::Localized.sentence(word_count: 5),
189
189
  attached_to: question,
190
190
  content_type: "image/jpeg",
191
- file: ActiveStorage::Blob.create_after_upload!(
191
+ file: ActiveStorage::Blob.create_and_upload!(
192
192
  io: File.open(File.join(seeds_root, "city.jpeg")),
193
193
  filename: "city.jpeg",
194
194
  content_type: "image/jpeg",
@@ -201,7 +201,7 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
201
201
  description: Decidim::Faker::Localized.sentence(word_count: 5),
202
202
  attached_to: question,
203
203
  content_type: "application/pdf",
204
- file: ActiveStorage::Blob.create_after_upload!(
204
+ file: ActiveStorage::Blob.create_and_upload!(
205
205
  io: File.open(File.join(seeds_root, "Exampledocument.pdf")),
206
206
  filename: "Exampledocument.pdf",
207
207
  content_type: "application/pdf",
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Consultations
5
5
  def self.version
6
- "0.26.2"
6
+ "0.27.0.rc1"
7
7
  end
8
8
  end
9
9
  end
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.26.2
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: 2022-06-14 00:00:00.000000000 Z
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.26.2
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.2
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.26.2
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.26.2
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.26.2
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.26.2
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.26.2
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.26.2
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,7 +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/services/decidim/consultations/consultation_search.rb
186
185
  - app/views/decidim/consultations/_consultation.html.erb
187
186
  - app/views/decidim/consultations/admin/consultations/_form.html.erb
188
187
  - app/views/decidim/consultations/admin/consultations/edit.html.erb
@@ -377,14 +376,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
377
376
  requirements:
378
377
  - - ">="
379
378
  - !ruby/object:Gem::Version
380
- version: '2.7'
379
+ version: '3.0'
381
380
  required_rubygems_version: !ruby/object:Gem::Requirement
382
381
  requirements:
383
- - - ">="
382
+ - - ">"
384
383
  - !ruby/object:Gem::Version
385
- version: '0'
384
+ version: 1.3.1
386
385
  requirements: []
387
- rubygems_version: 3.1.6
386
+ rubygems_version: 3.2.22
388
387
  signing_key:
389
388
  specification_version: 4
390
389
  summary: Decidim consultations module
@@ -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