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.
- checksums.yaml +4 -4
- data/app/cells/decidim/consultations/consultation_m_cell.rb +2 -0
- data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +4 -9
- data/app/commands/decidim/consultations/admin/update_consultation.rb +3 -0
- data/app/commands/decidim/consultations/admin/update_question.rb +13 -5
- data/app/helpers/decidim/consultations/admin/consultation_menu_helper.rb +15 -0
- data/app/helpers/decidim/consultations/questions_helper.rb +2 -0
- data/app/views/decidim/consultations/admin/consultations/index.html.erb +4 -0
- data/app/views/decidim/consultations/admin/questions/index.html.erb +4 -0
- data/app/views/decidim/consultations/admin/response_groups/index.html.erb +2 -0
- data/app/views/decidim/consultations/admin/responses/index.html.erb +2 -0
- data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +1 -1
- data/app/views/decidim/consultations/consultations/_filters_small_view.html.erb +1 -1
- data/app/views/layouts/decidim/admin/consultation.html.erb +8 -23
- data/app/views/layouts/decidim/admin/consultations.html.erb +4 -0
- data/config/locales/ar.yml +0 -2
- data/config/locales/ca.yml +3 -2
- data/config/locales/cs.yml +9 -8
- data/config/locales/de.yml +8 -7
- data/config/locales/el.yml +0 -2
- data/config/locales/en.yml +3 -2
- data/config/locales/es-MX.yml +3 -2
- data/config/locales/es-PY.yml +3 -2
- data/config/locales/es.yml +3 -2
- data/config/locales/eu.yml +0 -2
- data/config/locales/fi-plain.yml +4 -3
- data/config/locales/fi.yml +7 -6
- data/config/locales/fr-CA.yml +3 -2
- data/config/locales/fr.yml +3 -2
- data/config/locales/gl.yml +0 -2
- data/config/locales/hu.yml +0 -2
- data/config/locales/id-ID.yml +0 -2
- data/config/locales/is-IS.yml +4 -0
- data/config/locales/it.yml +2 -2
- data/config/locales/ja.yml +0 -2
- data/config/locales/lv.yml +0 -2
- data/config/locales/nl.yml +8 -9
- data/config/locales/no.yml +0 -2
- data/config/locales/pl.yml +8 -7
- data/config/locales/pt-BR.yml +0 -2
- data/config/locales/pt.yml +0 -2
- data/config/locales/ro-RO.yml +0 -6
- data/config/locales/ru.yml +1 -1
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +0 -2
- data/config/locales/sv.yml +0 -2
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/tr-TR.yml +117 -42
- data/config/locales/uk.yml +1 -1
- data/config/locales/zh-CN.yml +0 -2
- data/lib/decidim/api/consultation_question_type.rb +52 -0
- data/lib/decidim/api/consultation_type.rb +29 -0
- data/lib/decidim/consultations.rb +1 -0
- data/lib/decidim/consultations/admin_engine.rb +25 -1
- data/lib/decidim/consultations/api.rb +8 -0
- data/lib/decidim/consultations/engine.rb +7 -1
- data/lib/decidim/consultations/participatory_space.rb +24 -24
- data/lib/decidim/consultations/query_extensions.rb +43 -0
- data/lib/decidim/consultations/test/factories.rb +2 -2
- data/lib/decidim/consultations/version.rb +1 -1
- metadata +24 -19
- data/app/types/decidim/consultations/consultation_question_type.rb +0 -57
- data/app/types/decidim/consultations/consultation_type.rb +0 -32
data/config/locales/tr-TR.yml
CHANGED
@@ -2,7 +2,7 @@ tr:
|
|
2
2
|
activemodel:
|
3
3
|
attributes:
|
4
4
|
consultation:
|
5
|
-
banner_image:
|
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:
|
98
|
+
update: Güncelle
|
80
99
|
form:
|
81
|
-
slug_help: '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:
|
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:
|
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
|
-
|
123
|
+
configuration: Konfigürasyon
|
124
|
+
consultation: Danışma
|
104
125
|
info: Bilgi
|
105
|
-
responses:
|
126
|
+
responses: Yanıtlar
|
106
127
|
models:
|
107
128
|
consultation:
|
108
129
|
fields:
|
109
|
-
created_at:
|
130
|
+
created_at: Oluşturuldu
|
110
131
|
published: Yayınlanan
|
111
132
|
title: Başlık
|
112
133
|
name:
|
113
|
-
one:
|
114
|
-
other:
|
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:
|
146
|
+
created_at: Oluşturuldu
|
147
|
+
response_group: Grup
|
126
148
|
title: Başlık
|
127
149
|
name:
|
128
|
-
one:
|
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
|
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
|
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:
|
171
|
+
update: Güncelle
|
145
172
|
form:
|
146
173
|
title: Genel bilgi
|
147
174
|
index:
|
148
175
|
not_published: Yayınlanmadı
|
149
|
-
published:
|
176
|
+
published: Yayınlandı
|
150
177
|
new:
|
151
|
-
create:
|
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:
|
209
|
+
update: Güncelle
|
165
210
|
form:
|
166
211
|
title: Genel bilgi
|
167
212
|
new:
|
168
|
-
create:
|
169
|
-
title: Yeni
|
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:
|
219
|
+
consultations: Danışma
|
175
220
|
questions: Sorular
|
176
|
-
|
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:
|
237
|
+
random: Rastgele
|
192
238
|
recent: En yeni
|
239
|
+
show:
|
240
|
+
dates: Tarih
|
193
241
|
content_blocks:
|
194
242
|
highlighted_consultations:
|
195
|
-
name: Vurgulanan
|
243
|
+
name: Vurgulanan danışma
|
196
244
|
count:
|
197
245
|
title:
|
198
246
|
one: "%{count} danışma"
|
199
|
-
other: "%{count}
|
247
|
+
other: "%{count} danışma"
|
200
248
|
filters:
|
201
249
|
active: Aktif
|
202
|
-
all:
|
203
|
-
finished:
|
250
|
+
all: Tümü
|
251
|
+
finished: Bitti
|
204
252
|
search: Arama
|
205
|
-
state:
|
253
|
+
state: Statü
|
206
254
|
upcoming: Yaklaşan
|
207
255
|
filters_small_view:
|
208
256
|
close_modal: Pencereyi kapat
|
209
|
-
filter:
|
210
|
-
filter_by:
|
211
|
-
unfold:
|
257
|
+
filter: Filtrele
|
258
|
+
filter_by: Şuna göre filtrele
|
259
|
+
unfold: Aç
|
212
260
|
highlighted_questions:
|
213
|
-
title: '%{scope_name}
|
261
|
+
title: '%{scope_name} soruları'
|
214
262
|
index:
|
215
|
-
title:
|
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:
|
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:
|
313
|
+
debate: Tartışma
|
247
314
|
view: Görünüm
|
248
|
-
view_results: Sonuçları
|
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
|
255
|
-
page: "<p
|
256
|
-
title:
|
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:
|
325
|
+
consultations: İstişareler
|
259
326
|
pages:
|
260
327
|
home:
|
261
328
|
statistics:
|
262
|
-
consultations_count:
|
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:
|
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
|
data/config/locales/uk.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
@@ -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
|