decidim-consultations 0.23.1 → 0.24.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/consultations/consultation_m_cell.rb +2 -0
  3. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +4 -9
  4. data/app/commands/decidim/consultations/admin/update_consultation.rb +3 -0
  5. data/app/commands/decidim/consultations/admin/update_question.rb +13 -5
  6. data/app/helpers/decidim/consultations/admin/consultation_menu_helper.rb +15 -0
  7. data/app/helpers/decidim/consultations/questions_helper.rb +2 -0
  8. data/app/views/decidim/consultations/admin/consultations/index.html.erb +4 -0
  9. data/app/views/decidim/consultations/admin/questions/index.html.erb +4 -0
  10. data/app/views/decidim/consultations/admin/response_groups/index.html.erb +2 -0
  11. data/app/views/decidim/consultations/admin/responses/index.html.erb +2 -0
  12. data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +1 -1
  13. data/app/views/decidim/consultations/consultations/_filters_small_view.html.erb +1 -1
  14. data/app/views/layouts/decidim/admin/consultation.html.erb +8 -23
  15. data/app/views/layouts/decidim/admin/consultations.html.erb +4 -0
  16. data/config/locales/ar.yml +0 -2
  17. data/config/locales/ca.yml +3 -2
  18. data/config/locales/cs.yml +9 -8
  19. data/config/locales/de.yml +8 -7
  20. data/config/locales/el.yml +0 -2
  21. data/config/locales/en.yml +3 -2
  22. data/config/locales/es-MX.yml +3 -2
  23. data/config/locales/es-PY.yml +3 -2
  24. data/config/locales/es.yml +3 -2
  25. data/config/locales/eu.yml +0 -2
  26. data/config/locales/fi-plain.yml +4 -3
  27. data/config/locales/fi.yml +7 -6
  28. data/config/locales/fr-CA.yml +3 -2
  29. data/config/locales/fr.yml +3 -2
  30. data/config/locales/gl.yml +0 -2
  31. data/config/locales/hu.yml +0 -2
  32. data/config/locales/id-ID.yml +0 -2
  33. data/config/locales/is-IS.yml +4 -0
  34. data/config/locales/it.yml +2 -2
  35. data/config/locales/ja.yml +0 -2
  36. data/config/locales/lv.yml +0 -2
  37. data/config/locales/nl.yml +8 -9
  38. data/config/locales/no.yml +0 -2
  39. data/config/locales/pl.yml +8 -7
  40. data/config/locales/pt-BR.yml +0 -2
  41. data/config/locales/pt.yml +0 -2
  42. data/config/locales/ro-RO.yml +0 -6
  43. data/config/locales/ru.yml +1 -1
  44. data/config/locales/si-LK.yml +1 -0
  45. data/config/locales/sk.yml +0 -2
  46. data/config/locales/sv.yml +0 -2
  47. data/config/locales/sw-KE.yml +1 -0
  48. data/config/locales/tr-TR.yml +117 -42
  49. data/config/locales/uk.yml +1 -1
  50. data/config/locales/zh-CN.yml +0 -2
  51. data/lib/decidim/api/consultation_question_type.rb +52 -0
  52. data/lib/decidim/api/consultation_type.rb +29 -0
  53. data/lib/decidim/consultations.rb +1 -0
  54. data/lib/decidim/consultations/admin_engine.rb +25 -1
  55. data/lib/decidim/consultations/api.rb +8 -0
  56. data/lib/decidim/consultations/engine.rb +7 -1
  57. data/lib/decidim/consultations/participatory_space.rb +24 -24
  58. data/lib/decidim/consultations/query_extensions.rb +43 -0
  59. data/lib/decidim/consultations/test/factories.rb +2 -2
  60. data/lib/decidim/consultations/version.rb +1 -1
  61. metadata +24 -19
  62. data/app/types/decidim/consultations/consultation_question_type.rb +0 -57
  63. data/app/types/decidim/consultations/consultation_type.rb +0 -32
@@ -2,7 +2,7 @@ tr:
2
2
  activemodel:
3
3
  attributes:
4
4
  consultation:
