decidim-forms 0.28.5 → 0.29.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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/forms/question_readonly_cell.rb +0 -2
  3. data/app/cells/decidim/forms/step_navigation/show.erb +3 -3
  4. data/app/cells/decidim/forms/step_navigation_cell.rb +2 -3
  5. data/app/commands/decidim/forms/answer_questionnaire.rb +4 -4
  6. data/app/controllers/decidim/forms/concerns/has_questionnaire.rb +1 -1
  7. data/app/forms/decidim/forms/admin/questionnaire_form.rb +2 -2
  8. data/app/forms/decidim/forms/answer_form.rb +2 -2
  9. data/app/forms/decidim/forms/questionnaire_form.rb +1 -1
  10. data/app/helpers/decidim/forms/application_helper.rb +2 -2
  11. data/app/models/decidim/forms/answer_choice.rb +0 -2
  12. data/app/models/decidim/forms/answer_option.rb +1 -1
  13. data/app/models/decidim/forms/display_condition.rb +11 -3
  14. data/app/models/decidim/forms/question_matrix_row.rb +1 -1
  15. data/app/presenters/decidim/forms/admin/questionnaire_participant_presenter.rb +7 -7
  16. data/app/views/decidim/forms/admin/questionnaires/_answer_option.html.erb +1 -1
  17. data/app/views/decidim/forms/admin/questionnaires/_display_condition.html.erb +2 -2
  18. data/app/views/decidim/forms/admin/questionnaires/_matrix_row.html.erb +1 -1
  19. data/app/views/decidim/forms/admin/questionnaires/_question.html.erb +4 -4
  20. data/app/views/decidim/forms/admin/questionnaires/_separator.html.erb +4 -4
  21. data/app/views/decidim/forms/admin/questionnaires/_title_and_description.html.erb +4 -4
  22. data/app/views/decidim/forms/questionnaires/_answer.html.erb +1 -11
  23. data/config/initializers/wicked_pdf.rb +6 -4
  24. data/config/locales/ar.yml +2 -4
  25. data/config/locales/bg.yml +6 -2
  26. data/config/locales/ca.yml +4 -4
  27. data/config/locales/cs.yml +0 -1
  28. data/config/locales/de.yml +5 -5
  29. data/config/locales/el.yml +5 -2
  30. data/config/locales/en.yml +2 -2
  31. data/config/locales/es-MX.yml +5 -5
  32. data/config/locales/es-PY.yml +5 -5
  33. data/config/locales/es.yml +5 -5
  34. data/config/locales/eu.yml +8 -8
  35. data/config/locales/fi-plain.yml +4 -4
  36. data/config/locales/fi.yml +5 -5
  37. data/config/locales/fr-CA.yml +3 -3
  38. data/config/locales/fr.yml +3 -3
  39. data/config/locales/gl.yml +3 -1
  40. data/config/locales/hu.yml +6 -4
  41. data/config/locales/id-ID.yml +2 -1
  42. data/config/locales/it.yml +4 -1
  43. data/config/locales/ja.yml +6 -1
  44. data/config/locales/lb.yml +4 -1
  45. data/config/locales/lt.yml +5 -2
  46. data/config/locales/lv.yml +3 -1
  47. data/config/locales/nl.yml +5 -1
  48. data/config/locales/no.yml +5 -1
  49. data/config/locales/pl.yml +6 -1
  50. data/config/locales/pt-BR.yml +5 -1
  51. data/config/locales/pt.yml +4 -1
  52. data/config/locales/ro-RO.yml +5 -3
  53. data/config/locales/sk.yml +2 -1
  54. data/config/locales/sv.yml +31 -44
  55. data/config/locales/tr-TR.yml +4 -1
  56. data/config/locales/val-ES.yml +2 -0
  57. data/config/locales/zh-CN.yml +4 -1
  58. data/config/locales/zh-TW.yml +5 -2
  59. data/db/migrate/20240402092039_add_answer_options_counter_cache_to_questions.rb +16 -0
  60. data/db/migrate/20240402095253_add_matrix_row_counter_cache_to_questions.rb +16 -0
  61. data/db/migrate/20240416111953_add_display_conditions_counter_cache_to_questions.rb +16 -0
  62. data/db/migrate/20240416113926_add_display_conditions_for_other_questions_counter_cache_to_questions.rb +16 -0
  63. data/decidim-forms.gemspec +3 -2
  64. data/lib/decidim/forms/test/shared_examples/has_questionnaire.rb +44 -70
  65. data/lib/decidim/forms/test/shared_examples/manage_questionnaire_answers.rb +12 -12
  66. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_display_conditions.rb +10 -10
  67. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_questions.rb +85 -85
  68. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_display_conditions.rb +8 -8
  69. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_questions.rb +82 -82
  70. data/lib/decidim/forms/test/shared_examples/manage_questionnaires.rb +9 -9
  71. data/lib/decidim/forms/user_answers_serializer.rb +1 -1
  72. data/lib/decidim/forms/version.rb +1 -1
  73. metadata +31 -15
  74. data/config/locales/bn-BD.yml +0 -1
  75. data/config/locales/bs-BA.yml +0 -1
