decidim-forms 0.29.6 → 0.30.0.rc1
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/cells/decidim/forms/step_navigation_cell.rb +18 -5
- data/app/commands/decidim/forms/admin/update_questionnaire.rb +1 -82
- data/app/commands/decidim/forms/admin/update_questions.rb +109 -0
- data/app/commands/decidim/forms/answer_questionnaire.rb +10 -3
- data/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb +39 -3
- data/app/controllers/decidim/forms/admin/concerns/has_questionnaire_answers.rb +2 -2
- data/app/controllers/decidim/forms/concerns/has_questionnaire.rb +12 -4
- data/app/forms/decidim/forms/admin/display_condition_form.rb +1 -1
- data/app/forms/decidim/forms/admin/questionnaire_form.rb +0 -9
- data/app/forms/decidim/forms/admin/questions_form.rb +18 -0
- data/app/forms/decidim/forms/answer_choice_form.rb +5 -0
- data/app/forms/decidim/forms/answer_form.rb +1 -0
- data/app/forms/decidim/forms/questionnaire_form.rb +7 -0
- data/app/helpers/decidim/forms/admin/concerns/has_questionnaire_answers_pagination_helper.rb +1 -1
- data/app/helpers/decidim/forms/admin/concerns/has_questionnaire_answers_url_helper.rb +5 -5
- data/app/jobs/decidim/forms/export_questionnaire_answers_job.rb +5 -1
- data/app/models/decidim/forms/answer_choice.rb +0 -2
- data/app/models/decidim/forms/answer_option.rb +1 -1
- data/app/models/decidim/forms/question.rb +10 -0
- data/app/packs/entrypoints/decidim_forms.js +0 -1
- data/app/packs/entrypoints/decidim_forms_admin.js +6 -0
- data/app/packs/src/decidim/forms/admin/publish_answers_buttons.js +72 -0
- data/app/packs/src/decidim/forms/forms.js +4 -25
- data/app/presenters/decidim/forms/admin/questionnaire_participant_presenter.rb +1 -1
- data/app/presenters/decidim/forms/admin_log/question_presenter.rb +31 -0
- data/app/queries/decidim/forms/questionnaire_user_answers.rb +1 -1
- data/app/views/decidim/forms/admin/questionnaires/_answer_option_template.html.erb +1 -1
- data/app/views/decidim/forms/admin/questionnaires/_display_condition_template.html.erb +1 -1
- data/app/views/decidim/forms/admin/questionnaires/_form.html.erb +0 -89
- data/app/views/decidim/forms/admin/questionnaires/_matrix_row_template.html.erb +1 -1
- data/app/views/decidim/forms/admin/questionnaires/_question.html.erb +14 -4
- data/app/views/decidim/forms/admin/questionnaires/_questions_form.html.erb +80 -0
- data/app/views/decidim/forms/admin/questionnaires/_separator.html.erb +10 -3
- data/app/views/decidim/forms/admin/questionnaires/_title_and_description.html.erb +11 -1
- data/app/views/decidim/forms/admin/questionnaires/edit.html.erb +0 -20
- data/app/views/decidim/forms/admin/questionnaires/edit_questions.html.erb +47 -0
- data/app/views/decidim/forms/questionnaires/_answer.html.erb +1 -1
- data/app/views/decidim/forms/questionnaires/_questionnaire.html.erb +8 -1
- data/app/views/decidim/forms/questionnaires/answers/_files.html.erb +1 -1
- data/app/views/decidim/forms/questionnaires/answers/_long_answer.html.erb +1 -1
- data/app/views/decidim/forms/questionnaires/answers/_short_answer.html.erb +1 -1
- data/app/views/decidim/forms/questionnaires/answers/_sorting.html.erb +12 -6
- data/app/views/decidim/forms/questionnaires/edit.html.erb +47 -0
- data/app/views/decidim/forms/questionnaires/show.html.erb +13 -2
- data/config/assets.rb +1 -2
- data/config/locales/ar.yml +18 -1
- data/config/locales/bg.yml +42 -2
- data/config/locales/ca.yml +59 -13
- data/config/locales/cs.yml +54 -8
- data/config/locales/de.yml +56 -10
- data/config/locales/el.yml +41 -2
- data/config/locales/en.yml +51 -5
- data/config/locales/es-MX.yml +61 -15
- data/config/locales/es-PY.yml +61 -15
- data/config/locales/es.yml +60 -14
- data/config/locales/eu.yml +58 -12
- data/config/locales/fi-plain.yml +56 -10
- data/config/locales/fi.yml +56 -10
- data/config/locales/fr-CA.yml +51 -13
- data/config/locales/fr.yml +51 -13
- data/config/locales/ga-IE.yml +9 -0
- data/config/locales/gl.yml +11 -1
- data/config/locales/hu.yml +14 -1
- data/config/locales/id-ID.yml +9 -1
- data/config/locales/it.yml +31 -3
- data/config/locales/ja.yml +13 -12
- data/config/locales/lb.yml +32 -1
- data/config/locales/lt.yml +41 -2
- data/config/locales/lv.yml +15 -1
- data/config/locales/nl.yml +29 -0
- data/config/locales/no.yml +33 -0
- data/config/locales/pl.yml +43 -2
- data/config/locales/pt-BR.yml +35 -0
- data/config/locales/pt.yml +31 -0
- data/config/locales/ro-RO.yml +50 -17
- data/config/locales/ru.yml +3 -2
- data/config/locales/sk.yml +12 -1
- data/config/locales/sl.yml +7 -0
- data/config/locales/sv.yml +17 -15
- data/config/locales/tr-TR.yml +27 -0
- data/config/locales/val-ES.yml +2 -0
- data/config/locales/zh-CN.yml +27 -0
- data/config/locales/zh-TW.yml +41 -2
- data/db/migrate/20190315203056_add_session_token_to_decidim_forms_answers.rb +1 -1
- data/db/migrate/20241122142230_add_survey_answers_published_at_to_questions.rb +7 -0
- data/decidim-forms.gemspec +1 -2
- data/lib/decidim/api/answer_option_type.rb +1 -1
- data/lib/decidim/api/question_type.rb +4 -4
- data/lib/decidim/api/questionnaire_type.rb +4 -4
- data/lib/decidim/exporters/form_pdf.rb +114 -11
- data/lib/decidim/forms/download_your_data_user_answers_serializer.rb +0 -4
- data/lib/decidim/forms/test/factories.rb +2 -2
- data/lib/decidim/forms/test/shared_examples/has_questionnaire.rb +46 -7
- data/lib/decidim/forms/test/shared_examples/manage_questionnaire_answers.rb +17 -17
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_display_conditions.rb +19 -21
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_questions.rb +70 -94
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_display_conditions.rb +15 -18
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_questions.rb +115 -247
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires.rb +3 -29
- data/lib/decidim/forms/version.rb +1 -1
- data/lib/decidim/forms.rb +0 -1
- metadata +18 -33
- data/app/packs/entrypoints/decidim_questionnaire_answers_pdf.js +0 -1
- data/app/packs/entrypoints/decidim_questionnaire_answers_pdf.scss +0 -1
- data/app/packs/stylesheets/decidim/forms/questionnaire-answers-pdf.scss +0 -69
- data/app/views/decidim/forms/admin/questionnaires/answers/export/_answer.html.erb +0 -31
- data/app/views/decidim/forms/admin/questionnaires/answers/export/pdf.html.erb +0 -13
- data/app/views/layouts/decidim/forms/admin/questionnaires/questionnaire_answers.html.erb +0 -12
- data/config/initializers/wicked_pdf.rb +0 -26
- data/config/locales/ca-IT.yml +0 -192
- data/lib/decidim/exporters/form_pdf_controller_helper.rb +0 -13
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.
|
|
4
|
+
version: 0.30.0.rc1
|
|
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: 2025-
|
|
14
|
+
date: 2025-02-18 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: decidim-core
|
|
@@ -19,56 +19,42 @@ dependencies:
|
|
|
19
19
|
requirements:
|
|
20
20
|
- - '='
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: 0.
|
|
22
|
+
version: 0.30.0.rc1
|
|
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.
|
|
30
|
-
- !ruby/object:Gem::Dependency
|
|
31
|
-
name: wicked_pdf
|
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
requirements:
|
|
34
|
-
- - "~>"
|
|
35
|
-
- !ruby/object:Gem::Version
|
|
36
|
-
version: '2.1'
|
|
37
|
-
type: :runtime
|
|
38
|
-
prerelease: false
|
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
40
|
-
requirements:
|
|
41
|
-
- - "~>"
|
|
42
|
-
- !ruby/object:Gem::Version
|
|
43
|
-
version: '2.1'
|
|
29
|
+
version: 0.30.0.rc1
|
|
44
30
|
- !ruby/object:Gem::Dependency
|
|
45
31
|
name: decidim-admin
|
|
46
32
|
requirement: !ruby/object:Gem::Requirement
|
|
47
33
|
requirements:
|
|
48
34
|
- - '='
|
|
49
35
|
- !ruby/object:Gem::Version
|
|
50
|
-
version: 0.
|
|
36
|
+
version: 0.30.0.rc1
|
|
51
37
|
type: :development
|
|
52
38
|
prerelease: false
|
|
53
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
54
40
|
requirements:
|
|
55
41
|
- - '='
|
|
56
42
|
- !ruby/object:Gem::Version
|
|
57
|
-
version: 0.
|
|
43
|
+
version: 0.30.0.rc1
|
|
58
44
|
- !ruby/object:Gem::Dependency
|
|
59
45
|
name: decidim-dev
|
|
60
46
|
requirement: !ruby/object:Gem::Requirement
|
|
61
47
|
requirements:
|
|
62
48
|
- - '='
|
|
63
49
|
- !ruby/object:Gem::Version
|
|
64
|
-
version: 0.
|
|
50
|
+
version: 0.30.0.rc1
|
|
65
51
|
type: :development
|
|
66
52
|
prerelease: false
|
|
67
53
|
version_requirements: !ruby/object:Gem::Requirement
|
|
68
54
|
requirements:
|
|
69
55
|
- - '='
|
|
70
56
|
- !ruby/object:Gem::Version
|
|
71
|
-
version: 0.
|
|
57
|
+
version: 0.30.0.rc1
|
|
72
58
|
description: A forms gem for decidim.
|
|
73
59
|
email:
|
|
74
60
|
- josepjaume@gmail.com
|
|
@@ -91,6 +77,7 @@ files:
|
|
|
91
77
|
- app/cells/decidim/forms/step_navigation/show.erb
|
|
92
78
|
- app/cells/decidim/forms/step_navigation_cell.rb
|
|
93
79
|
- app/commands/decidim/forms/admin/update_questionnaire.rb
|
|
80
|
+
- app/commands/decidim/forms/admin/update_questions.rb
|
|
94
81
|
- app/commands/decidim/forms/answer_questionnaire.rb
|
|
95
82
|
- app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb
|
|
96
83
|
- app/controllers/decidim/forms/admin/concerns/has_questionnaire_answers.rb
|
|
@@ -100,6 +87,7 @@ files:
|
|
|
100
87
|
- app/forms/decidim/forms/admin/question_form.rb
|
|
101
88
|
- app/forms/decidim/forms/admin/question_matrix_row_form.rb
|
|
102
89
|
- app/forms/decidim/forms/admin/questionnaire_form.rb
|
|
90
|
+
- app/forms/decidim/forms/admin/questions_form.rb
|
|
103
91
|
- app/forms/decidim/forms/answer_choice_form.rb
|
|
104
92
|
- app/forms/decidim/forms/answer_form.rb
|
|
105
93
|
- app/forms/decidim/forms/questionnaire_form.rb
|
|
@@ -120,8 +108,6 @@ files:
|
|
|
120
108
|
- app/models/decidim/forms/questionnaire.rb
|
|
121
109
|
- app/packs/entrypoints/decidim_forms.js
|
|
122
110
|
- app/packs/entrypoints/decidim_forms_admin.js
|
|
123
|
-
- app/packs/entrypoints/decidim_questionnaire_answers_pdf.js
|
|
124
|
-
- app/packs/entrypoints/decidim_questionnaire_answers_pdf.scss
|
|
125
111
|
- app/packs/images/decidim/surveys/decidim_surveys.svg
|
|
126
112
|
- app/packs/src/decidim/forms/admin/auto_buttons_by_min_items.component.js
|
|
127
113
|
- app/packs/src/decidim/forms/admin/auto_select_options_by_total_items.component.js
|
|
@@ -129,14 +115,15 @@ files:
|
|
|
129
115
|
- app/packs/src/decidim/forms/admin/collapsible_questions.js
|
|
130
116
|
- app/packs/src/decidim/forms/admin/forms.js
|
|
131
117
|
- app/packs/src/decidim/forms/admin/live_text_update.component.js
|
|
118
|
+
- app/packs/src/decidim/forms/admin/publish_answers_buttons.js
|
|
132
119
|
- app/packs/src/decidim/forms/display_conditions.component.js
|
|
133
120
|
- app/packs/src/decidim/forms/forms.js
|
|
134
121
|
- app/packs/src/decidim/forms/max_choices_alert.component.js
|
|
135
122
|
- app/packs/src/decidim/forms/option_attached_inputs.component.js
|
|
136
123
|
- app/packs/stylesheets/decidim/forms/forms.scss
|
|
137
|
-
- app/packs/stylesheets/decidim/forms/questionnaire-answers-pdf.scss
|
|
138
124
|
- app/presenters/decidim/forms/admin/questionnaire_answer_presenter.rb
|
|
139
125
|
- app/presenters/decidim/forms/admin/questionnaire_participant_presenter.rb
|
|
126
|
+
- app/presenters/decidim/forms/admin_log/question_presenter.rb
|
|
140
127
|
- app/presenters/decidim/forms/admin_log/questionnaire_presenter.rb
|
|
141
128
|
- app/presenters/decidim/forms/answer_option_presenter.rb
|
|
142
129
|
- app/presenters/decidim/forms/question_presenter.rb
|
|
@@ -151,13 +138,13 @@ files:
|
|
|
151
138
|
- app/views/decidim/forms/admin/questionnaires/_matrix_row.html.erb
|
|
152
139
|
- app/views/decidim/forms/admin/questionnaires/_matrix_row_template.html.erb
|
|
153
140
|
- app/views/decidim/forms/admin/questionnaires/_question.html.erb
|
|
141
|
+
- app/views/decidim/forms/admin/questionnaires/_questions_form.html.erb
|
|
154
142
|
- app/views/decidim/forms/admin/questionnaires/_separator.html.erb
|
|
155
143
|
- app/views/decidim/forms/admin/questionnaires/_title_and_description.html.erb
|
|
156
|
-
- app/views/decidim/forms/admin/questionnaires/answers/export/_answer.html.erb
|
|
157
|
-
- app/views/decidim/forms/admin/questionnaires/answers/export/pdf.html.erb
|
|
158
144
|
- app/views/decidim/forms/admin/questionnaires/answers/index.html.erb
|
|
159
145
|
- app/views/decidim/forms/admin/questionnaires/answers/show.html.erb
|
|
160
146
|
- app/views/decidim/forms/admin/questionnaires/edit.html.erb
|
|
147
|
+
- app/views/decidim/forms/admin/questionnaires/edit_questions.html.erb
|
|
161
148
|
- app/views/decidim/forms/questionnaires/_answer.html.erb
|
|
162
149
|
- app/views/decidim/forms/questionnaires/_questionnaire.html.erb
|
|
163
150
|
- app/views/decidim/forms/questionnaires/_questionnaire_readonly.html.erb
|
|
@@ -171,10 +158,9 @@ files:
|
|
|
171
158
|
- app/views/decidim/forms/questionnaires/answers/_single_option.html.erb
|
|
172
159
|
- app/views/decidim/forms/questionnaires/answers/_sorting.html.erb
|
|
173
160
|
- app/views/decidim/forms/questionnaires/answers/_title_and_description.html.erb
|
|
161
|
+
- app/views/decidim/forms/questionnaires/edit.html.erb
|
|
174
162
|
- app/views/decidim/forms/questionnaires/show.html.erb
|
|
175
|
-
- app/views/layouts/decidim/forms/admin/questionnaires/questionnaire_answers.html.erb
|
|
176
163
|
- config/assets.rb
|
|
177
|
-
- config/initializers/wicked_pdf.rb
|
|
178
164
|
- config/locales/am-ET.yml
|
|
179
165
|
- config/locales/ar-SA.yml
|
|
180
166
|
- config/locales/ar.yml
|
|
@@ -182,7 +168,6 @@ files:
|
|
|
182
168
|
- config/locales/bg.yml
|
|
183
169
|
- config/locales/bn-BD.yml
|
|
184
170
|
- config/locales/bs-BA.yml
|
|
185
|
-
- config/locales/ca-IT.yml
|
|
186
171
|
- config/locales/ca.yml
|
|
187
172
|
- config/locales/cs-CZ.yml
|
|
188
173
|
- config/locales/cs.yml
|
|
@@ -275,13 +260,13 @@ files:
|
|
|
275
260
|
- db/migrate/20240402095253_add_matrix_row_counter_cache_to_questions.rb
|
|
276
261
|
- db/migrate/20240416111953_add_display_conditions_counter_cache_to_questions.rb
|
|
277
262
|
- db/migrate/20240416113926_add_display_conditions_for_other_questions_counter_cache_to_questions.rb
|
|
263
|
+
- db/migrate/20241122142230_add_survey_answers_published_at_to_questions.rb
|
|
278
264
|
- decidim-forms.gemspec
|
|
279
265
|
- lib/decidim/api/answer_option_type.rb
|
|
280
266
|
- lib/decidim/api/question_type.rb
|
|
281
267
|
- lib/decidim/api/questionnaire_entity_interface.rb
|
|
282
268
|
- lib/decidim/api/questionnaire_type.rb
|
|
283
269
|
- lib/decidim/exporters/form_pdf.rb
|
|
284
|
-
- lib/decidim/exporters/form_pdf_controller_helper.rb
|
|
285
270
|
- lib/decidim/forms.rb
|
|
286
271
|
- lib/decidim/forms/admin.rb
|
|
287
272
|
- lib/decidim/forms/admin_engine.rb
|
|
@@ -316,14 +301,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
316
301
|
requirements:
|
|
317
302
|
- - "~>"
|
|
318
303
|
- !ruby/object:Gem::Version
|
|
319
|
-
version: 3.
|
|
304
|
+
version: 3.3.0
|
|
320
305
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
306
|
requirements:
|
|
322
307
|
- - ">="
|
|
323
308
|
- !ruby/object:Gem::Version
|
|
324
309
|
version: '0'
|
|
325
310
|
requirements: []
|
|
326
|
-
rubygems_version: 3.
|
|
311
|
+
rubygems_version: 3.5.11
|
|
327
312
|
signing_key:
|
|
328
313
|
specification_version: 4
|
|
329
314
|
summary: Decidim forms
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "entrypoints/decidim_questionnaire_answers_pdf.scss"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "stylesheets/decidim/forms/questionnaire-answers-pdf.scss";
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
.questionnaire-answers {
|
|
2
|
-
.header {
|
|
3
|
-
h1 {
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 25px;
|
|
6
|
-
background: rgb(59, 69, 87);
|
|
7
|
-
color: white;
|
|
8
|
-
border-radius: 4px 4px 0 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.description {
|
|
12
|
-
margin: 0;
|
|
13
|
-
padding: 25px;
|
|
14
|
-
background: #f6f6f6;
|
|
15
|
-
color: #202751;
|
|
16
|
-
border-radius: 0 0 4px 4px;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.answer {
|
|
21
|
-
margin-top: 25px;
|
|
22
|
-
background: #f6f6f6;
|
|
23
|
-
border-radius: 0 0 4px 4px;
|
|
24
|
-
|
|
25
|
-
.title {
|
|
26
|
-
page-break-inside: avoid;
|
|
27
|
-
border-radius: 4px 4px 0 0;
|
|
28
|
-
padding: 10px 25px;
|
|
29
|
-
background: rgb(59, 69, 87);
|
|
30
|
-
color: white;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.participant-info {
|
|
34
|
-
margin-top: 0;
|
|
35
|
-
padding: 10px 25px;
|
|
36
|
-
width: 100%;
|
|
37
|
-
text-align: center;
|
|
38
|
-
background: #eee;
|
|
39
|
-
color: #202751;
|
|
40
|
-
page-break-inside: avoid;
|
|
41
|
-
|
|
42
|
-
th:first-child {
|
|
43
|
-
text-align: left;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
td:first-child {
|
|
47
|
-
text-align: left;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
th:last-child {
|
|
51
|
-
text-align: right;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
td:last-child {
|
|
55
|
-
text-align: right;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.answers {
|
|
60
|
-
padding: 25px;
|
|
61
|
-
|
|
62
|
-
.question {
|
|
63
|
-
page-break-inside: avoid;
|
|
64
|
-
font-size: inherit;
|
|
65
|
-
color: #202751;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<div class="answer">
|
|
2
|
-
<h2 class="title"><%= t(".title", number: participant_counter + 1) %></h2>
|
|
3
|
-
|
|
4
|
-
<table class="participant-info">
|
|
5
|
-
<thead>
|
|
6
|
-
<tr>
|
|
7
|
-
<th class='token'><%= t("session_token", scope: "decidim.forms.user_answers_serializer") %></th>
|
|
8
|
-
<th><%= t("user_status", scope: "decidim.forms.user_answers_serializer") %></th>
|
|
9
|
-
<th><%= t("ip_hash", scope: "decidim.forms.user_answers_serializer") %></th>
|
|
10
|
-
<th><%= t("completion", scope: "decidim.forms.user_answers_serializer") %></th>
|
|
11
|
-
<th><%= t("created_at", scope: "decidim.forms.user_answers_serializer") %></th>
|
|
12
|
-
</tr>
|
|
13
|
-
</thead>
|
|
14
|
-
<tbody>
|
|
15
|
-
<tr>
|
|
16
|
-
<td><%= participant.session_token %></td>
|
|
17
|
-
<td><%= participant.status %></td>
|
|
18
|
-
<td><%= participant.ip_hash %></td>
|
|
19
|
-
<td><%= display_percentage(participant.completion) %></td>
|
|
20
|
-
<td><%= l participant.answered_at, format: :short %></td>
|
|
21
|
-
</tr>
|
|
22
|
-
</tbody>
|
|
23
|
-
</table>
|
|
24
|
-
|
|
25
|
-
<div class="answers">
|
|
26
|
-
<% participant.answers.each do |answer| %>
|
|
27
|
-
<h3 class="question"><%= answer.question %></h3>
|
|
28
|
-
<p><%= answer.body %></p>
|
|
29
|
-
<% end %>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<div class="questionnaire-answers">
|
|
2
|
-
<div class="header">
|
|
3
|
-
<h1><%= translated_attribute(questionnaire.title) %></h1>
|
|
4
|
-
<div class="description">
|
|
5
|
-
<%== translated_attribute(questionnaire.description).html_safe %>
|
|
6
|
-
</div>
|
|
7
|
-
<% if collection.count > 1 %>
|
|
8
|
-
<h2><%= t("title", scope: "decidim.forms.admin.questionnaires.answers.index", total: collection.count) %></h2>
|
|
9
|
-
<% end %>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<%= render partial: "decidim/forms/admin/questionnaires/answers/export/answer", collection:, locals: { questionnaire: }, as: :participant %>
|
|
13
|
-
</div>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="<%= I18n.locale %>" class="no-js">
|
|
3
|
-
<head>
|
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width">
|
|
6
|
-
<%= wicked_pdf_stylesheet_pack_tag "decidim_questionnaire_answers_pdf" %>
|
|
7
|
-
<title><%= @title %></title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<%= yield %>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "wicked_pdf"
|
|
4
|
-
|
|
5
|
-
# frozen_string_literal: true
|
|
6
|
-
|
|
7
|
-
# WickedPDF Global Configuration
|
|
8
|
-
#
|
|
9
|
-
# Use this to set up shared configuration options for your entire application.
|
|
10
|
-
# Any of the configuration options shown here can also be applied to single
|
|
11
|
-
# models by passing arguments to the `render :pdf` call.
|
|
12
|
-
#
|
|
13
|
-
# To learn more, check out the README:
|
|
14
|
-
#
|
|
15
|
-
# https://github.com/mileszs/wicked_pdf/blob/master/README.md
|
|
16
|
-
|
|
17
|
-
WickedPdf.configure do |config|
|
|
18
|
-
# Path to the wkhtmltopdf executable: This usually is not needed if using
|
|
19
|
-
# one of the wkhtmltopdf-binary family of gems.
|
|
20
|
-
# or
|
|
21
|
-
# config.exe_path = '/usr/local/bin/wkhtmltopdf',
|
|
22
|
-
|
|
23
|
-
# Layout file to be used for all PDFs
|
|
24
|
-
# (but can be overridden in `render :pdf` calls)
|
|
25
|
-
# config.layout = 'pdf.html'
|
|
26
|
-
end
|
data/config/locales/ca-IT.yml
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
ca-IT:
|
|
3
|
-
activemodel:
|
|
4
|
-
attributes:
|
|
5
|
-
answer:
|
|
6
|
-
body: Resposta
|
|
7
|
-
choices: Opcions
|
|
8
|
-
selected_choices: Opcions seleccionades
|
|
9
|
-
question:
|
|
10
|
-
max_choices: Nombre màxim d'opcions
|
|
11
|
-
question_type: Tipus
|
|
12
|
-
questionnaire_question:
|
|
13
|
-
mandatory: Obligatori
|
|
14
|
-
max_characters: Límit de caràcters (deixa-ho a 0 si no hi ha límit)
|
|
15
|
-
errors:
|
|
16
|
-
models:
|
|
17
|
-
answer:
|
|
18
|
-
attributes:
|
|
19
|
-
add_documents:
|
|
20
|
-
needs_to_be_reattached: És necessari tornar a adjuntar el fitxer
|
|
21
|
-
body:
|
|
22
|
-
too_long: és massa llarg
|
|
23
|
-
choices:
|
|
24
|
-
missing: no estan completes
|
|
25
|
-
too_many: Pots triar un màxim de %{count} opcions.
|
|
26
|
-
questionnaire:
|
|
27
|
-
request_invalid: Hi ha hagut un problema gestionant la petició. Si us plau, torna-ho a provar.
|
|
28
|
-
decidim:
|
|
29
|
-
forms:
|
|
30
|
-
admin:
|
|
31
|
-
models:
|
|
32
|
-
components:
|
|
33
|
-
description: Descripció
|
|
34
|
-
tos: Termes del servei
|
|
35
|
-
questionnaires:
|
|
36
|
-
actions:
|
|
37
|
-
back: Tornar a les preguntes
|
|
38
|
-
show: Mostrar les respostes
|
|
39
|
-
answer_option:
|
|
40
|
-
answer_option: Opció de resposta
|
|
41
|
-
free_text: Text lliure
|
|
42
|
-
remove: Eliminar
|
|
43
|
-
statement: Declaració
|
|
44
|
-
answers:
|
|
45
|
-
actions:
|
|
46
|
-
back: Tornar a les respostes
|
|
47
|
-
export: Exportar
|
|
48
|
-
next: Següent ›
|
|
49
|
-
previous: "‹ Anterior"
|
|
50
|
-
show: Mostrar les respostes
|
|
51
|
-
empty: Encara no hi ha respostes
|
|
52
|
-
export:
|
|
53
|
-
answer:
|
|
54
|
-
title: 'Resposta #%{number}'
|
|
55
|
-
export_response:
|
|
56
|
-
title: survey_user_answers_%{token}
|
|
57
|
-
index:
|
|
58
|
-
title: "%{total} respostes en total"
|
|
59
|
-
show:
|
|
60
|
-
title: 'Resposta #%{number}'
|
|
61
|
-
display_condition:
|
|
62
|
-
answer_option: Opció de resposta
|
|
63
|
-
condition_question: Pregunta
|
|
64
|
-
condition_type: Condició
|
|
65
|
-
condition_types:
|
|
66
|
-
answered: Amb resposta
|
|
67
|
-
equal: Igual a
|
|
68
|
-
match: Inclou text
|
|
69
|
-
not_answered: No resposta
|
|
70
|
-
not_equal: No és igual
|
|
71
|
-
condition_value: Text inclòs
|
|
72
|
-
display_condition: Condicions de visualització
|
|
73
|
-
mandatory: Aquesta condició s'ha de complir sempre independentment de l'estat d'altres condicions
|
|
74
|
-
remove: Eliminar
|
|
75
|
-
save_warning: Recorda de guardar l'enquesta abans de configurar les condicions de visualitzacióó
|
|
76
|
-
select_answer_option: Eliminar l'opció de resposta
|
|
77
|
-
select_condition_question: Seleccionar una pregunta
|
|
78
|
-
select_condition_type: Seleccionar un tipus de condició
|
|
79
|
-
edit:
|
|
80
|
-
save: Desa
|
|
81
|
-
title: Editar el qüestionari
|
|
82
|
-
form:
|
|
83
|
-
add_question: Afegeix una pregunta
|
|
84
|
-
add_separator: Afegir separador
|
|
85
|
-
add_title_and_description: Afegir títol i descripció
|
|
86
|
-
already_answered_warning: No pots modificar les preguntes d'aquest formulari perquè algunes participants ja han respost el formulari.
|
|
87
|
-
collapse: Redueix totes les preguntes
|
|
88
|
-
expand: Expandeix totes les preguntes
|
|
89
|
-
preview: Previsualitzar
|
|
90
|
-
title: Editar formulari per %{questionnaire_for}
|
|
91
|
-
unpublished_warning: El formulari no està publicat. Pots modificar les preguntes, però en fer-ho s'esborraran les respostes actuals.
|
|
92
|
-
matrix_row:
|
|
93
|
-
matrix_row: Fila
|
|
94
|
-
remove: Elimina
|
|
95
|
-
statement: Declaració
|
|
96
|
-
question:
|
|
97
|
-
add_answer_option: Afegeix una opció de resposta
|
|
98
|
-
add_display_condition: Afegir condició de visualització
|
|
99
|
-
add_display_condition_info: Guardar l'enquesta per a configurar les condicions de visualització
|
|
100
|
-
add_matrix_row: Afegir fila
|
|
101
|
-
any: Cap
|
|
102
|
-
collapse: Redueix
|
|
103
|
-
description: Descripció
|
|
104
|
-
expand: Expandeix
|
|
105
|
-
question: Pregunta
|
|
106
|
-
remove: Eliminar
|
|
107
|
-
statement: Declaració
|
|
108
|
-
separator:
|
|
109
|
-
remove: Eliminar
|
|
110
|
-
separator: Separador
|
|
111
|
-
title_and_description:
|
|
112
|
-
collapse: Replegar
|
|
113
|
-
description: Descripció
|
|
114
|
-
expand: Expandir
|
|
115
|
-
remove: Esborrar
|
|
116
|
-
title: Títol
|
|
117
|
-
title_and_description: Títol i descripció
|
|
118
|
-
update:
|
|
119
|
-
invalid: S'ha produït un error en desar el formulari.
|
|
120
|
-
success: Formulari desat correctament.
|
|
121
|
-
admin_log:
|
|
122
|
-
questionnaire:
|
|
123
|
-
update: "%{user_name} ha actualitzat el qüestionari %{resource_name}"
|
|
124
|
-
errors:
|
|
125
|
-
answer:
|
|
126
|
-
body: El camp no pot estar en blanc
|
|
127
|
-
images:
|
|
128
|
-
dimensions: "%{width} x %{height} px"
|
|
129
|
-
processors:
|
|
130
|
-
resize_and_pad: Aquesta imatge serà redimensionada i ajustada a %{dimensions}.
|
|
131
|
-
resize_to_fit: Aquesta imatge serà redimensionada per ajustar-se a %{dimensions}.
|
|
132
|
-
question_types:
|
|
133
|
-
files: Arxius
|
|
134
|
-
long_answer: Resposta llarga
|
|
135
|
-
matrix_multiple: Matriu (opció multiple)
|
|
136
|
-
matrix_single: Matriu (opció única)
|
|
137
|
-
multiple_option: Opció múltiple
|
|
138
|
-
short_answer: Resposta curta
|
|
139
|
-
single_option: Opció única
|
|
140
|
-
sorting: Ordenació
|
|
141
|
-
title_and_description: Títol i descripció
|
|
142
|
-
questionnaire_answer_presenter:
|
|
143
|
-
download_attachment: Descarregar l'arxiu adjunt
|
|
144
|
-
questionnaires:
|
|
145
|
-
answer:
|
|
146
|
-
invalid: S'han produït un error en respondre el formulari.
|
|
147
|
-
max_choices_alert: Has seleccionat massa opcions
|
|
148
|
-
success: Has contestat el formulari correctament.
|
|
149
|
-
question:
|
|
150
|
-
max_choices: 'Opcions màximes: %{n}'
|
|
151
|
-
show:
|
|
152
|
-
answer_questionnaire:
|
|
153
|
-
already_have_an_account?: Ja tens un compte?
|
|
154
|
-
are_you_new?: Ets una nova usuària?
|
|
155
|
-
sign_in_description: Inicia la teva sessió per respondre l'enquesta
|
|
156
|
-
sign_up_description: Crea un compte de participant per a respondre l'enquesta
|
|
157
|
-
title: Respon el formulari
|
|
158
|
-
current_step: Pas %{step}
|
|
159
|
-
empty: No s'ha configurat cap pregunta encara en aquest formulari.
|
|
160
|
-
of_total_steps: de %{total_steps}
|
|
161
|
-
questionnaire_answered:
|
|
162
|
-
body: Ja has respost a aquest formulari.
|
|
163
|
-
title: Ja has respost
|
|
164
|
-
questionnaire_closed:
|
|
165
|
-
body: El formulari està tancat i no es pot respondre.
|
|
166
|
-
title: S'ha tancat el formulari
|
|
167
|
-
questionnaire_for_private_users:
|
|
168
|
-
body: El formulari només està disponible per a participants privades
|
|
169
|
-
title: S'ha tancat el formulari
|
|
170
|
-
questionnaire_js_disabled:
|
|
171
|
-
body: Algunes de les característiques d'aquest formulari es deshabilitaran. Per millorar la teva experiència, si us plau, habilita JavaScript al teu navegador.
|
|
172
|
-
title: JavaScript està desactivat
|
|
173
|
-
questionnaire_not_published:
|
|
174
|
-
body: Aquest formulari no s'ha publicat encara.
|
|
175
|
-
tos_agreement: En participar acceptes els Termes i condicions d'ús
|
|
176
|
-
step_navigation:
|
|
177
|
-
show:
|
|
178
|
-
are_you_sure: Aquesta acció no es pot desfer i no podràs editar les respostes. Segur que vols continuar?
|
|
179
|
-
back: Enrere
|
|
180
|
-
continue: Continuar
|
|
181
|
-
submit: Enviar respostes
|
|
182
|
-
user_answers_serializer:
|
|
183
|
-
body: Resposta
|
|
184
|
-
completion: Finalització
|
|
185
|
-
created_at: Respost el
|
|
186
|
-
id: Identificador de resposta
|
|
187
|
-
ip_hash: Hash de l'adreça IP
|
|
188
|
-
question: Pregunta
|
|
189
|
-
registered: Registrada
|
|
190
|
-
session_token: Identificador d'usuària
|
|
191
|
-
unregistered: No registrada
|
|
192
|
-
user_status: Estat de la usuària
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Decidim
|
|
4
|
-
module Exporters
|
|
5
|
-
# rubocop: disable Rails/ApplicationController
|
|
6
|
-
# A dummy controller to render views while exporting questionnaires
|
|
7
|
-
class FormPDFControllerHelper < ActionController::Base
|
|
8
|
-
# rubocop: enable Rails/ApplicationController
|
|
9
|
-
helper Decidim::TranslationsHelper
|
|
10
|
-
helper Decidim::Forms::Admin::QuestionnaireAnswersHelper
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|