decidim-forms 0.27.0 → 0.27.2
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/presenters/decidim/forms/admin/questionnaire_answer_presenter.rb +7 -4
- data/config/locales/ca.yml +3 -3
- data/config/locales/cs.yml +2 -2
- data/config/locales/de.yml +0 -2
- data/config/locales/el.yml +0 -2
- data/config/locales/en.yml +2 -2
- data/config/locales/es-MX.yml +2 -2
- data/config/locales/es-PY.yml +2 -2
- data/config/locales/es.yml +2 -2
- data/config/locales/eu.yml +31 -12
- data/config/locales/fi-plain.yml +2 -2
- data/config/locales/fi.yml +2 -2
- data/config/locales/fr-CA.yml +2 -2
- data/config/locales/fr.yml +2 -2
- data/config/locales/gl.yml +0 -2
- data/config/locales/gn-PY.yml +1 -0
- data/config/locales/hu.yml +0 -2
- data/config/locales/it.yml +0 -2
- data/config/locales/ja.yml +2 -2
- data/config/locales/ka-GE.yml +1 -0
- data/config/locales/lb.yml +0 -2
- data/config/locales/lo-LA.yml +1 -0
- data/config/locales/lt.yml +0 -2
- data/config/locales/lv.yml +0 -2
- data/config/locales/nl.yml +0 -2
- data/config/locales/no.yml +0 -2
- data/config/locales/pl.yml +5 -6
- data/config/locales/pt-BR.yml +0 -2
- data/config/locales/pt.yml +0 -2
- data/config/locales/ro-RO.yml +8 -2
- data/config/locales/sv.yml +0 -2
- data/config/locales/tr-TR.yml +0 -2
- data/config/locales/zh-CN.yml +0 -2
- data/lib/decidim/forms/test/shared_examples/manage_questionnaire_answers.rb +25 -2
- data/lib/decidim/forms/version.rb +1 -1
- metadata +12 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9e399e7c1e3e8618dfd75491617038ecf10b4d06e3f53b61b343aa7888403996
|
|
4
|
+
data.tar.gz: 785293c3df843039cf86005b3c64ff1d5777adf54c2b4e63bf883fa5d4d36ce0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 731c4df584b70bd2b4f83211e69b4f562ef1aaa2a706afe4856f87fa5bdb3ea2bc061f51b037341d4722c87051151ee55b27a94666514da901856563e4e55d72
|
|
7
|
+
data.tar.gz: 21e2b2207bfa79f08bf40b0372bf67d987c09919faf0f7bb17d585835f0b65f6402500fc48e469cfa223b2fab0270955c1de3902f54b1360cb8d5fc875a28423
|
|
@@ -7,7 +7,7 @@ module Decidim
|
|
|
7
7
|
# Presenter for questionnaire answer
|
|
8
8
|
#
|
|
9
9
|
class QuestionnaireAnswerPresenter < SimpleDelegator
|
|
10
|
-
delegate :content_tag, :safe_join, to: :view_context
|
|
10
|
+
delegate :content_tag, :safe_join, :link_to, :number_to_human_size, to: :view_context
|
|
11
11
|
|
|
12
12
|
include Decidim::TranslatableAttributes
|
|
13
13
|
|
|
@@ -54,11 +54,14 @@ module Decidim
|
|
|
54
54
|
# rubocop:disable Style/StringConcatenation
|
|
55
55
|
# Interpolating strings that are `html_safe` is problematic with Rails.
|
|
56
56
|
content_tag :li do
|
|
57
|
-
link_to(
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
link_to(attachment.url, target: "_blank", rel: "noopener noreferrer") do
|
|
58
|
+
content_tag(:span) do
|
|
59
|
+
translated_attribute(attachment.title).presence ||
|
|
60
|
+
I18n.t("download_attachment", scope: "decidim.forms.questionnaire_answer_presenter")
|
|
61
|
+
end + " " + content_tag(:small) do
|
|
60
62
|
"#{attachment.file_type} #{number_to_human_size(attachment.file_size)}"
|
|
61
63
|
end
|
|
64
|
+
end
|
|
62
65
|
end
|
|
63
66
|
# rubocop:enable Style/StringConcatenation
|
|
64
67
|
end
|
data/config/locales/ca.yml
CHANGED
|
@@ -128,8 +128,6 @@ ca:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: El camp no pot estar en blanc
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Formats d''arxiu acceptats:'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} px"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ ca:
|
|
|
145
143
|
single_option: Opció única
|
|
146
144
|
sorting: Ordenació
|
|
147
145
|
title_and_description: Títol i descripció
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Descarregar l'arxiu adjunt
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: S'han produït un error en respondre el formulari.
|
|
@@ -175,7 +175,7 @@ ca:
|
|
|
175
175
|
tos_agreement: En participar acceptes els Termes i condicions d'ús
|
|
176
176
|
step_navigation:
|
|
177
177
|
show:
|
|
178
|
-
are_you_sure: Aquesta acció no es pot desfer i no podràs editar les teves respostes.
|
|
178
|
+
are_you_sure: Aquesta acció no es pot desfer i no podràs editar les teves respostes. Segur?
|
|
179
179
|
back: Enrere
|
|
180
180
|
continue: Continuar
|
|
181
181
|
submit: Enviar respostes
|
data/config/locales/cs.yml
CHANGED
|
@@ -128,8 +128,6 @@ cs:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: Tělo nemůže být prázdné
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Akceptované formáty:'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} px"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ cs:
|
|
|
145
143
|
single_option: Jedna možnost
|
|
146
144
|
sorting: Třídění
|
|
147
145
|
title_and_description: Název a popis
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Stáhnout přílohu
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: Při odpovědi na dotazník došlo k chybám.
|
data/config/locales/de.yml
CHANGED
data/config/locales/el.yml
CHANGED
data/config/locales/en.yml
CHANGED
|
@@ -128,8 +128,6 @@ en:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: Body can't be blank
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Accepted formats:'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} px"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ en:
|
|
|
145
143
|
single_option: Single option
|
|
146
144
|
sorting: Sorting
|
|
147
145
|
title_and_description: Title and description
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Download attachment
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: There was a problem answering the form.
|
data/config/locales/es-MX.yml
CHANGED
|
@@ -128,8 +128,6 @@ es-MX:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: El campo no puede estar en blanco
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Formatos de archivo aceptados:'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} px"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ es-MX:
|
|
|
145
143
|
single_option: Opción única
|
|
146
144
|
sorting: Ordenación
|
|
147
145
|
title_and_description: Titulo y descripción
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Descargar el archivo adjunto
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: Ha habido errores al responder al cuestionario.
|
data/config/locales/es-PY.yml
CHANGED
|
@@ -128,8 +128,6 @@ es-PY:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: El campo no puede estar en blanco
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Formatos de archivo aceptados:'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} px"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ es-PY:
|
|
|
145
143
|
single_option: Opción única
|
|
146
144
|
sorting: Ordenación
|
|
147
145
|
title_and_description: Titulo y descripción
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Descargar el archivo adjunto
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: Ha habido errores al responder al cuestionario.
|
data/config/locales/es.yml
CHANGED
|
@@ -128,8 +128,6 @@ es:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: El campo no puede estar en blanco
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Formatos de archivo aceptados:'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} px"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ es:
|
|
|
145
143
|
single_option: Opción única
|
|
146
144
|
sorting: Ordenación
|
|
147
145
|
title_and_description: Titulo y descripción
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Descargar el archivo adjunto
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: Se ha producido un error al responder el formulario.
|
data/config/locales/eu.yml
CHANGED
|
@@ -10,7 +10,7 @@ eu:
|
|
|
10
10
|
max_choices: Gehienezko aukera kopurua
|
|
11
11
|
question_type: Mota
|
|
12
12
|
questionnaire_question:
|
|
13
|
-
mandatory:
|
|
13
|
+
mandatory: Derrigorrezkoa
|
|
14
14
|
max_characters: Karaktereen muga (utzi 0 mugarik ez badago)
|
|
15
15
|
errors:
|
|
16
16
|
models:
|
|
@@ -30,7 +30,7 @@ eu:
|
|
|
30
30
|
admin:
|
|
31
31
|
models:
|
|
32
32
|
components:
|
|
33
|
-
description:
|
|
33
|
+
description: Deskribapena
|
|
34
34
|
tos: Zerbitzu-baldintzak
|
|
35
35
|
questionnaires:
|
|
36
36
|
actions:
|
|
@@ -40,7 +40,7 @@ eu:
|
|
|
40
40
|
answer_option: Erantzun aukera
|
|
41
41
|
free_text: Testu librea
|
|
42
42
|
remove: Kendu
|
|
43
|
-
statement:
|
|
43
|
+
statement: Adierazpena
|
|
44
44
|
answers:
|
|
45
45
|
actions:
|
|
46
46
|
back: Itzuli erantzunetara
|
|
@@ -75,12 +75,13 @@ eu:
|
|
|
75
75
|
select_condition_question: Hautatu galdera bat
|
|
76
76
|
select_condition_type: Hautatu baldintza mota bat
|
|
77
77
|
edit:
|
|
78
|
-
save:
|
|
78
|
+
save: Gorde
|
|
79
79
|
title: Editatu galdetegia
|
|
80
80
|
form:
|
|
81
81
|
add_question: Gehitu galdera
|
|
82
82
|
add_separator: Gehitu banatzailea
|
|
83
|
-
|
|
83
|
+
add_title_and_description: Editatu izenburua eta deskribapena
|
|
84
|
+
already_answered_warning: Formularioa erabiltzaile batzuek erantzuten dute, beraz, ezin dira galderak aldatu.
|
|
84
85
|
collapse: Bildu galdera guztiak
|
|
85
86
|
expand: Zabaldu galdera guztiak
|
|
86
87
|
preview: Aurreikusi
|
|
@@ -89,7 +90,7 @@ eu:
|
|
|
89
90
|
matrix_row:
|
|
90
91
|
matrix_row: Errenkada
|
|
91
92
|
remove: Kendu
|
|
92
|
-
statement:
|
|
93
|
+
statement: Adierazpena
|
|
93
94
|
question:
|
|
94
95
|
add_answer_option: Gehitu erantzun aukera
|
|
95
96
|
add_display_condition: Gehitu bistaratzeko baldintza
|
|
@@ -109,16 +110,29 @@ eu:
|
|
|
109
110
|
remove: Kendu
|
|
110
111
|
separator: Bereizlea
|
|
111
112
|
up: Igo
|
|
113
|
+
title_and_description:
|
|
114
|
+
collapse: Tolestu
|
|
115
|
+
description: Deskribapena
|
|
116
|
+
down: Behera
|
|
117
|
+
expand: Zabaldu
|
|
118
|
+
remove: Kendu
|
|
119
|
+
title: Izenburua
|
|
120
|
+
title_and_description: Izenburua eta deskribapena
|
|
121
|
+
up: Gora
|
|
112
122
|
update:
|
|
113
123
|
invalid: Akatsik egon da galdeketa gordetzean.
|
|
114
124
|
success: Galdetegia zuzen gorde da.
|
|
125
|
+
admin_log:
|
|
126
|
+
questionnaire:
|
|
127
|
+
update: "%{user_name} -k%{resource_name} galdetegia eguneratu du"
|
|
115
128
|
errors:
|
|
116
129
|
answer:
|
|
117
|
-
body:
|
|
118
|
-
files:
|
|
119
|
-
extension_allowlist: 'Onartutako formatuak:'
|
|
130
|
+
body: Testua ezin da hutsik egon
|
|
120
131
|
images:
|
|
121
132
|
dimensions: "%{width} x %{height} px"
|
|
133
|
+
processors:
|
|
134
|
+
resize_and_pad: Irudi hau bigunduko eta birdimentsionatuko da %{dimensions} nehurrira.
|
|
135
|
+
resize_to_fit: Irudi hau bigunduko eta birdimentsionatuko da %{dimensions} nehurrira.
|
|
122
136
|
question_types:
|
|
123
137
|
files: Fitxategiak
|
|
124
138
|
long_answer: Erantzun luzea
|
|
@@ -128,6 +142,9 @@ eu:
|
|
|
128
142
|
short_answer: Erantzun laburra
|
|
129
143
|
single_option: Aukera bakarra
|
|
130
144
|
sorting: Lazcoz
|
|
145
|
+
title_and_description: Izenburua eta deskribapena
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Deskargatu eranskina
|
|
131
148
|
questionnaires:
|
|
132
149
|
answer:
|
|
133
150
|
invalid: Akatsik egon da galdeketa erantzutean.
|
|
@@ -143,7 +160,7 @@ eu:
|
|
|
143
160
|
of_total_steps: '%{total_steps} etik'
|
|
144
161
|
questionnaire_answered:
|
|
145
162
|
body: Galdeketa honi erantzun dio.
|
|
146
|
-
title: Dagoeneko
|
|
163
|
+
title: Dagoeneko erantzunda
|
|
147
164
|
questionnaire_closed:
|
|
148
165
|
body: Galdetegia itxita dago eta ezin da erantzun.
|
|
149
166
|
title: Galdeketa itxia
|
|
@@ -153,7 +170,9 @@ eu:
|
|
|
153
170
|
questionnaire_js_disabled:
|
|
154
171
|
body: Galdetegi honen ezaugarri batzuk desaktibatu egingo dira. Zure esperientzia hobetzeko, gaitu JavaScript zure nabigatzailean.
|
|
155
172
|
title: Javascript desaktibatuta dago
|
|
156
|
-
|
|
173
|
+
questionnaire_not_published:
|
|
174
|
+
body: Argitalpen hau oraindik ez da argitaratu.
|
|
175
|
+
tos_agreement: Parte hartzean, haren zerbitzu-baldintzak onartzen dituzu
|
|
157
176
|
step_navigation:
|
|
158
177
|
show:
|
|
159
178
|
are_you_sure: Ekintza hau ezin da desegin eta ezin izango dituzu zure erantzunak editatu. Ziur zaude?
|
|
@@ -163,7 +182,7 @@ eu:
|
|
|
163
182
|
user_answers_serializer:
|
|
164
183
|
body: Erantzuna
|
|
165
184
|
completion: Amaiera
|
|
166
|
-
created_at:
|
|
185
|
+
created_at: Erantzunda
|
|
167
186
|
id: Erantzun IDa
|
|
168
187
|
ip_hash: IP Helbidearen Hash
|
|
169
188
|
question: Galdera
|
data/config/locales/fi-plain.yml
CHANGED
|
@@ -128,8 +128,6 @@ fi-pl:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: Runkoteksti ei voi olla tyhjä
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Sallitut tiedostopäätteet:'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} pikseliä"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ fi-pl:
|
|
|
145
143
|
single_option: Yksi vaihtoehto
|
|
146
144
|
sorting: Järjestäminen
|
|
147
145
|
title_and_description: Otsikko ja kuvaus
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Lataa liite
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: Kyselylomakkeeseen vastatessa tapahtui virheitä.
|
data/config/locales/fi.yml
CHANGED
|
@@ -128,8 +128,6 @@ fi:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: Runkoteksti ei voi olla tyhjä
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Sallitut tiedostopäätteet:'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} pikseliä"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ fi:
|
|
|
145
143
|
single_option: Yksi vaihtoehto
|
|
146
144
|
sorting: Järjestäminen
|
|
147
145
|
title_and_description: Otsikko ja kuvaus
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Lataa liite
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: Kyselylomakkeeseen vastaaminen epäonnistui.
|
data/config/locales/fr-CA.yml
CHANGED
|
@@ -128,8 +128,6 @@ fr-CA:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: Le corps ne peut pas être vide
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Formats acceptés :'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} px"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ fr-CA:
|
|
|
145
143
|
single_option: Option unique
|
|
146
144
|
sorting: Tri
|
|
147
145
|
title_and_description: Titre et description
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Télécharger la pièce jointe
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: Il y a eu des erreurs en répondant au questionnaire.
|
data/config/locales/fr.yml
CHANGED
|
@@ -128,8 +128,6 @@ fr:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: Le corps ne peut pas être vide
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: 'Formats acceptés :'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} px"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ fr:
|
|
|
145
143
|
single_option: Option unique
|
|
146
144
|
sorting: Tri
|
|
147
145
|
title_and_description: Titre et description
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Télécharger la pièce jointe
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: Il y a eu des erreurs en répondant au questionnaire.
|
data/config/locales/gl.yml
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gn:
|
data/config/locales/hu.yml
CHANGED
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
|
@@ -128,8 +128,6 @@ ja:
|
|
|
128
128
|
errors:
|
|
129
129
|
answer:
|
|
130
130
|
body: 本文は空白にできません
|
|
131
|
-
files:
|
|
132
|
-
extension_allowlist: '承認されたフォーマット:'
|
|
133
131
|
images:
|
|
134
132
|
dimensions: "%{width} x %{height} px"
|
|
135
133
|
processors:
|
|
@@ -145,6 +143,8 @@ ja:
|
|
|
145
143
|
single_option: 単一オプション
|
|
146
144
|
sorting: 並び替え
|
|
147
145
|
title_and_description: タイトルと説明
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: 添付ファイルをダウンロード
|
|
148
148
|
questionnaires:
|
|
149
149
|
answer:
|
|
150
150
|
invalid: フォームの回答に問題がありました。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ka:
|
data/config/locales/lb.yml
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lo:
|
data/config/locales/lt.yml
CHANGED
data/config/locales/lv.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/no.yml
CHANGED
data/config/locales/pl.yml
CHANGED
|
@@ -8,10 +8,10 @@ pl:
|
|
|
8
8
|
selected_choices: Wybrane opcje
|
|
9
9
|
question:
|
|
10
10
|
max_choices: Maksymalna liczba opcji do wyboru
|
|
11
|
-
question_type: Typ
|
|
11
|
+
question_type: Typ odpowiedzi
|
|
12
12
|
questionnaire_question:
|
|
13
|
-
mandatory:
|
|
14
|
-
max_characters: Limit znaków (zostaw 0 jeśli nie chcesz ustawiać limitu)
|
|
13
|
+
mandatory: Odpowiedź wymagana
|
|
14
|
+
max_characters: Limit znaków (zostaw 0, jeśli nie chcesz ustawiać limitu)
|
|
15
15
|
errors:
|
|
16
16
|
models:
|
|
17
17
|
answer:
|
|
@@ -38,7 +38,7 @@ pl:
|
|
|
38
38
|
show: Pokaż odpowiedzi
|
|
39
39
|
answer_option:
|
|
40
40
|
answer_option: Opcja odpowiedzi
|
|
41
|
-
free_text:
|
|
41
|
+
free_text: Możliwość wpisania dowolnego tekstu
|
|
42
42
|
remove: Usuń
|
|
43
43
|
statement: Komunikat
|
|
44
44
|
answers:
|
|
@@ -115,8 +115,6 @@ pl:
|
|
|
115
115
|
errors:
|
|
116
116
|
answer:
|
|
117
117
|
body: Treść nie może być pusta
|
|
118
|
-
files:
|
|
119
|
-
extension_allowlist: 'Dozwolone formaty:'
|
|
120
118
|
images:
|
|
121
119
|
dimensions: "%{width} × %{height} px"
|
|
122
120
|
question_types:
|
|
@@ -128,6 +126,7 @@ pl:
|
|
|
128
126
|
short_answer: Krótka odpowiedź
|
|
129
127
|
single_option: Jedna opcja
|
|
130
128
|
sorting: Sortowanie
|
|
129
|
+
title_and_description: Tytuł i opis
|
|
131
130
|
questionnaires:
|
|
132
131
|
answer:
|
|
133
132
|
invalid: Podczas wypełniania formularza wystąpiły błędy.
|
data/config/locales/pt-BR.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/config/locales/ro-RO.yml
CHANGED
|
@@ -122,13 +122,17 @@ ro:
|
|
|
122
122
|
update:
|
|
123
123
|
invalid: A apărut o eroare la salvarea chestionarului.
|
|
124
124
|
success: Chestionarul a fost salvat cu succes.
|
|
125
|
+
admin_log:
|
|
126
|
+
questionnaire:
|
|
127
|
+
update: "%{user_name} a actualizat chestionarul %{resource_name}"
|
|
125
128
|
errors:
|
|
126
129
|
answer:
|
|
127
130
|
body: Conținutul nu poate fi gol
|
|
128
|
-
files:
|
|
129
|
-
extension_allowlist: 'Formate acceptate:'
|
|
130
131
|
images:
|
|
131
132
|
dimensions: "%{width} x %{height} px"
|
|
133
|
+
processors:
|
|
134
|
+
resize_and_pad: Această imagine va fi redimensionată pentru a se potrivi cu %{dimensions}.
|
|
135
|
+
resize_to_fit: Această imagine va fi redimensionată pentru a se potrivi cu %{dimensions}.
|
|
132
136
|
question_types:
|
|
133
137
|
files: Fișiere
|
|
134
138
|
long_answer: Răspuns lung
|
|
@@ -139,6 +143,8 @@ ro:
|
|
|
139
143
|
single_option: Opțiune unică
|
|
140
144
|
sorting: Sortare
|
|
141
145
|
title_and_description: Titlu și descriere
|
|
146
|
+
questionnaire_answer_presenter:
|
|
147
|
+
download_attachment: Descărcare atașament
|
|
142
148
|
questionnaires:
|
|
143
149
|
answer:
|
|
144
150
|
invalid: A apărut o problemă la completarea chestionarului.
|
data/config/locales/sv.yml
CHANGED
data/config/locales/tr-TR.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
|
@@ -10,8 +10,11 @@ shared_examples_for "manage questionnaire answers" do
|
|
|
10
10
|
let!(:second) do
|
|
11
11
|
create :questionnaire_question, questionnaire: questionnaire, position: 2, question_type: "single_option"
|
|
12
12
|
end
|
|
13
|
+
let!(:third) do
|
|
14
|
+
create :questionnaire_question, questionnaire: questionnaire, position: 3, question_type: "files"
|
|
15
|
+
end
|
|
13
16
|
let(:questions) do
|
|
14
|
-
[first, second]
|
|
17
|
+
[first, second, third]
|
|
15
18
|
end
|
|
16
19
|
|
|
17
20
|
context "when there are no answers" do
|
|
@@ -25,6 +28,7 @@ shared_examples_for "manage questionnaire answers" do
|
|
|
25
28
|
let!(:answer1) { create :answer, questionnaire: questionnaire, question: first }
|
|
26
29
|
let!(:answer2) { create :answer, body: "second answer", questionnaire: questionnaire, question: first }
|
|
27
30
|
let!(:answer3) { create :answer, questionnaire: questionnaire, question: second }
|
|
31
|
+
let!(:file_answer) { create :answer, :with_attachments, questionnaire: questionnaire, question: third, body: nil, user: answer3.user, session_token: answer3.session_token }
|
|
28
32
|
|
|
29
33
|
it "shows the answer admin link" do
|
|
30
34
|
visit questionnaire_edit_path
|
|
@@ -45,7 +49,7 @@ shared_examples_for "manage questionnaire answers" do
|
|
|
45
49
|
end
|
|
46
50
|
|
|
47
51
|
it "shows the percentage" do
|
|
48
|
-
expect(page).to have_content("
|
|
52
|
+
expect(page).to have_content("33%")
|
|
49
53
|
end
|
|
50
54
|
|
|
51
55
|
it "has a detail link" do
|
|
@@ -121,6 +125,25 @@ shared_examples_for "manage questionnaire answers" do
|
|
|
121
125
|
expect(page).not_to have_link("Next ›")
|
|
122
126
|
expect(page).to have_link("‹ Prev")
|
|
123
127
|
end
|
|
128
|
+
|
|
129
|
+
it "third answer has download link for the attachments" do
|
|
130
|
+
click_link answer3.session_token, match: :first
|
|
131
|
+
expect(page).to have_content(translated(file_answer.attachments.first.title))
|
|
132
|
+
expect(page).to have_content(translated(file_answer.attachments.second.title))
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
context "when the file answer does not have a title for the attachment" do
|
|
136
|
+
let!(:file_answer) { create :answer, questionnaire: questionnaire, question: third, body: nil, user: answer3.user, session_token: answer3.session_token }
|
|
137
|
+
|
|
138
|
+
before do
|
|
139
|
+
create :attachment, :with_image, attached_to: file_answer, title: {}, description: {}
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
it "third answer has download link for the attachments" do
|
|
143
|
+
click_link answer3.session_token, match: :first
|
|
144
|
+
expect(page).to have_content("Download attachment")
|
|
145
|
+
end
|
|
146
|
+
end
|
|
124
147
|
end
|
|
125
148
|
end
|
|
126
149
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-forms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.27.
|
|
4
|
+
version: 0.27.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2023-02-13 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: decidim-core
|
|
@@ -19,14 +19,14 @@ dependencies:
|
|
|
19
19
|
requirements:
|
|
20
20
|
- - '='
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: 0.27.
|
|
22
|
+
version: 0.27.2
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
27
|
- - '='
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 0.27.
|
|
29
|
+
version: 0.27.2
|
|
30
30
|
- !ruby/object:Gem::Dependency
|
|
31
31
|
name: wicked_pdf
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -61,28 +61,28 @@ dependencies:
|
|
|
61
61
|
requirements:
|
|
62
62
|
- - '='
|
|
63
63
|
- !ruby/object:Gem::Version
|
|
64
|
-
version: 0.27.
|
|
64
|
+
version: 0.27.2
|
|
65
65
|
type: :development
|
|
66
66
|
prerelease: false
|
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
|
68
68
|
requirements:
|
|
69
69
|
- - '='
|
|
70
70
|
- !ruby/object:Gem::Version
|
|
71
|
-
version: 0.27.
|
|
71
|
+
version: 0.27.2
|
|
72
72
|
- !ruby/object:Gem::Dependency
|
|
73
73
|
name: decidim-dev
|
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
|
75
75
|
requirements:
|
|
76
76
|
- - '='
|
|
77
77
|
- !ruby/object:Gem::Version
|
|
78
|
-
version: 0.27.
|
|
78
|
+
version: 0.27.2
|
|
79
79
|
type: :development
|
|
80
80
|
prerelease: false
|
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
|
82
82
|
requirements:
|
|
83
83
|
- - '='
|
|
84
84
|
- !ruby/object:Gem::Version
|
|
85
|
-
version: 0.27.
|
|
85
|
+
version: 0.27.2
|
|
86
86
|
description: A forms gem for decidim.
|
|
87
87
|
email:
|
|
88
88
|
- josepjaume@gmail.com
|
|
@@ -217,6 +217,7 @@ files:
|
|
|
217
217
|
- config/locales/fr.yml
|
|
218
218
|
- config/locales/ga-IE.yml
|
|
219
219
|
- config/locales/gl.yml
|
|
220
|
+
- config/locales/gn-PY.yml
|
|
220
221
|
- config/locales/hr-HR.yml
|
|
221
222
|
- config/locales/hr.yml
|
|
222
223
|
- config/locales/hu.yml
|
|
@@ -225,10 +226,12 @@ files:
|
|
|
225
226
|
- config/locales/is.yml
|
|
226
227
|
- config/locales/it.yml
|
|
227
228
|
- config/locales/ja.yml
|
|
229
|
+
- config/locales/ka-GE.yml
|
|
228
230
|
- config/locales/ko-KR.yml
|
|
229
231
|
- config/locales/ko.yml
|
|
230
232
|
- config/locales/lb-LU.yml
|
|
231
233
|
- config/locales/lb.yml
|
|
234
|
+
- config/locales/lo-LA.yml
|
|
232
235
|
- config/locales/lt-LT.yml
|
|
233
236
|
- config/locales/lt.yml
|
|
234
237
|
- config/locales/lv.yml
|
|
@@ -314,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
314
317
|
- !ruby/object:Gem::Version
|
|
315
318
|
version: '0'
|
|
316
319
|
requirements: []
|
|
317
|
-
rubygems_version: 3.
|
|
320
|
+
rubygems_version: 3.3.7
|
|
318
321
|
signing_key:
|
|
319
322
|
specification_version: 4
|
|
320
323
|
summary: Decidim forms
|