@@ -22,7 +22,6 @@ pt-BR:
22
22
  too_long: é longo demais
23
23
  choices:
24
24
  missing: não estão completos
25
- too_many: são muitos
26
25
  decidim:
27
26
  forms:
28
27
  admin:
@@ -77,10 +76,14 @@ pt-BR:
77
76
  title: Editar questionário
78
77
  form:
79
78
  add_question: Adicionar pergunta
79
+ add_separator: Adicionar separador
80
+ add_title_and_description: Adicionar título e descrição
81
+ already_answered_warning: O questionário já foi respondido por alguns usuários então você não pode modificar suas perguntas.
80
82
  collapse: Recolher todas as questões
81
83
  expand: Expandir todas as questões
82
84
  preview: Pré-visualização
83
85
  title: Editar formulário para %{questionnaire_for}
86
+ unpublished_warning: O formulário não foi publicado. Você pode modificar suas perguntas, mas apagará as respostas atuais.
84
87
  matrix_row:
85
88
  matrix_row: Linha
86
89
  remove: Remover
@@ -165,6 +168,7 @@ pt-BR:
165
168
  tos_agreement: Ao participar você aceita seus Termos de Serviço
166
169
  step_navigation:
167
170
  show:
171
+ are_you_sure: Esta ação não pode ser desfeita e você não poderá editar suas respostas. Você tem certeza?
168
172
  back: Voltar
169
173
  continue: Continuar
170
174
  submit: Enviar
@@ -22,7 +22,6 @@ pt:
22
22
  too_long: é demasiado longo
23
23
  choices:
24
24
  missing: não estão completos
25
- too_many: são demasiados
26
25
  decidim:
27
26
  forms:
28
27
  admin:
@@ -77,10 +76,13 @@ pt:
77
76
  title: Editar questionário
78
77
  form:
79
78
  add_question: Adicionar questão
79
+ add_separator: Adicionar separador
80
+ already_answered_warning: O questionário já foi respondido por alguns utilizadores por isso não pode modificar as suas questões.
80
81
  collapse: Colapsar todas as questões
81
82
  expand: Expandir todas as questões
82
83
  preview: Pré-visualizar
83
84
  title: Editar formulário para %{questionnaire_for}
85
+ unpublished_warning: O formulário não está publicado. Pode modificar as suas questões, mas essa ação eliminará as respostas atuais.
84
86
  matrix_row:
85
87
  matrix_row: Linha
86
88
  remove: Remover
@@ -147,6 +149,7 @@ pt:
147
149
  tos_agreement: Ao participar aceita os seus Termos de Serviço
148
150
  step_navigation:
149
151
  show:
152
+ are_you_sure: Esta ação não pode ser desfeita e não deixará de poder editar as suas respostas. Tem a certeza?
150
153
  back: Retroceder
151
154
  continue: Continuar
152
155
  submit: Submeter
@@ -22,7 +22,6 @@ ro:
22
22
  too_long: este prea lung
23
23
  choices:
24
24
  missing: nu sunt completate
25
- too_many: sunt prea multe
26
25
  questionnaire:
27
26
  request_invalid: A apărut o eroare la procesarea cererii. Te rugăm să încerci din nou.
28
27
  decidim:
@@ -81,10 +80,14 @@ ro:
81
80
  title: Editare chestionar
82
81
  form:
83
82
  add_question: Adaugă întrebare
83
+ add_separator: Adaugă separator
84
+ add_title_and_description: Adaugați titlu și descriere
85
+ already_answered_warning: Au fost înregistrare deja câteva răspunsuri de la utilizatori pentru acest chestionar. De aceea, nu mai puteți modifica întrebările.
84
86
  collapse: Restrânge toate întrebările
85
87
  expand: Extinde toate întrebările
86
88
  preview: Previzualizează
87
89
  title: Actualizați chestionarul pentru %{questionnaire_for}
