decidim-consultations 0.18.1 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/decidim_consultations_manifest.css +0 -1
  3. data/app/assets/config/decidim_consultations_manifest.js +1 -1
  4. data/app/assets/javascripts/decidim/consultations/utils_multiple.js +21 -0
  5. data/app/assets/javascripts/decidim/consultations/vote_dialog.js +13 -0
  6. data/app/cells/decidim/consultations/consultation_m/data.erb +2 -2
  7. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations_cell.rb +1 -0
  8. data/app/commands/decidim/consultations/admin/create_consultation.rb +2 -0
  9. data/app/commands/decidim/consultations/admin/create_question.rb +2 -0
  10. data/app/commands/decidim/consultations/admin/create_response.rb +1 -0
  11. data/app/commands/decidim/consultations/admin/update_consultation.rb +1 -0
  12. data/app/commands/decidim/consultations/admin/update_question.rb +1 -0
  13. data/app/commands/decidim/consultations/admin/update_question_configuration.rb +55 -0
  14. data/app/commands/decidim/consultations/admin/update_response.rb +1 -0
  15. data/app/commands/decidim/consultations/multiple_vote_question.rb +47 -0
  16. data/app/controllers/concerns/decidim/consultations/admin/question_admin.rb +1 -0
  17. data/app/controllers/concerns/decidim/consultations/needs_question.rb +24 -2
  18. data/app/controllers/concerns/decidim/consultations/orderable.rb +1 -21
  19. data/app/controllers/decidim/consultations/admin/consultations_controller.rb +7 -1
  20. data/app/controllers/decidim/consultations/admin/question_configuration_controller.rb +54 -0
  21. data/app/controllers/decidim/consultations/admin/question_permissions_controller.rb +36 -0
  22. data/app/controllers/decidim/consultations/admin/questions_controller.rb +1 -0
  23. data/app/controllers/decidim/consultations/authorization_vote_modals_controller.rb +26 -0
  24. data/app/controllers/decidim/consultations/consultations_controller.rb +1 -1
  25. data/app/controllers/decidim/consultations/question_multiple_votes_controller.rb +39 -0
  26. data/app/controllers/decidim/consultations/question_votes_controller.rb +1 -1
  27. data/app/forms/decidim/consultations/admin/question_configuration_form.rb +27 -0
  28. data/app/forms/decidim/consultations/multi_vote_form.rb +41 -0
  29. data/app/forms/decidim/consultations/vote_form.rb +1 -0
  30. data/app/helpers/decidim/consultations/questions_helper.rb +25 -4
  31. data/app/models/decidim/consultation.rb +9 -7
  32. data/app/models/decidim/consultations/question.rb +26 -7
  33. data/app/models/decidim/consultations/vote.rb +11 -1
  34. data/app/permissions/decidim/consultations/admin/permissions.rb +1 -1
  35. data/app/permissions/decidim/consultations/permissions.rb +10 -0
  36. data/app/views/decidim/consultations/admin/consultations/edit.html.erb +4 -1
  37. data/app/views/decidim/consultations/admin/consultations/index.html.erb +2 -2
  38. data/app/views/decidim/consultations/admin/consultations/results.html.erb +42 -0
  39. data/app/views/decidim/consultations/admin/question_configuration/_form.html.erb +19 -0
  40. data/app/views/decidim/consultations/admin/question_configuration/edit.html.erb +12 -0
  41. data/app/views/decidim/consultations/admin/questions/edit.html.erb +1 -0
  42. data/app/views/decidim/consultations/admin/questions/index.html.erb +6 -2
  43. data/app/views/decidim/consultations/consultations/_consultations.html.erb +1 -1
  44. data/app/views/decidim/consultations/consultations/_highlighted_questions.html.erb +7 -5
  45. data/app/views/decidim/consultations/question_multiple_votes/_form.html.erb +14 -0
  46. data/app/views/decidim/consultations/question_multiple_votes/_results_rules.html.erb +14 -0
  47. data/app/views/decidim/consultations/question_multiple_votes/_voting_rules.html.erb +29 -0
  48. data/app/views/decidim/consultations/question_multiple_votes/show.html.erb +36 -0
  49. data/app/views/decidim/consultations/question_votes/update_vote_button.js.erb +9 -0
  50. data/app/views/decidim/consultations/questions/_results.html.erb +4 -0
  51. data/app/views/decidim/consultations/questions/_vote_button.html.erb +29 -4
  52. data/app/views/decidim/consultations/questions/_vote_modal_confirm.html.erb +1 -0
  53. data/app/views/decidim/consultations/questions/show.html.erb +1 -1
  54. data/app/views/layouts/decidim/_question_header.html.erb +2 -14
  55. data/app/views/layouts/decidim/_question_header_buttons.html.erb +11 -0
  56. data/app/views/layouts/decidim/admin/consultation.html.erb +4 -0
  57. data/app/views/layouts/decidim/admin/question.html.erb +66 -44
  58. data/app/views/layouts/decidim/question.html.erb +3 -3
  59. data/app/views/layouts/decidim/question_multivote.html.erb +9 -0
  60. data/config/locales/ar.yml +8 -0
  61. data/config/locales/ca.yml +51 -0
  62. data/config/locales/cs.yml +51 -0
  63. data/config/locales/en.yml +51 -0
  64. data/config/locales/es-MX.yml +13 -0
  65. data/config/locales/es-PY.yml +13 -0
  66. data/config/locales/es.yml +51 -0
  67. data/config/locales/fi-plain.yml +51 -0
  68. data/config/locales/fi.yml +51 -0
  69. data/config/locales/fr.yml +50 -0
  70. data/config/locales/hu.yml +51 -0
  71. data/config/locales/it.yml +15 -0
  72. data/config/locales/nl.yml +52 -1
  73. data/config/locales/sv.yml +9 -0
  74. data/config/locales/tr-TR.yml +5 -0
  75. data/db/migrate/20190702162755_add_options_to_decidim_consultations_questions.rb +8 -0
  76. data/db/migrate/20190710121122_add_free_instructions_field_to_consultations_questions.rb +7 -0
  77. data/lib/decidim/consultations/admin_engine.rb +3 -0
  78. data/lib/decidim/consultations/engine.rb +4 -0
  79. data/lib/decidim/consultations/participatory_space.rb +5 -0
  80. data/lib/decidim/consultations/test/factories.rb +5 -0
  81. data/lib/decidim/consultations/version.rb +1 -1
  82. metadata +29 -11
  83. data/app/assets/javascripts/decidim/consultations/social_share.js +0 -2
  84. data/app/assets/stylesheets/decidim/consultations/social_share.css.scss +0 -18