5
- banner_image: Filama görseli
5
+ banner_image: Banner resmi
6
6
  decidim_highlighted_scope_id: Vurgulanan kapsam
7
7
  description: Açıklama
8
8
  end_voting_date: Oylama biter
@@ -19,6 +19,9 @@ tr:
19
19
  hashtag: Başlık etiketi
20
20
  hero_image: Ana resim
21
21
  i_frame_url: Harici oylama sistemi URL'si
22
+ instructions: Oylama için ek talimatlar
23
+ max_votes: Maksimum oy sayısı
24
+ min_votes: Maksimum oy sayısı
22
25
  origin_scope: kapsam
23
26
  origin_title: Menşei
24
27
  origin_url: Kökeni URL
@@ -31,11 +34,24 @@ tr:
31
34
  subtitle: Alt yazı
32
35
  vote: Dış oylama sistemi
33
36
  what_is_decided: Karar nedir
37
+ response:
38
+ decidim_consultations_response_group_id: Grup
34
39
  errors:
40
+ models:
41
+ question:
42
+ attributes:
43
+ max_votes:
44
+ lower_than_min: Maksimum oy sayısı minimumdan fazla veya ona eşit olmalıdır.
35
45
  vote:
36
46
  decidim_consultations_response_id:
37
47
  not_found: Yanıt bulunamadı.
38
48
  activerecord:
49
+ errors:
50
+ models:
51
+ decidim/consultations/vote:
52
+ attributes:
53
+ question:
54
+ invalid_num_votes: Oy sayısı geçersiz
39
55
  models:
40
56
  decidim/consultation:
41
57
  one: konsültasyon
@@ -52,10 +68,13 @@ tr:
52
68
  decidim:
53
69
  admin:
54
70
  actions:
71
+ back_to_responses: Yanıtlara dön
55
72
  new_consultation: Yeni danışma
56
73
  new_question: Yeni soru
57
74
  new_response: Yeni cevap
75
+ new_response_group: Yeni grup
58
76
  publish_results: Sonuçları yayınla
77
+ response_groups: Sorumlu grupları yönetin
59
78
  unpublish_results: Sonuçları yayından kaldır
60
79
  consultation_publications:
61
80
  create:
@@ -76,42 +95,44 @@ tr:
76
95
  error: Yeni bir danışma oluştururken bir hata oluştu.
77
96
  success: Danışmanlık başarıyla oluşturuldu.
78
97
  edit:
79
- update: Güncelleştirme
98
+ update: Güncelle
80
99
  form:
81
- slug_help: 'URL sümükleri, bu danışmaya işaret eden URL''leri oluşturmak için kullanılır. Sadece harfleri, sayıları ve kısa çizgileri kabul eder ve bir harfle başlamalıdır. Örnek: %{url}'
100
+ slug_help: 'URL bağlantı, bu danışmaya işaret eden URL''leri oluşturmak için kullanılır. Sadece harfleri, sayıları ve kısa çizgileri kabul eder ve bir harfle başlamalıdır. Örnek: %{url}'
82
101
  title: Genel bilgi
83
102
  index:
84
103
  not_published: Yayınlanmadı
85
104
  published: Yayınlanan
86
105
  new:
87
- create: yaratmak
106
+ create: Oluştur
88
107
  title: Yeni danışma
89
108
  results:
90
109
  not_visible: Danışma kapatıldığında sonuçlar ulaşılabilir olacak
110
+ participants: "%{count} katılımcı"
91
111
  total_votes: 'Toplam: %{count} oy'
92
112
  update:
93
113
  error: Bu danışma hizmetini güncellerken bir hata oluştu.
94
114
  success: Danışma başarıyla güncellendi.
95
115
  menu:
96
- consultations: istişareler
116
+ consultations: Danışmalar
97
117
  consultations_submenu:
98
118
  info: Bilgi
99
119
  questions: Sorular
100
120
  results: Sonuçlar
101
121
  questions_submenu:
102
122
  components: Bileşenler
103
- consultation: konsültasyon
123
+ configuration: Konfigürasyon
124
+ consultation: Danışma
104
125
  info: Bilgi