90
+ unpublished_warning: Chestionarul nu este publicat. Poți modifica întrebările, dar această acțiune va duce la stergerea automată a răspunsurilor curente.
88
91
  matrix_row:
89
92
  matrix_row: Rând
90
93
  remove: Elimină
@@ -154,7 +157,6 @@ ro:
154
157
  answer_questionnaire:
155
158
  already_have_an_account?: Ai deja un cont?
156
159
  are_you_new?: Utilizator nou?
157
- sign_in_description: Autentifică-te pentru a participa la sondaj
158
160
  sign_up_description: Creați un cont de participant pentru a participa la sondaj
159
161
  title: Completează chestionarul
160
162
  current_step: Pasul %{step}
@@ -177,7 +179,7 @@ ro:
177
179
  tos_agreement: Prin participare accepți Termenii și condițiile sale de utilizare
178
180
  step_navigation:
179
181
  show:
180
- are_you_sure: Această acțiune nu poate fi anulată și nu veți putea să modificați răspunsurile. Sunteți sigur?
182
+ are_you_sure: Această acțiune nu poate fi anulată și nu vei putea să îți editezi răspunsurile. Sigur dorești asta?
181
183
  back: Înapoi
182
184
  continue: Continuă
183
185
  submit: Trimite
@@ -15,7 +15,6 @@ sk:
15
15
  attributes:
16
16
  choices:
17
17
  missing: nie je kompletné
18
- too_many: je príliš veľa
19
18
  decidim:
20
19
  forms:
21
20
  admin:
@@ -33,6 +32,7 @@ sk:
33
32
  save: Uložiť
34
33
  form:
35
34
  add_question: Pridať otázku
35
+ already_answered_warning: Na formulár už niekto odpovedal, takže nemôžete meniť jeho otázky.
36
36
  matrix_row:
37
37
  remove: Odstrániť
38
38
  statement: Prehlásenie
@@ -74,6 +74,7 @@ sk:
74
74
  tos_agreement: Účasťou súhlasíte s našimi Podmienkami použitia
75
75
  step_navigation:
76
76
  show:
77
+ are_you_sure: Táto akcia sa nedá vrátiť späť, a nebudete môcť upraviť svoje odpovede. Ste si istí?
77
78
  submit: Poslať
78
79
  user_answers_serializer:
79
80
  created_at: Odpovedané na
@@ -4,14 +4,14 @@ sv:
4
4
  attributes:
5
5
  answer:
6
6
  body: Svar
7
- choices: Alternativ
8
- selected_choices: Valda alternativ
7
+ choices: Val
8
+ selected_choices: Utvalda val
9
9
  question:
10
- max_choices: Högst antal alternativ
10
+ max_choices: Högst antal val
11
11
  question_type: Typ
12
12
  questionnaire_question:
13
- mandatory: Obligatoriskt
14
- max_characters: Teckengräns (skriv 0 för obegränsad)
13
+ mandatory: Obligatorisk
14
+ max_characters: Teckengräns (lämna till 0 om ingen gräns)
15
15
  errors:
16
16
  models:
17
17
  answer:
@@ -22,9 +22,6 @@ sv:
22
22
  too_long: är för långt
23
23
  choices:
24
24
  missing: är inte fullständiga
25
- too_many: är för många
26
- questionnaire:
27
- request_invalid: Det gick inte att hantera begäran. Försök igen.
28
25
  decidim:
29
26
  forms:
30
27
  admin:
@@ -53,7 +50,7 @@ sv:
53
50
  answer:
54
51
  title: 'Svar #%{number}'
55
52
  export_response:
56
- title: survey_user_answers_%{token}
53
+ title: Undersökning_användare_svar_%{token}
57
54
  index:
58
55
  title: "%{total} svar totalt"
59
56
  show:
@@ -61,30 +58,34 @@ sv:
61
58
  display_condition:
62
59
  answer_option: Svarsalternativ
63
60
  condition_question: Fråga
64
- condition_type: Villkor
61
+ condition_type: Skick
65
62
  condition_types:
66
63
  answered: Besvarad
67
- equal: Lika med
68
- match: Innehåller text
64
+ equal: Lika
65
+ match: Inkluderar text
69
66
  not_answered: Ej besvarad
70
- not_equal: Ej lika med
71
- condition_value: Innehåller text
67
+ not_equal: Inte lika
68
+ condition_value: Inkluderad text
72
69
  display_condition: Visa villkor