@@ -19,6 +19,9 @@ hu:
19
19
  hashtag: Kettőskereszt
20
20
  hero_image: Kezdő kép
21
21
  i_frame_url: Külső szavazási rendszer URL
22
+ instructions: A szavazást kiegészítő utasítások
23
+ max_votes: A szavazatok maximális száma
24
+ min_votes: A szavazatok minimális száma
22
25
  origin_scope: Hatáskör
23
26
  origin_title: Kiindulópont
24
27
  origin_url: Kiindulópont URL
@@ -33,10 +36,21 @@ hu:
33
36
  vote: Külső szavazási rendszer
34
37
  what_is_decided: Mi a döntés
35
38
  errors:
39
+ models:
40
+ question:
41
+ attributes:
42
+ max_votes:
43
+ lower_than_min: A szavazatok maximális számának nagyobbnak vagy egyenlőnek kell lennie, mint a minimum.
36
44
  vote:
37
45
  decidim_consultations_response_id:
38
46
  not_found: Válasz nem található.
39
47
  activerecord:
48
+ errors:
49
+ models:
50
+ decidim/consultations/vote:
51
+ attributes:
52
+ question:
53
+ invalid_num_votes: Érvénytelen szavazatok száma
40
54
  models:
41
55
  decidim/consultation:
42
56
  one: Konzultáció
@@ -87,6 +101,10 @@ hu:
87
101
  new:
88
102
  create: Létrehozás
89
103
  title: Új konzultáció
104
+ results:
105
+ not_visible: Az eredmények a konzultáció lezárásakor lesznek elérhetőek
106
+ participants: "%{count} résztvevő"
107
+ total_votes: 'Összes: %{count} szavazat'
90
108
  update:
91
109
  error: Hiba történt a konzultáció frissítése során.
92
110
  success: A konzultáció frissítése sikeres.
@@ -95,8 +113,10 @@ hu:
95
113
  consultations_submenu:
96
114
  info: Információ
97
115
  questions: Kérdések
116
+ results: Eredmények
98
117
  questions_submenu:
99
118
  components: Elemek
119
+ configuration: Konfiguráció
100
120
  consultation: Konzultáció
101
121
  info: Információ
102
122
  responses: Válaszok
@@ -124,6 +144,11 @@ hu:
124
144
  name:
125
145
  one: Válasz
126
146
  other: Válaszok
147
+ question_configuration:
148
+ disable_external_voting: Kérjük, tiltsa le a külső szavazást speciális konfigurációkhoz
149
+ form:
150
+ help: Állítson be több választási kérdést azáltal, hogy növeli a résztvevő által választható válaszok maximális számát. Az alapértelmezett maximális érték 1, azaz csak egy választ lehet megszavazni.
151
+ title: Haladó konfiguráció
127
152
  question_publications:
128
153
  create:
129
154
  error: Hiba történt a kérdés közzététele során.
@@ -171,6 +196,7 @@ hu:
171
196
  consultations: Konzultációk
172
197
  questions: Kérdések
173
198
  responses: Válaszok
199
+ results: Eredmények
174
200
  consultations:
175
201
  admin:
176
202
  content_blocks:
@@ -227,9 +253,28 @@ hu:
227
253
  votes_out_of:
228
254
  one: 'szavazat ennyiből:'
229
255
  other: szavazatok
256
+ question_multiple_votes:
257
+ results_rules:
258
+ minimum_votes_per_user:
259
+ description: A résztvevők legalább %{votes} szavazatot oszthatnak el lehetőségek között.
260
+ title: Ebben a kérdésben több választás lehetséges
261
+ total_participants: Összesen %{count} ember vett részt a szavazásban.
262
+ vote_limit:
263
+ description: A résztvevők akár %{limit} opcióról szavazhatnak.
264
+ voting_rules:
265
+ minimum_votes_per_user:
266
+ description: A különféle lehetőségek között el kell osztania legalább %{votes} szavazatot.
267
+ title: 'A szavazásra ezen szabályok vonatkoznak:'
268
+ vote_limit:
269
+ description: Legfeljebb %{limit} javaslatról szavazhatsz.
270
+ left: Hátralévő
271
+ votes: Szavazatok
230
272
  question_votes:
231
273
  create:
232
274
  error: Hiba történt a kérdésre való szavazás során
275
+ success: Megváltoztathatod a konzultáció végéig. Csak az utolsó szavazás kerül elfogadásra.
276
+ title_error: Szavazati hiba!
277
+ title_success: Sikeres szavazat regisztráció
233
278
  regular_questions:
234
279
  title: Konzultációra vonatkozó kérdések
235
280
  show:
@@ -274,6 +319,7 @@ hu:
274
319
  already_voted: Már szavaztál
275
320
  already_voted_hover: A szavazás visszavonása
276
321
  starting_from: '%{date} óta'
322
+ verification_required: Ellenőrizd fiókod a szavazáshoz
277
323
  vote: Szavazás
278
324
  vote_modal:
279
325
  contextual_help: Válassz az opciók közül.
@@ -283,6 +329,10 @@ hu:
283
329
  confirm: Megerősítés
284
330
  contextual_help: Erősítsd meg a kiválasztott opciót.
285
331
  title: 'Konzultáció: erősítsd meg a szavazatot'
332
+ resources:
333
+ consultations:
334
+ actions:
335
+ vote: Szavazás
286
336
  layouts:
287
337
  decidim:
288
338
  admin:
@@ -296,3 +346,4 @@ hu:
296
346
  unfold: Kibontás
297
347
  question_header:
298
348
  back_to_consultation: Összes konzultáció megtekintése
349
+ back_to_question: Vissza a kérdéshez
@@ -19,6 +19,8 @@ it:
19
19
  hashtag: hashtag
20
20
  hero_image: Immagine della home page
21
21
  i_frame_url: URL del sistema di votazione esterno
22
+ max_votes: Massimo numero di voti
23
+ min_votes: Minimo numero di voti
22
24
  origin_scope: Scopo
23
25
  origin_title: Origine
24
26
  origin_url: URL di origine
@@ -87,6 +89,9 @@ it:
87
89
  new:
88
90
  create: Creare
89
91
  title: Nuova consultazione
92
+ results:
93
+ not_visible: I risultati saranno disponibili alla chiusura delle consultazioni
94
+ total_votes: 'Totale: %{count} voti'
90
95
  update:
91
96
  error: Si è verificato un errore durante l'aggiornamento di questa consultazione.
92
97
  success: Consultazione aggiornata con successo.
@@ -95,6 +100,7 @@ it:
95
100
  consultations_submenu:
96
101
  info: Informazione
97
102
  questions: Domande
103
+ results: Risultati
98
104
  questions_submenu:
99
105
  components: componenti
100
106
  consultation: Consultazione
@@ -171,6 +177,7 @@ it:
171
177
  consultations: consultazioni
172
178
  questions: Domande
173
179
  responses: risposte
180
+ results: Risultati
174
181
  consultations:
175
182
  admin:
176
183
  content_blocks:
@@ -230,6 +237,9 @@ it:
230
237
  question_votes:
231
238
  create:
232
239
  error: Ci sono stati errori nel votare la domanda
240
+ success: La modifica può essere effettuata fino al termine della consultazione. Solo l'ultimo voto sarà accettato.
241
+ title_error: Errore di voto!
242
+ title_success: Voto registrato con successo
233
243
  regular_questions:
234
244
  title: Domande per questa consultazione
235
245
  show:
@@ -274,6 +284,7 @@ it:
274
284
  already_voted: Già votato
275
285
  already_voted_hover: Revoca il supporto
276
286
  starting_from: A partire da %{date}
287
+ verification_required: Verifica il tuo account per votare
277
288
  vote: Votazione
278
289
  vote_modal:
279
290
  contextual_help: Per favore selezionate un'opzione.
@@ -283,6 +294,10 @@ it:
283
294
  confirm: Confermare
284
295
  contextual_help: Si prega di confermare l'opzione selezionata.
285
296
  title: 'Consultazione: conferma il supporto'
297
+ resources:
298
+ consultations:
299
+ actions:
300
+ vote: Vota
286
301
  layouts:
287
302
  decidim:
288
303
  admin:
@@ -2,7 +2,7 @@ nl:
2
2
  activemodel:
3
3
  attributes:
4
4
  consultation:
5
- banner_image: Banner afbeelding
5
+ banner_image: Bannerafbeelding
6
6
  decidim_highlighted_scope_id: Gemarkeerde scope
7
7
  description: Omschrijving
8
8
  end_voting_date: Stemmen eindigt
@@ -19,6 +19,9 @@ nl:
19
19
  hashtag: Hashtag
20
20
  hero_image: Home afbeelding
21
21
  i_frame_url: URL van het externe stemsysteem
22
+ instructions: Extra instructies voor stemmen
23
+ max_votes: Maximum aantal stemmen
24
+ min_votes: Minimaal aantal stemmen
22
25
  origin_scope: Scope
23
26
  origin_title: Oorsprong
24
27
  origin_url: Origin URL
@@ -33,10 +36,21 @@ nl:
33
36
  vote: Extern stemsysteem
34
37
  what_is_decided: Wat besloten werd
35
38
  errors:
39
+ models:
40
+ question:
41
+ attributes:
42
+ max_votes:
43
+ lower_than_min: Maximum aantal stemmen moet hoger of gelijk zijn aan het minimum.
36
44
  vote:
37
45
  decidim_consultations_response_id:
38
46
  not_found: Reactie niet gevonden.
39
47
  activerecord:
48
+ errors:
49
+ models:
50
+ decidim/consultations/vote:
51
+ attributes:
52
+ question:
53
+ invalid_num_votes: Aantal stemmen is ongeldig
40
54
  models:
41
55
  decidim/consultation:
42
56
  one: Raadpleging
@@ -87,6 +101,10 @@ nl:
87
101
  new:
88
102
  create: Aanmaken
89
103
  title: Nieuwe burgerinspraak
104
+ results:
105
+ not_visible: Resultaten zijn beschikbaar wanneer raadpleging wordt gesloten
106
+ participants: "%{count} deelnemers"
107
+ total_votes: 'Totaal: %{count} stemmen'
90
108
  update:
91
109
  error: Er is een fout opgetreden bij het bijwerken van dit overleg.
92
110
  success: Overleg succesvol bijgewerkt.
@@ -95,8 +113,10 @@ nl:
95
113
  consultations_submenu:
96
114
  info: Informatie
97
115
  questions: vragen
116
+ results: Resultaten
98
117
  questions_submenu:
99
118
  components: Onderdelen
119
+ configuration: Configuratie
100
120
  consultation: Raadpleging