105
- responses: Tepkiler
126
+ responses: Yanıtlar
106
127
  models:
107
128
  consultation:
108
129
  fields:
109
- created_at: Düzenlendi
130
+ created_at: Oluşturuldu
110
131
  published: Yayınlanan
111
132
  title: Başlık
112
133
  name:
113
- one: konsültasyon
114
- other: istişareler
134
+ one: Danışma
135
+ other: Danışma
115
136
  question:
116
137
  fields:
117
138
  created_at: Düzenlendi
@@ -122,18 +143,24 @@ tr:
122
143
  other: Sorular
123
144
  response:
124
145
  fields:
125
- created_at: Düzenlendi
146
+ created_at: Oluşturuldu
147
+ response_group: Grup
126
148
  title: Başlık
127
149
  name:
128
- one: Tepki
150
+ one: Yanıt
129
151
  other: Tepkiler
152
+ question_configuration:
153
+ disable_external_voting: Lütfen gelişmiş yapılandırmalar için harici oylamayı devre dışı bırakın
154
+ form:
155
+ help: Bir katılımcının seçebileceği maksimum yanıt sayısını artırarak çoktan seçmeli sorular oluşturun. Varsayılan maksimum değer 1'dir, yani yalnızca bir yanıtın oylanabileceği anlamına gelir.
156
+ title: Gelişmiş yapılandırma
130
157
  question_publications:
131
158
  create:
132
159
  error: Bu soruyu yayınlarken bir hata oluştu.
133
- success: Soru başarıyla basıldı.
160
+ success: Soru başarıyla yayınlandı.
134
161
  destroy:
135
162
  error: Bu soruyu yayından kaldırmada bir hata oluştu.
136
- success: Soru başarıyla basıldı.
163
+ success: Soru başarıyla yayından kaldırıldı.
137
164
  questions:
138
165
  create:
139
166
  error: Yeni bir soru oluşturulurken bir hata oluştu.
@@ -141,18 +168,36 @@ tr:
141
168
  destroy:
142
169
  success: Soru başarıyla silindi.
143
170
  edit:
144
- update: Güncelleştirme
171
+ update: Güncelle
145
172
  form:
146
173
  title: Genel bilgi
147
174
  index:
148
175
  not_published: Yayınlanmadı
149
- published: Yayınlanan
176
+ published: Yayınlandı
150
177
  new:
151
- create: yaratmak
178
+ create: Oluştur
152
179
  title: Yeni soru
153
180
  update:
154
181
  error: Bu soru güncellenirken bir hata oluştu.
155
182
  success: Soru başarıyla güncellendi.
183
+ response_groups:
184
+ create:
185
+ error: Yeni bir sorumlu grup oluştururken bir hata oluştu.
186
+ success: Sorumlu grubu başarıyla oluşturuldu.
187
+ destroy:
188
+ error: Sorumlu grubunu kaldırırken bir sorun oluştu. Hiçbir yanıtın buna bağlı olmadığını kontrol edin.
189
+ success: Sorumlu grubu başarıyla silindi.
190
+ edit:
191
+ update: Güncelle
192
+ form:
193
+ title: Genel Bilgi
194
+ help: Paketlerdeki çoktan seçmeli soruları düzenlemek için grupları kullanın.
195
+ new:
196
+ create: Oluştur
197
+ title: Yeni sorumlu grup
198
+ update:
199
+ error: Bu yanıtı güncellerken bir hata oluştu.
200
+ success: Yanıt başarıyla güncellendi.
156
201
  responses:
157
202
  create:
158
203
  error: Yeni bir yanıt oluştururken bir hata oluştu.
@@ -161,19 +206,20 @@ tr:
161
206
  error: Yanıtı kaldırırken bir hata oluştu.
162
207
  success: Yanıt başarıyla silindi.
163
208
  edit:
164
- update: Güncelleştirme
209
+ update: Güncelle
165
210
  form:
166
211
  title: Genel bilgi
167
212
  new:
168
- create: yaratmak
169
- title: Yeni cevap
213
+ create: Oluştur
214
+ title: Yeni yanıt
170
215
  update:
171
216
  error: Bu yanıtı güncellerken bir hata oluştu.