73
- mandatory: Detta villkor måste alltid uppfyllas, oavsett status för andra villkor
70
+ mandatory: Detta villkor måste uppfyllas alltid oavsett status för andra villkor
74
71
  remove: Radera
75
72
  save_warning: Kom ihåg att spara formuläret innan du konfigurerar visningsvillkor
76
73
  select_answer_option: Välj svarsalternativ
77
74
  select_condition_question: Välj en fråga
78
- select_condition_type: Välj en typ av villkor
75
+ select_condition_type: Välj en villkorstyp
79
76
  edit:
80
77
  save: Spara
81
- title: Redigera enkät
78
+ title: Redigera frågeformulär
82
79
  form:
83
80
  add_question: Lägg till fråga
84
- collapse: Dölj alla frågor
85
- expand: Visa alla frågor
81
+ add_separator: Lägg till separator
82
+ add_title_and_description: Lägg till titel och beskrivning
83
+ already_answered_warning: Frågeformuläret har redan besvarats av vissa användare så du inte kan ändra dess frågor.
84
+ collapse: Komprimera alla frågor
85
+ expand: Expandera alla frågor
86
86
  preview: Förhandsgranska
87
87
  title: Redigera formulär för %{questionnaire_for}
88
+ unpublished_warning: Formuläret är inte publicerat. Du kan ändra dess frågor, men det kommer att ta bort aktuella svar.
88
89
  matrix_row:
89
90
  matrix_row: Rad
90
91
  remove: Ta bort
@@ -95,10 +96,10 @@ sv:
95
96
  add_display_condition_info: Spara formuläret för att konfigurera visningsvillkor
96
97
  add_matrix_row: Lägg till rad
97
98
  any: Någon
98
- collapse: Dölj
99
+ collapse: Komprimera
99
100
  description: Beskrivning
100
101
  down: Ned
101
- expand: Visa
102
+ expand: Expandera
102
103
  question: Fråga
103
104
  remove: Ta bort
104
105
  statement: Påstående
@@ -109,56 +110,41 @@ sv:
109
110
  separator: Avgränsare
110
111
  up: Upp
111
112
  title_and_description:
112
- collapse: Dölj
113
+ collapse: Kollapsa
113
114
  description: Beskrivning
114
115
  down: Ner
115
- expand: Visa
116
- remove: Radera
116
+ expand: Expandera
117
+ remove: Ta bort
117
118
  title: Titel
118
119
  title_and_description: Titel och beskrivning
119
120
  up: Upp
120
121
  update:
121
122
  invalid: Det gick inte att spara formuläret.
122
123
  success: Formuläret har sparats.
123
- admin_log:
124
- questionnaire:
125
- update: "%{user_name} uppdaterade enkäten %{resource_name}"
126
- errors:
127
- answer:
128
- body: Innehåll kan inte vara tomt
129
124
  images:
130
125
  dimensions: "%{width} x %{height} px"
131
- processors:
132
- resize_and_pad: Bilden skalas om till %{dimensions}.
133
- resize_to_fit: Bilden skalas om till %{dimensions}.
134
126
  question_types:
135
127
  files: Filer
136
128
  long_answer: Långt svar
137
129
  matrix_multiple: Matris (flera alternativ)
138
- matrix_single: Matris (ett alternativ)
130
+ matrix_single: Matris (Single alternativ)
139
131
  multiple_option: Flera alternativ
140
132
  short_answer: Kort svar
141
133
  single_option: Ett alternativ
142
134
  sorting: Sortering
143
135
  title_and_description: Titel och beskrivning
144
- questionnaire_answer_presenter:
145
- download_attachment: Ladda ner bilaga
146
136
  questionnaires:
147
137
  answer:
148
138
  invalid: Det gick inte att besvara formuläret.
149
- max_choices_alert: För många alternativ har valts
139
+ max_choices_alert: Det finns för många val valda
150
140
  success: Formuläret har besvarats.
151
141
  question:
152
142
  max_choices: 'Högst antal val: %{n}'
153
143
  show:
154
144
  answer_questionnaire:
155
- already_have_an_account?: Har du redan ett konto?
156
145
  are_you_new?: Ny användare?
157
- sign_in_description: Logga in för att fylla i enkäten
158
- sign_up_description: Skapa ett konto för att göra enkäten
159
146
  title: Besvara formuläret
160
147
  current_step: Steg %{step}
161
- empty: Formuläret har inga frågor än.
162
148
  of_total_steps: av %{total_steps}
163
149
  questionnaire_answered:
164
150
  body: Du har redan besvarat det här formuläret.
