decidim-forms 0.27.0 → 0.27.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7dcb5427b452dba4b617aa68c4fa0b6a4e1301ed4a0448f6a11cc47ce1db42e0
4
- data.tar.gz: 394aee7e9bb1141e634c5ddb7f140d4d4b4ee364a7152acd94318aa84b61f50b
3
+ metadata.gz: 9e399e7c1e3e8618dfd75491617038ecf10b4d06e3f53b61b343aa7888403996
4
+ data.tar.gz: 785293c3df843039cf86005b3c64ff1d5777adf54c2b4e63bf883fa5d4d36ce0
5
5
  SHA512:
6
- metadata.gz: 719da63c8482226dd938e10bfece96217d3c1c224b5f27fa43bb87bb53ad78d1fa9913def5b4acf4c6882d16a7c3a964036d6f149549be17b179b3db1a314cea
7
- data.tar.gz: 9cc87498d87baa973a4c70261c34443d1b28b91373ddb37190ef7f27a31b83a5827680bdb82fedb3b671fe17eed4f3d0b31a3ff3823b1ef8c4f89105f58d84b7
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(translated_attribute(attachment.title), attachment.url) +
58
- " " +
59
- content_tag(:small) do
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
@@ -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. Estàs segura?
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
@@ -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.
@@ -128,8 +128,6 @@ de:
128
128
  errors:
129
129
  answer:
130
130
  body: Körper kann nicht leer sein
131
- files:
132
- extension_allowlist: 'Gültige Formate:'
133
131
  images:
134
132
  dimensions: "%{width} x %{height} px"
135
133
  processors:
@@ -66,8 +66,6 @@ el:
66
66
  errors:
67
67
  answer:
68
68
  body: Το σώμα δεν μπορεί να είναι κενό
69
- files:
70
- extension_allowlist: 'Αποδεκτές μορφές:'
71
69
  images:
72
70
  dimensions: "Π %{width} x Υ %{height} px"
73
71
  question_types:
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -10,7 +10,7 @@ eu:
10
10
  max_choices: Gehienezko aukera kopurua
11
11
  question_type: Mota
12
12
  questionnaire_question:
13
- mandatory: derrigorrezko
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: deskribapena
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: adierazpena
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: 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
- already_answered_warning: Galdetegia dagoeneko erantzun dio erabiltzaile batzuek, beraz, ezin dituzu bere galderak aldatu.
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: adierazpena
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: Gorputza ezin da hutsik egon
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 erantzun
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
- tos_agreement: Zerbitzu-baldintzak onartzen dituzunean parte hartuz
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: Erantzuna
185
+ created_at: Erantzunda
167
186
  id: Erantzun IDa
168
187
  ip_hash: IP Helbidearen Hash
169
188
  question: Galdera
@@ -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ä.
@@ -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.
@@ -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.
@@ -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.
@@ -61,8 +61,6 @@ gl:
61
61
  errors:
62
62
  answer:
63
63
  body: O corpo non pode estar en branco
64
- files:
65
- extension_allowlist: 'Formatos aceptados:'
66
64
  images:
67
65
  processors:
68
66
  resize_and_pad: A imaxe axustarase para se encadrar a %{dimensions}.
@@ -0,0 +1 @@
1
+ gn:
@@ -67,8 +67,6 @@ hu:
67
67
  errors:
68
68
  answer:
69
69
  body: A szövegtörzs nem lehet üres
70
- files:
71
- extension_allowlist: 'Elfogadott formátumok:'
72
70
  images:
73
71
  processors:
74
72
  resize_to_fit: 'A kép át lesz méretezve erre a méretre: %{dimensions}.'
@@ -115,8 +115,6 @@ it:
115
115
  errors:
116
116
  answer:
117
117
  body: Il corpo non può essere vuoto
118
- files:
119
- extension_allowlist: 'Formati accettati:'
120
118
  images:
121
119
  dimensions: "%{width} x %{height} px"
122
120
  question_types:
@@ -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:
@@ -115,8 +115,6 @@ lb:
115
115
  errors:
116
116
  answer:
117
117
  body: Körper kann nicht leer sein
118
- files:
119
- extension_allowlist: 'Gültige Formate:'
120
118
  images:
121
119
  dimensions: "%{width} x %{height} px"
122
120
  question_types:
@@ -0,0 +1 @@
1
+ lo:
@@ -128,8 +128,6 @@ lt:
128
128
  errors:
129
129
  answer:
130
130
  body: Pagrindinė dalis negali būti tuščia
131
- files:
132
- extension_allowlist: 'Priimtini formatai:'
133
131
  images:
134
132
  dimensions: "%{width} x %{height} px"
135
133
  processors:
@@ -66,8 +66,6 @@ lv:
66
66
  errors:
67
67
  answer:
68
68
  body: Pamatteksts nevar būt tukšs
69
- files:
70
- extension_allowlist: 'Pieņemtie formāti:'
71
69
  images:
72
70
  dimensions: "%{width} x %{height} pikseļi"
73
71
  question_types:
@@ -119,8 +119,6 @@ nl:
119
119
  errors:
120
120
  answer:
121
121
  body: Lichaam mag niet leeg zijn
122
- files:
123
- extension_allowlist: 'Geaccepteerde formaten:'
124
122
  images:
125
123
  dimensions: "%{width} x %{height} px"
126
124
  question_types:
@@ -125,8 +125,6 @@
125
125
  errors:
126
126
  answer:
127
127
  body: Teksten kan ikke være blank
128
- files:
129
- extension_allowlist: 'Aksepterte formater:'
130
128
  images:
131
129
  dimensions: "%{width} x %{height} px"
132
130
  question_types:
@@ -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: Obowiązkowy
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: Dowolny tekst
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.
@@ -115,8 +115,6 @@ pt-BR:
115
115
  errors:
116
116
  answer:
117
117
  body: O corpo não pode ficar em branco
118
- files:
119
- extension_allowlist: 'Formatos aceitos:'
120
118
  images:
121
119
  dimensions: "%{width} x %{height} px"
122
120
  question_types:
@@ -115,8 +115,6 @@ pt:
115
115
  errors:
116
116
  answer:
117
117
  body: O corpo não pode ficar em branco
118
- files:
119
- extension_allowlist: 'Formatos aceites:'
120
118
  images:
121
119
  dimensions: "%{width} x %{height} px"
122
120
  question_types:
@@ -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.
@@ -125,8 +125,6 @@ sv:
125
125
  errors:
126
126
  answer:
127
127
  body: Kroppen kan inte vara to
128
- files:
129
- extension_allowlist: 'Godkända format:'
130
128
  images:
131
129
  dimensions: "%{width} x %{height} px"
132
130
  question_types:
@@ -110,8 +110,6 @@ tr:
110
110
  errors:
111
111
  answer:
112
112
  body: Vücut boş olamaz
113
- files:
114
- extension_allowlist: 'Kabul edilen biçimler:'
115
113
  images:
116
114
  dimensions: "%{width} x %{height} px"
117
115
  question_types:
@@ -109,8 +109,6 @@ zh-CN:
109
109
  errors:
110
110
  answer:
111
111
  body: 主体不能为空
112
- files:
113
- extension_allowlist: '接受的格式:'
114
112
  images:
115
113
  dimensions: "%{width} x %{height} px"
116
114
  question_types:
@@ -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("50%")
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
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-forms version.
5
5
  module Forms
6
6
  def self.version
7
- "0.27.0"
7
+ "0.27.2"
8
8
  end
9
9
  end
10
10
  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.0
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: 2022-09-29 00:00:00.000000000 Z
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.0
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.0
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.0
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.0
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.0
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.0
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.2.22
320
+ rubygems_version: 3.3.7
318
321
  signing_key:
319
322
  specification_version: 4
320
323
  summary: Decidim forms