172
217
  success: Yanıt başarıyla güncellendi.
173
218
  titles:
174
- consultations: istişareler
219
+ consultations: Danışma
175
220
  questions: Sorular
176
- responses: Tepkiler
221
+ response_groups: Sorumlu gruplar
222
+ responses: Yanıtlar
177
223
  results: Sonuçlar
178
224
  consultations:
179
225
  admin:
@@ -188,31 +234,33 @@ tr:
188
234
  consultations:
189
235
  orders:
190
236
  label: 'Danışmanlıklara göre sırala:'
191
- random: rasgele
237
+ random: Rastgele
192
238
  recent: En yeni
239
+ show:
240
+ dates: Tarih
193
241
  content_blocks:
194
242
  highlighted_consultations:
195
- name: Vurgulanan istişareler
243
+ name: Vurgulanan danışma
196
244
  count:
197
245
  title:
198
246
  one: "%{count} danışma"
199
- other: "%{count} görüşme"
247
+ other: "%{count} danışma"
200
248
  filters:
201
249
  active: Aktif
202
- all: Herşey
203
- finished: bitirdi
250
+ all: Tümü
251
+ finished: Bitti
204
252
  search: Arama
205
- state: Belirtmek, bildirmek
253
+ state: Statü
206
254
  upcoming: Yaklaşan
207
255
  filters_small_view:
208
256
  close_modal: Pencereyi kapat
209
- filter: filtre
210
- filter_by: Tarafından filtre
211
- unfold: açılmak
257
+ filter: Filtrele
258
+ filter_by: Şuna göre filtrele
259
+ unfold:
212
260
  highlighted_questions:
213
- title: '%{scope_name}soru'
261
+ title: '%{scope_name} soruları'
214
262
  index:
215
- title: istişareler
263
+ title: Danışma
216
264
  last_activity:
217
265
  new_consultation: Yeni danışma
218
266
  new_question_at_html: "<span>Yeni soru, %{link}</span>"
@@ -231,35 +279,54 @@ tr:
231
279
  votes_out_of:
232
280
  one: oy vermek
233
281
  other: oy vermemek
282
+ question_multiple_votes:
283
+ results_rules:
284
+ minimum_votes_per_user:
285
+ description: Katılımcılar farklı seçenekler arasında minimum %{votes} oy dağıtabilir.
286
+ title: Bu soruda uygun olan yerlerde birden fazla seçenek
287
+ total_participants: Oylamaya toplam %{count} kişi katıldı.
288
+ vote_limit:
289
+ description: Katılımcılar %{limit} limitine kadar oy verebilir.
290
+ voting_rules:
291
+ minimum_votes_per_user:
292
+ description: Farklı seçenekler arasında minimum %{votes} oy dağıtmalısınız.
293
+ title: 'Oylama aşağıdaki kurallara tabidir:'
294
+ vote_limit:
295
+ description: En fazla %{limit} teklife oy verebilirsiniz.
296
+ left: Kalan
297
+ votes: Oylar
234
298
  question_votes:
235
299
  create:
236
300
  error: Soruya oy verirken hatalar oldu
301
+ success: Konsültasyonun sonuna kadar değiştirebilirsiniz. Yalnızca son oylama kabul edilecektir.
302
+ title_error: Hatalı oy!
303
+ title_success: Oy başarıyla kaydedildi
237
304
  regular_questions:
238
305
  title: Bu danışma için sorular
239
306
  show:
240
307
  badge_name:
241
- finished: bitirdi
308
+ finished: Bitti
242
309
  open: Açık
243
310
  open_votes: Açık oylar
244
311
  published_results: Sonuçlar yayınlandı
245
312
  footer_button_text:
246
- debate: tartışma
313
+ debate: Tartışma
247
314
  view: Görünüm
248
- view_results: Sonuçları Görüntüle
315
+ view_results: Sonuçları görüntüle
249
316
  vote: Oy
250
317
  unspecified: Belirtilmemiş
251
318
  help:
252
319
  participatory_spaces:
253
320
  consultations:
254
- contextual: "<p>İstişareler, bir organizasyon oluşturan tüm kişilere net bir soru sormanızı, görüşmelere katılmak için bir çağrı yapmanızı, bir sorgunun lehine veya aleyhinde tartışma başlatmanızı ve talep etmenizi sağlayan bir alandır. Danışma tarihi geldiğinde, oyların sonuçlarını oylayabilir ve yayınlayabilirsiniz.</p> <p>Örnekler: İstişareler, bir örgütü etkileyen hemen hemen her yönüyle ilgili olabilir: bazı örnekler, organizasyonun adını veya logosunu çeşitli alternatifler sunarak değiştirir, daha büyük bir organizasyonun parçası olmak için Evet veya Hayır'a karar verir, yeni bir stratejikin geçerliliğini onaylar veya reddeder. Bir çalışma grubunun sonucu veya planı veya pozisyonların en fazla 1, 2 veya 3 mandat kalması gerekip gerekmediğini tanımlamak.</p>\n"
255
- page: "<p>İstişareler, bir örgütü oluşturan herkese açık bir soru sormanıza, istişareye katılmak için bir çağrı yapmanıza, bir yanıtı yanıtlamaya ya da aleyhine tartışmaya yol açmanıza izin veren bir alandır. İstişare tarihi geldiğinde, oyların sonuçlarını oylayabilir ve yayınlayabilirsiniz.</p> <p>Örnekler: İstişareler, bir kuruluşu etkileyen hemen hemen her yönüyle ilgili olabilir: bazı örnekler daha büyük bir kuruluşun parçası olmak için Evet veya Hayır olarak karar vermek, yeni bir stratejik onaylamak veya reddetmek için çeşitli alternatifler sunan kuruluşun adını veya logosunu değiştiriyor Bir çalışma grubunun planını veya sonucunu ya da pozisyonların organizasyonda azami 1, 2 veya 3 zorunlu kalması gerekip gerekmediğini tanımlayın.</p>\n"
256
- title: Danışmalar nelerdir?
321
+ contextual: "<p> <strong> Danışma </strong>, bir kuruluş oluşturan tüm insanlara net bir soru sormanıza, danışmaya katılmak için bir çağrı yapmanıza, bir tepki. Danışma tarihi geldiğinde oylayabilir ve oylama sonuçlarını yayınlayabilirsiniz. </p> <p> Örnekler: İstişareler, bir kuruluşu etkileyen hemen hemen her yönle ilgili olabilir: Bazı örnekler, kuruluşun adını veya logosunu değiştiriyor birkaç alternatif önermek, daha büyük bir organizasyonun parçası olmaya Evet veya Hayır karar vermek, yeni bir stratejik planı veya bir çalışma grubunun sonucunu onaylamak veya reddetmek veya pozisyonların maksimum 1, 2 veya 3 görev olarak kalması gerekip gerekmediğini tanımlamak. </p>\n"
322
+ page: "<p> <strong> Danışma </strong>, bir kuruluş oluşturan tüm insanlara net bir soru sormanıza, danışmaya katılmak için bir çağrı yapmanıza, bir tepki. Danışma tarihi geldiğinde oylayabilir ve oylama sonuçlarını yayınlayabilirsiniz. </p> <p> Örnekler: İstişareler bir kuruluşu etkileyen hemen hemen her yönle ilgili olabilir: Bazı örnekler, kuruluşun adını veya logosunu değiştiriyor Birkaç alternatif önermek, daha büyük bir organizasyonun parçası olmaya Evet veya Hayır karar vermek, yeni bir stratejik planı veya bir çalışma grubunun sonucunu onaylamak veya reddetmek veya pozisyonların organizasyonda maksimum 1, 2 veya 3 görev olarak kalması gerekip gerekmediğini tanımlamak. </p>\n"
323
+ title: Danışma nedir?
257
324
  menu:
258
- consultations: istişareler
325
+ consultations: İstişareler
259
326
  pages:
260
327
  home:
261
328
  statistics:
262
- consultations_count: istişareler
329
+ consultations_count: Danışmalar
263
330
  questions:
264
331
  next_button: Sonraki soru
265
332
  previous_button: Önceki soru