@@ -170,19 +156,20 @@ sv:
170
156
  body: Formuläret är endast tillgängligt för privata användare
171
157
  title: Formuläret är stängt
172
158
  questionnaire_js_disabled:
173
- body: Vissa av formulärets funktioner kommer att inaktiveras. Aktivera JavaScript i webbläsaren för att förbättra upplevelsen.
159
+ body: Vissa av formulärens funktioner kommer att inaktiveras. För att förbättra din upplevelse, vänligen aktivera JavaScript i din webbläsare.
174
160
  title: JavaScript är inaktiverat
175
161
  questionnaire_not_published:
176
- body: Formulär är ännu inte publicerat.
162
+ body: Detta formulär är ännu inte publicerat.
177
163
  tos_agreement: Genom att delta godkänner du användarvillkoren
178
164
  step_navigation:
179
165
  show:
166
+ are_you_sure: Den här åtgärden kan inte ångras och du kommer inte att kunna redigera dina svar. Är du säker?
180
167
  back: Tillbaka
181
168
  continue: Fortsätt
182
169
  submit: Skicka in
183
170
  user_answers_serializer:
184
171
  body: Svar
185
- completion: Slutfört
172
+ completion: Slutförande
186
173
  created_at: Besvarad
187
174
  id: Svars-ID
188
175
  ip_hash: IP Hash
@@ -17,7 +17,6 @@ tr:
17
17
  attributes:
18
18
  choices:
19
19
  missing: tamamlanmadı
20
- too_many: çok fazla
21
20
  decidim:
22
21
  forms:
23
22
  admin:
@@ -72,10 +71,13 @@ tr:
72
71
  title: Anketi düzenleyin
73
72
  form:
74
73
  add_question: Soru ekle
74
+ add_separator: Ayırıcı ekle
75
+ already_answered_warning: Form, bazı kullanıcılar tarafından zaten yanıtlandı, bu nedenle sorularını değiştiremezsiniz.
75
76
  collapse: Tüm soruları daraltın
76
77
  expand: Tüm soruları genişletin
77
78
  preview: Önizleme
78
79
  title: '%{questionnaire_for} için formu düzenleyin'
80
+ unpublished_warning: Form yayınlanmadı. Sorularını değiştirebilirsiniz, ancak bunu yapmak mevcut cevapları silecektir.
79
81
  matrix_row:
80
82
  matrix_row: Satır
81
83
  remove: Kaldır
@@ -142,6 +144,7 @@ tr:
142
144
  tos_agreement: Katılarak Hizmet Şartlarını kabul etmiş olursunuz.
143
145
  step_navigation:
144
146
  show:
147
+ are_you_sure: Bu işlem geri alınamaz ve cevaplarınızı düzenleyemezsiniz. Emin misiniz?
145
148
  back: Geri
146
149
  continue: Devam et
147
150
  submit: Gönder
@@ -4,6 +4,8 @@ val:
4
4
  forms:
5
5
  admin:
6
6
  questionnaires:
7
+ form:
8
+ add_title_and_description: Afig títol i descripció
7
9
  title_and_description:
8
10
  collapse: Redueix
9
11
  description: Descripció
@@ -17,7 +17,6 @@ zh-CN:
17
17
  attributes:
18
18
  choices:
19
19
  missing: 不完成
20
- too_many: 太多了
21
20
  decidim:
22
21
  forms:
23
22
  admin:
@@ -72,9 +71,12 @@ zh-CN:
72
71
  title: 编辑问题单
73
72
  form:
74
73
  add_question: 添加问题
74
+ add_separator: 添加分隔符
75
+ already_answered_warning: 某些用户已经回答了表单,因此您不能修改其问题。
75
76
  collapse: 收起所有问题
76
77
  expand: 展开所有问题
77
78
  preview: 预览
79
+ unpublished_warning: 表单未发布。您可以修改它的问题,但这样做将删除当前答案。
78
80
  matrix_row:
79
81
  matrix_row: 行
80
82
  remove: 删除
@@ -140,6 +142,7 @@ zh-CN:
140
142
  tos_agreement: 通过参与您接受其服务条款
141
143
  step_navigation:
142
144
  show:
145
+ are_you_sure: 此操作不能撤消,您将无法编辑您的答案。您确定吗?
143
146
  back: 后退
144
147
  continue: 继续
145
148
  submit: 提交
@@ -22,7 +22,6 @@ zh-TW:
22
22
  too_long: 太長
23
23
  choices:
24
24
  missing: 尚未完成