101
121
  info: Informatie
102
122
  responses: Antwoorden
@@ -124,6 +144,11 @@ nl:
124
144
  name:
125
145
  one: Antwoord
126
146
  other: Antwoorden
147
+ question_configuration:
148
+ disable_external_voting: Schakel externe stem uit voor geavanceerde configuraties
149
+ form:
150
+ help: Stel meerdere keuzes in door het maximum aantal antwoorden dat een deelnemer kan kiezen te verhogen. Standaard maximale waarde is 1, wat betekent dat slechts één reactie kan worden gestemd.
151
+ title: Geavanceerde instellingen
127
152
  question_publications:
128
153
  create:
129
154
  error: Er is een fout opgetreden bij het publiceren van deze vraag.
@@ -171,6 +196,7 @@ nl:
171
196
  consultations: Burgerinspraak
172
197
  questions: vragen
173
198
  responses: Antwoorden
199
+ results: Resultaten
174
200
  consultations:
175
201
  admin:
176
202
  content_blocks:
@@ -227,9 +253,28 @@ nl:
227
253
  votes_out_of:
228
254
  one: stem uit
229
255
  other: stemmen uit
256
+ question_multiple_votes:
257
+ results_rules:
258
+ minimum_votes_per_user:
259
+ description: U moet een minimum van %{votes} stemmen verdelen over verschillende voorstellen.
260
+ title: Bij deze vraag waren meerdere keuzes toegestaan
261
+ total_participants: Een totaal van %{count} mensen heeft deelgenomen aan de stemming.
262
+ vote_limit:
263
+ description: Deelnemers konden stemmen tot %{limit} opties.
264
+ voting_rules:
265
+ minimum_votes_per_user:
266
+ description: U moet een minimum van %{votes} stemmen verdelen over verschillende voorstellen.
267
+ title: 'Stemmen zijn onderworpen aan de volgende regels:'
268
+ vote_limit:
269
+ description: U kunt tot %{limit} voorstellen stemmen.
270
+ left: Resterend
271
+ votes: Stemmen
230
272
  question_votes:
231
273
  create:
232
274
  error: Er zijn fouten opgetreden bij het stemmen op de vraag
275
+ success: U kunt uw stem wijzigen tot het einde van de raadpleging, maar alleen de laatste keuze zal worden aangenomen.
276
+ title_error: Stemfout!
277
+ title_success: Stem succesvol geregistreerd
233
278
  regular_questions:
234
279
  title: Vragen voor dit consult
235
280
  show:
@@ -274,6 +319,7 @@ nl:
274
319
  already_voted: Reeds gestemd
275
320
  already_voted_hover: Herroep stem
276
321
  starting_from: Te beginnen op %{date}
322
+ verification_required: Verifieer je account om te kunnen stemmen
277
323
  vote: Stem
278
324
  vote_modal:
279
325
  contextual_help: Maak een keuze a.u.b.
@@ -283,6 +329,10 @@ nl:
283
329
  confirm: Bevestig
284
330
  contextual_help: Bevestig de geselecteerde optie.
285
331
  title: 'Raadpleging: bevestig stem'
332
+ resources:
333
+ consultations:
334
+ actions:
335
+ vote: Stem
286
336
  layouts:
287
337
  decidim:
288
338
  admin:
@@ -296,3 +346,4 @@ nl:
296
346
  unfold: Uitklappen
297
347
  question_header:
298
348
  back_to_consultation: Bekijk alle burgerinspraken
349
+ back_to_question: Terug naar de vraag
@@ -87,6 +87,9 @@ sv:
87
87
  new:
88
88
  create: Skapa
89
89
  title: Nytt samråd
90
+ results:
91
+ not_visible: Resultaten kommer att vara tillgängliga när samrådet har avslutats
92
+ total_votes: 'Totalt: %{count} röster'
90
93
  update:
91
94
  error: Det gick inte att uppdatera samrådet.
92
95
  success: Samrådet har uppdaterats.
@@ -95,6 +98,7 @@ sv:
95
98
  consultations_submenu:
96
99
  info: Information
97
100
  questions: Frågor
101
+ results: Resultat
98
102
  questions_submenu:
99
103
  components: Komponenter
100
104
  consultation: Samråd
@@ -171,6 +175,7 @@ sv:
171
175
  consultations: Samråd
172
176
  questions: Frågor