@@ -268,7 +335,7 @@ tr:
268
335
  show:
269
336
  read_more: Daha fazla oku
270
337
  statistics:
271
- assistants_count_title: Yardımcıları
338
+ assistants_count_title: Asistanlar
272
339
  comments_count_title: Yorumlar
273
340
  meetings_count_title: Toplantılar
274
341
  supports_count_title: Destekler
@@ -278,15 +345,22 @@ tr:
278
345
  already_voted: Çoktan oy verildi
279
346
  already_voted_hover: Desteği iptal et
280
347
  starting_from: '%{date}başlayarak'
348
+ verification_required: Oy vermek için hesabınızı doğrulayın
281
349
  vote: Oy
282
350
  vote_modal:
351
+ close_modal: Pencereyi kapat
283
352
  contextual_help: Lütfen bir seçenek seçin.
284
353
  title: 'Danışma: soru desteği'
285
354
  vote_modal_confirm:
286
355
  change: Değişiklik
356
+ close_modal: Pencereyi kapat
287
357
  confirm: Onaylamak
288
358
  contextual_help: Lütfen seçilen seçeneği onaylayın.
289
359
  title: 'Danışma: teyit teyit'
360
+ resources:
361
+ consultations:
362
+ actions:
363
+ vote: Oy ver
290
364
  layouts:
291
365
  decidim:
292
366
  admin:
@@ -300,3 +374,4 @@ tr:
300
374
  unfold: açılmak
301
375
  question_header:
302
376
  back_to_consultation: Tüm istişarelere bakın
377
+ back_to_question: Soruya geri dön
@@ -246,7 +246,7 @@ uk:
246
246
  pages:
247
247
  home:
248
248
  statistics:
249
- consultations_count: Консультацій
249
+ consultations_count: Консультації
250
250
  questions:
251
251
  results:
252
252
  title: Підсумки
@@ -308,8 +308,6 @@ zh-CN:
308
308
  help:
309
309
  participatory_spaces:
310
310
  consultations:
311
- contextual: "<p><strong>Consult</strong> 是一个空间,可以让您向所有组建组织的人提出一个明确的问题。 呼吁参加协商,引发和命令辩论支持或反对回应。 当咨询日期到达时,您可以投票并发布投票结果。</p> <p>示例:磋商可能涉及影响一个组织的几乎任何方面:一些示例正在更改该组织的名称或标志,提供几种替代品, 决定是否加入一个更大的组织,确认或拒绝一项新的战略计划或工作组的结果, 或界定这些职位是否最多应为1、2或3项任务。</p>\n"
312
- page: "<p><strong>Consult</strong> 是一个空间,可以让您向所有组建组织的人提出一个明确的问题。 呼吁参加协商,引发和命令辩论支持或反对回应。 当咨询日期到达时,您可以投票并发布投票结果。</p> <p>示例:磋商可能涉及影响一个组织的几乎任何方面:一些示例正在更改该组织的名称或标志,提供几种替代品, 决定是否加入一个更大的组织,确认或拒绝一项新的战略计划或工作组的结果, 或界定该组织的职位是否最多应为1、2或3项任务。</p>\n"
313
311
  title: 什么是协商?
314
312
  menu:
315
313
  consultations: 协商
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Consultations
5
+ # This type represents a consultation.
6
+ class ConsultationQuestionType < Decidim::Api::Types::BaseObject
7
+ implements Decidim::Core::ScopableInterface
8
+ implements Decidim::Core::AttachableInterface
9
+ implements Decidim::Comments::CommentableInterface
10
+
11
+ description "A consultation question"
12
+
13
+ field :id, GraphQL::Types::ID, "Internal ID of the question", null: false
14
+ field :title, Decidim::Core::TranslatedFieldType, "Title of the question", null: true
15
+ field :subtitle, Decidim::Core::TranslatedFieldType, "The subtitle of this question", null: true
16
+ field :slug, GraphQL::Types::String, "Slug of the question", null: false
17
+ field :created_at, Decidim::Core::DateTimeType, "The time this question was created", null: false
18
+ field :updated_at, Decidim::Core::DateTimeType, "The time this question was updated", null: false
19
+ field :published_at, Decidim::Core::DateTimeType, "The time this question was published", null: false
20
+
21
+ field :components, [Decidim::Core::ComponentInterface, { null: true }], description: "Lists the components this space contains.", null: true
22
+
23
+ def components
24
+ Decidim::Component.where(
25
+ participatory_space: object
26
+ ).published
27
+ end
28
+
29
+ field :banner_image, GraphQL::Types::String, "The banner image for this question", null: true
30
+ field :hero_image, GraphQL::Types::String, "The hero image for this question", null: true
31
+
32
+ field :what_is_decided, Decidim::Core::TranslatedFieldType, "What is decided in this question", null: true
33
+ field :promoter_group, Decidim::Core::TranslatedFieldType, "The promoter group of this question", null: true
34
+ field :participatory_scope, Decidim::Core::TranslatedFieldType, "The participatory scope of this question", null: true
35
+ field :question_context, Decidim::Core::TranslatedFieldType, "The context for this question", null: true
36
+ field :reference, GraphQL::Types::String, "The reference for this question", null: true
37
+ field :hashtag, GraphQL::Types::String, "The hashtag of this question", null: true
38
+ field :votes_count, GraphQL::Types::Int, "The number of votes in this question", null: true
39
+ field :origin_scope, Decidim::Core::TranslatedFieldType, "The origin scope of this question", null: true
40
+ field :origin_title, Decidim::Core::TranslatedFieldType, "The origin title of this question", null: true
41
+ field :origin_url, GraphQL::Types::String, "The origin URL for this question", null: true
42
+ field :i_frame_url, GraphQL::Types::String, "The iframe URL for this question", null: true
43
+ field :external_voting, GraphQL::Types::Boolean, "If the question has external voting", null: true
44
+ field :responses_count, GraphQL::Types::Int, "The number of responses for this question", null: true
45
+ field :order, GraphQL::Types::Int, "The order in which the question should be represented", null: true
46
+ field :max_votes, GraphQL::Types::Int, "The maximum number of votes in this question", null: true
47
+ field :min_votes, GraphQL::Types::Int, "The minimum number of votes in this question", null: true
48
+ field :response_groups_count, GraphQL::Types::Int, "The number of group responses for this question", null: true
49
+ field :instructions, Decidim::Core::TranslatedFieldType, "Instructions for this question", null: true
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Consultations
5
+ # This type represents a consultation.
6
+ class ConsultationType < Decidim::Api::Types::BaseObject
7
+ implements Decidim::Core::ParticipatorySpaceInterface
8
+
9
+ description "A consultation"
10
+
11
+ field :subtitle, Decidim::Core::TranslatedFieldType, "The subtitle of this consultation", null: true
12
+ field :description, Decidim::Core::TranslatedFieldType, "The description of this consultation", null: true
13
+ field :slug, GraphQL::Types::String, "Slug of this consultation", null: false
14
+ field :created_at, Decidim::Core::DateTimeType, "The time this consultation was created", null: false
15
+ field :updated_at, Decidim::Core::DateTimeType, "The time this consultation was updated", null: false
16
+ field :published_at, Decidim::Core::DateTimeType, "The time this consultation was published", null: false
17
+
18
+ field :introductory_video_url, GraphQL::Types::String, "The introductory video url for this consultation", null: true
19
+ field :introductory_image, GraphQL::Types::String, "The introductory image for this consultation", null: true
20
+ field :banner_image, GraphQL::Types::String, "The banner image for this consultation", null: true
21
+ field :highlighted_scope, Decidim::Core::ScopeApiType, "This is the highlighted scope of this consultation", null: true
22
+ field :start_voting_date, Decidim::Core::DateType, "Start date of the voting for this consultation", null: true
23
+ field :end_voting_date, Decidim::Core::DateType, "End date of the voting for this consultation", null: true
24
+ field :results_published_at, Decidim::Core::DateType, "Date when the results have been published", null: true
25
+
26
+ field :questions, [Decidim::Consultations::ConsultationQuestionType, { null: true }], "", null: true
27
+ end
28
+ end
29
+ end