25
- too_many: 太多了
26
25
  questionnaire:
27
26
  request_invalid: 處理請求時發生錯誤。請再試一次。
28
27
  decidim:
@@ -81,10 +80,14 @@ zh-TW:
81
80
  title: 編輯問卷內容
82
81
  form:
83
82
  add_question: 新增問題
83
+ add_separator: 新增分隔線
84
+ add_title_and_description: 新增標題與描述
85
+ already_answered_warning: 已有使用者回答此表單,因此您無法修改問題。
84
86
  collapse: 收起所有問題
85
87
  expand: 展開所有問題
86
88
  preview: 預覽
87
89
  title: 編輯問卷表單%{questionnaire_for}
90
+ unpublished_warning: 此表單尚未發佈。您可以修改其問題,但這樣做將刪除目前的回答。
88
91
  matrix_row:
89
92
  matrix_row: 列
90
93
  remove: 移除
@@ -154,7 +157,6 @@ zh-TW:
154
157
  answer_questionnaire:
155
158
  already_have_an_account?: 已經有帳號了嗎?
156
159
  are_you_new?: 新用戶?
157
- sign_in_description: 登入以填寫問卷
158
160
  sign_up_description: 建立參與者帳號以填寫問卷
159
161
  title: 回答表單
160
162
  current_step: 步驟%{step}
@@ -176,6 +178,7 @@ zh-TW:
176
178
  tos_agreement: 透過參與,您同意其服務條款
177
179
  step_navigation:
178
180
  show:
181
+ are_you_sure: 此操作無法撤消,您將無法編輯您的答案。您確定嗎?
179
182
  back: 返回
180
183
  continue: 繼續
181
184
  submit: 提交
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddAnswerOptionsCounterCacheToQuestions < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column :decidim_forms_questions, :answer_options_count, :integer, null: false, default: 0
6
+
7
+ reversible do |dir|
8
+ dir.up do
9
+ Decidim::Forms::Question.reset_column_information
10
+ Decidim::Forms::Question.find_each do |record|
11
+ record.class.reset_counters(record.id, :answer_options)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddMatrixRowCounterCacheToQuestions < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column :decidim_forms_questions, :matrix_rows_count, :integer, null: false, default: 0
6
+
7
+ reversible do |dir|
8
+ dir.up do
9
+ Decidim::Forms::Question.reset_column_information
10
+ Decidim::Forms::Question.find_each do |record|
11
+ record.class.reset_counters(record.id, :matrix_rows)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddDisplayConditionsCounterCacheToQuestions < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column :decidim_forms_questions, :display_conditions_count, :integer, null: false, default: 0
6
+
7
+ reversible do |dir|
8
+ dir.up do
9
+ Decidim::Forms::Question.reset_column_information
10
+ Decidim::Forms::Question.find_each do |record|
11
+ record.class.reset_counters(record.id, :display_conditions)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddDisplayConditionsForOtherQuestionsCounterCacheToQuestions < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column :decidim_forms_questions, :display_conditions_for_other_questions_count, :integer, null: false, default: 0
6
+
7
+ reversible do |dir|
8
+ dir.up do
9
+ Decidim::Forms::Question.reset_column_information
10
+ Decidim::Forms::Question.find_each do |record|
11
+ record.class.reset_counters(record.id, :display_conditions_for_other_questions)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.version = Decidim::Forms.version
11
11
  s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva", "Rubén González Valero"]
12
12
  s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com", "rbngzlv@gmail.com"]
13
- s.license = "AGPL-3.0-or-later"
13
+ s.license = "AGPL-3.0"
14
14
  s.homepage = "https://decidim.org"
15
15
  s.metadata = {
16
16
  "bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  "homepage_uri" => "https://decidim.org",
20
20
  "source_code_uri" => "https://github.com/decidim/decidim"
21
21
  }
22
- s.required_ruby_version = "~> 3.1.0"
22
+ s.required_ruby_version = "~> 3.2.0"
23
23
 
24
24
  s.name = "decidim-forms"
25
25
  s.summary = "Decidim forms"
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
34
34
 
35
35
  s.add_dependency "decidim-core", Decidim::Forms.version
36
36
  s.add_dependency "wicked_pdf", "~> 2.1"
37
+ s.add_dependency "wkhtmltopdf-binary", "~> 0.12"
37
38
 
38
39
  s.add_development_dependency "decidim-admin", Decidim::Forms.version
39
40
  s.add_development_dependency "decidim-dev", Decidim::Forms.version