173
177
  responses: Svar
178
+ results: Resultat
174
179
  consultations:
175
180
  admin:
176
181
  content_blocks:
@@ -283,6 +288,10 @@ sv:
283
288
  confirm: Bekräfta
284
289
  contextual_help: Bekräfta det valda alternativet.
285
290
  title: 'Samråd: bekräfta röst'
291
+ resources:
292
+ consultations:
293
+ actions:
294
+ vote: Rösta
286
295
  layouts:
287
296
  decidim:
288
297
  admin:
@@ -87,6 +87,9 @@ tr:
87
87
  new:
88
88
  create: yaratmak
89
89
  title: Yeni danışma
90
+ results:
91
+ not_visible: Danışma kapatıldığında sonuçlar ulaşılabilir olacak
92
+ total_votes: 'Toplam: %{count} oy'
90
93
  update:
91
94
  error: Bu danışma hizmetini güncellerken bir hata oluştu.
92
95
  success: Danışma başarıyla güncellendi.
@@ -95,6 +98,7 @@ tr:
95
98
  consultations_submenu:
96
99
  info: Bilgi
97
100
  questions: Sorular
101
+ results: Sonuçlar
98
102
  questions_submenu:
99
103
  components: Bileşenler
100
104
  consultation: konsültasyon
@@ -171,6 +175,7 @@ tr:
171
175
  consultations: istişareler
172
176
  questions: Sorular
173
177
  responses: Tepkiler
178
+ results: Sonuçlar
174
179
  consultations:
175
180
  admin:
176
181
  content_blocks:
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddOptionsToDecidimConsultationsQuestions < ActiveRecord::Migration[5.2]
4
+ def change
5
+ add_column :decidim_consultations_questions, :max_votes, :integer
6
+ add_column :decidim_consultations_questions, :min_votes, :integer
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddFreeInstructionsFieldToConsultationsQuestions < ActiveRecord::Migration[5.2]
4
+ def change
5
+ add_column :decidim_consultations_questions, :instructions, :jsonb
6
+ end
7
+ end
@@ -15,10 +15,13 @@ module Decidim
15
15
 
16
16
  routes do
17
17
  resources :consultations, param: :slug, except: [:show, :destroy] do
18
+ get :results, on: :member
18
19
  resource :publish, controller: "consultation_publications", only: [:create, :destroy]
19
20
  resource :publish_results, controller: "consultation_results_publications", only: [:create, :destroy]
20
21
  resources :questions, param: :slug, except: :show, shallow: true do
21
22
  resource :publish, controller: "question_publications", only: [:create, :destroy]
23
+ resource :permissions, controller: "question_permissions"
24
+ resource :configuration, controller: "question_configuration", only: [:edit, :update]
22
25
  end
23
26
  end
24
27
 
@@ -25,8 +25,12 @@ module Decidim
25
25
  resource :consultation_widget, only: :show, path: "embed"
26
26
 
27
27
  resources :questions, only: [:show], param: :slug, path: "questions", shallow: true do
28
+ member do
29
+ get :authorization_vote_modal, to: "authorization_vote_modals#show"
30
+ end
28
31
  resource :question_widget, only: :show, path: "embed"
29
32
  resource :question_votes, only: [:create, :destroy], path: "vote"
33
+ resource :question_multiple_votes, only: [:create, :show], path: "multivote"
30
34
  end
31
35
  end
32
36
 
@@ -26,6 +26,11 @@ Decidim.register_participatory_space(:consultations) do |participatory_space|
26
26
  resource.card = "decidim/consultations/consultation"
27
27
  end
28
28
 
29
+ participatory_space.register_resource(:question) do |resource|
30
+ resource.model_class_name = "Decidim::Consultations::Question"
31
+ resource.actions = %w(vote)
32
+ end
33
+
29
34
  participatory_space.seeds do
30
35
  seeds_root = File.join(__dir__, "..", "..", "..", "db", "seeds")
31
36
  organization = Decidim::Organization.first
@@ -89,6 +89,11 @@ FactoryBot.define do
89
89
  external_voting { true }
90
90
  i_frame_url { "http://example.org" }
91
91
  end
92
+
93
+ trait :multiple do
94
+ min_votes { 2 }
95
+ max_votes { 3 }
96
+ end
92
97
  end
93
98
 
94
99
  factory :response, class: "Decidim::Consultations::Response" do