decidim-initiatives 0.29.2 → 0.30.0.rc2

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 (112) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form/show.erb +1 -1
  3. data/app/commands/decidim/initiatives/create_initiative.rb +16 -4
  4. data/app/commands/decidim/initiatives/update_initiative.rb +23 -9
  5. data/app/controllers/concerns/decidim/initiatives/needs_initiative.rb +1 -1
  6. data/app/controllers/decidim/initiatives/admin/application_controller.rb +2 -0
  7. data/app/controllers/decidim/initiatives/admin/component_share_tokens_controller.rb +18 -0
  8. data/app/controllers/decidim/initiatives/admin/initiative_share_tokens_controller.rb +18 -0
  9. data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +8 -8
  10. data/app/controllers/decidim/initiatives/create_initiative_controller.rb +3 -2
  11. data/app/controllers/decidim/initiatives/initiative_types_controller.rb +1 -1
  12. data/app/controllers/decidim/initiatives/initiatives_controller.rb +3 -0
  13. data/app/forms/decidim/initiatives/admin/initiative_answer_form.rb +1 -1
  14. data/app/forms/decidim/initiatives/vote_form.rb +1 -1
  15. data/app/helpers/decidim/initiatives/initiative_helper.rb +1 -39
  16. data/app/helpers/decidim/initiatives/initiatives_helper.rb +8 -5
  17. data/app/helpers/decidim/initiatives/scopes_helper.rb +43 -0
  18. data/app/jobs/decidim/initiatives/export_initiatives_job.rb +5 -1
  19. data/app/models/decidim/initiative.rb +40 -27
  20. data/app/models/decidim/initiatives_type_scope.rb +9 -0
  21. data/app/permissions/decidim/initiatives/admin/permissions.rb +7 -0
  22. data/app/permissions/decidim/initiatives/permissions.rb +10 -3
  23. data/app/queries/decidim/initiatives/outdated_validating_initiatives.rb +1 -1
  24. data/app/queries/decidim/initiatives/support_period_finished_initiatives.rb +2 -2
  25. data/app/serializers/decidim/initiatives/download_your_data_initiative_serializer.rb +15 -0
  26. data/app/serializers/decidim/initiatives/initiative_serializer.rb +5 -24
  27. data/app/serializers/decidim/initiatives/open_data_initiative_serializer.rb +54 -0
  28. data/app/services/decidim/initiatives/data_encryptor.rb +1 -1
  29. data/app/services/decidim/initiatives/pdf_signature_example.rb +0 -2
  30. data/app/views/decidim/initiatives/admin/initiatives/edit.html.erb +1 -2
  31. data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +7 -0
  32. data/app/views/decidim/initiatives/committee_requests/new.html.erb +1 -2
  33. data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +3 -3
  34. data/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +10 -2
  35. data/app/views/decidim/initiatives/initiatives/_form.html.erb +3 -3
  36. data/app/views/decidim/initiatives/initiatives/_new_initiative_button.html.erb +16 -13
  37. data/app/views/decidim/initiatives/initiatives/_vote_button.html.erb +9 -3
  38. data/app/views/decidim/initiatives/initiatives/_vote_cabin.html.erb +0 -1
  39. data/app/views/decidim/initiatives/initiatives/show.html.erb +7 -8
  40. data/app/views/layouts/decidim/admin/_manage_initiatives.html.erb +11 -0
  41. data/app/views/layouts/decidim/admin/initiatives.html.erb +1 -9
  42. data/config/assets.rb +1 -3
  43. data/config/locales/ar.yml +7 -8
  44. data/config/locales/bg.yml +2 -22
  45. data/config/locales/ca.yml +55 -21
  46. data/config/locales/cs.yml +55 -21
  47. data/config/locales/de.yml +55 -21
  48. data/config/locales/el.yml +2 -9
  49. data/config/locales/en.yml +53 -19
  50. data/config/locales/es-MX.yml +55 -21
  51. data/config/locales/es-PY.yml +55 -21
  52. data/config/locales/es.yml +55 -21
  53. data/config/locales/eu.yml +55 -21
  54. data/config/locales/fi-plain.yml +55 -21
  55. data/config/locales/fi.yml +55 -21
  56. data/config/locales/fr-CA.yml +9 -22
  57. data/config/locales/fr.yml +9 -22
  58. data/config/locales/ga-IE.yml +0 -3
  59. data/config/locales/gl.yml +2 -10
  60. data/config/locales/hu.yml +2 -20
  61. data/config/locales/id-ID.yml +2 -8
  62. data/config/locales/is-IS.yml +0 -9
  63. data/config/locales/it.yml +2 -11
  64. data/config/locales/ja.yml +55 -21
  65. data/config/locales/lb.yml +2 -7
  66. data/config/locales/lt.yml +2 -22
  67. data/config/locales/lv.yml +2 -9
  68. data/config/locales/nl.yml +2 -11
  69. data/config/locales/no.yml +2 -13
  70. data/config/locales/pl.yml +2 -21
  71. data/config/locales/pt-BR.yml +2 -27
  72. data/config/locales/pt.yml +2 -11
  73. data/config/locales/ro-RO.yml +2 -19
  74. data/config/locales/ru.yml +0 -9
  75. data/config/locales/sk.yml +2 -8
  76. data/config/locales/sl.yml +0 -1
  77. data/config/locales/sv.yml +13 -21
  78. data/config/locales/tr-TR.yml +2 -11
  79. data/config/locales/uk.yml +0 -9
  80. data/config/locales/zh-CN.yml +2 -10
  81. data/config/locales/zh-TW.yml +2 -21
  82. data/db/migrate/20241127104718_add_taxonomy_to_initiatives_type_scope.rb +7 -0
  83. data/decidim-initiatives.gemspec +1 -3
  84. data/lib/decidim/api/initiative_api_type.rb +9 -10
  85. data/lib/decidim/api/initiative_committee_member_type.rb +3 -4
  86. data/lib/decidim/api/initiative_type.rb +15 -21
  87. data/lib/decidim/api/initiative_type_interface.rb +1 -5
  88. data/lib/decidim/exporters/initiative_votes_pdf.rb +163 -0
  89. data/lib/decidim/initiatives/admin_engine.rb +68 -49
  90. data/lib/decidim/initiatives/application_form_pdf.rb +181 -0
  91. data/lib/decidim/initiatives/engine.rb +6 -0
  92. data/lib/decidim/initiatives/menu.rb +8 -0
  93. data/lib/decidim/initiatives/participatory_space.rb +8 -1
  94. data/lib/decidim/initiatives/test/factories.rb +5 -8
  95. data/lib/decidim/initiatives/version.rb +1 -1
  96. data/lib/decidim/initiatives.rb +7 -1
  97. metadata +25 -59
  98. data/app/cells/decidim/initiatives_votes/vote/show.erb +0 -39
  99. data/app/cells/decidim/initiatives_votes/vote_cell.rb +0 -58
  100. data/app/packs/entrypoints/decidim_initiatives_initiatives_votes.js +0 -1
  101. data/app/packs/entrypoints/decidim_initiatives_initiatives_votes.scss +0 -1
  102. data/app/packs/entrypoints/decidim_initiatives_print.js +0 -1
  103. data/app/packs/entrypoints/decidim_initiatives_print.scss +0 -1
  104. data/app/packs/stylesheets/decidim/initiatives/initiatives-votes.scss +0 -96
  105. data/app/packs/stylesheets/decidim/initiatives/print-initiative.scss +0 -172
  106. data/app/views/decidim/initiatives/admin/initiatives/_signatures.html.erb +0 -87
  107. data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.html.erb +0 -8
  108. data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.pdf.erb +0 -5
  109. data/app/views/decidim/initiatives/initiatives/_linked_initiatives.html.erb +0 -0
  110. data/app/views/decidim/initiatives/initiatives/print.html.erb +0 -161
  111. data/app/views/layouts/decidim/admin/initiatives_votes.pdf.erb +0 -11
  112. data/config/initializers/wicked_pdf.rb +0 -22
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-initiatives
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.2
4
+ version: 0.30.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Salvador Perez Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-12 00:00:00.000000000 Z
11
+ date: 2025-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -16,112 +16,84 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.29.2
19
+ version: 0.30.0.rc2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.29.2
26
+ version: 0.30.0.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-comments
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.29.2
33
+ version: 0.30.0.rc2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.29.2
40
+ version: 0.30.0.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: decidim-core
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.29.2
47
+ version: 0.30.0.rc2
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.29.2
54
+ version: 0.30.0.rc2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: decidim-verifications
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.29.2
61
+ version: 0.30.0.rc2
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.29.2
69
- - !ruby/object:Gem::Dependency
70
- name: hexapdf
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 0.32.0
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 0.32.0
83
- - !ruby/object:Gem::Dependency
84
- name: wicked_pdf
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '2.1'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '2.1'
68
+ version: 0.30.0.rc2
97
69
  - !ruby/object:Gem::Dependency
98
70
  name: decidim-dev
99
71
  requirement: !ruby/object:Gem::Requirement
100
72
  requirements:
101
73
  - - '='
102
74
  - !ruby/object:Gem::Version
103
- version: 0.29.2
75
+ version: 0.30.0.rc2
104
76
  type: :development
105
77
  prerelease: false
106
78
  version_requirements: !ruby/object:Gem::Requirement
107
79
  requirements:
108
80
  - - '='
109
81
  - !ruby/object:Gem::Version
110
- version: 0.29.2
82
+ version: 0.30.0.rc2
111
83
  - !ruby/object:Gem::Dependency
112
84
  name: decidim-meetings
113
85
  requirement: !ruby/object:Gem::Requirement
114
86
  requirements:
115
87
  - - '='
116
88
  - !ruby/object:Gem::Version
117
- version: 0.29.2
89
+ version: 0.30.0.rc2
118
90
  type: :development
119
91
  prerelease: false
120
92
  version_requirements: !ruby/object:Gem::Requirement
121
93
  requirements:
122
94
  - - '='
123
95
  - !ruby/object:Gem::Version
124
- version: 0.29.2
96
+ version: 0.30.0.rc2
125
97
  description: Participants initiatives plugin for decidim.
126
98
  email:
127
99
  - jsperezg@gmail.com
@@ -140,8 +112,6 @@ files:
140
112
  - app/cells/decidim/initiatives/initiative_g_cell.rb
141
113
  - app/cells/decidim/initiatives/initiative_metadata_g_cell.rb
142
114
  - app/cells/decidim/initiatives/initiative_s_cell.rb
143
- - app/cells/decidim/initiatives_votes/vote/show.erb
144
- - app/cells/decidim/initiatives_votes/vote_cell.rb
145
115
  - app/commands/decidim/initiatives/admin/accept_initiative.rb
146
116
  - app/commands/decidim/initiatives/admin/create_initiative_type.rb
147
117
  - app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb
@@ -178,9 +148,11 @@ files:
178
148
  - app/controllers/decidim/initiatives/admin/application_controller.rb
179
149
  - app/controllers/decidim/initiatives/admin/committee_requests_controller.rb
180
150
  - app/controllers/decidim/initiatives/admin/component_permissions_controller.rb
151
+ - app/controllers/decidim/initiatives/admin/component_share_tokens_controller.rb
181
152
  - app/controllers/decidim/initiatives/admin/components_controller.rb
182
153
  - app/controllers/decidim/initiatives/admin/exports_controller.rb
183
154
  - app/controllers/decidim/initiatives/admin/initiative_attachments_controller.rb
155
+ - app/controllers/decidim/initiatives/admin/initiative_share_tokens_controller.rb
184
156
  - app/controllers/decidim/initiatives/admin/initiatives_controller.rb
185
157
  - app/controllers/decidim/initiatives/admin/initiatives_permissions_controller.rb
186
158
  - app/controllers/decidim/initiatives/admin/initiatives_settings_controller.rb
@@ -224,6 +196,7 @@ files:
224
196
  - app/helpers/decidim/initiatives/application_helper.rb
225
197
  - app/helpers/decidim/initiatives/initiative_helper.rb
226
198
  - app/helpers/decidim/initiatives/initiatives_helper.rb
199
+ - app/helpers/decidim/initiatives/scopes_helper.rb
227
200
  - app/helpers/decidim/initiatives/signature_type_options_helper.rb
228
201
  - app/jobs/decidim/initiatives/export_initiatives_job.rb
229
202
  - app/mailers/decidim/initiatives/initiatives_mailer.rb
@@ -237,10 +210,6 @@ files:
237
210
  - app/packs/entrypoints/decidim_initiatives.js
238
211
  - app/packs/entrypoints/decidim_initiatives_admin.js
239
212
  - app/packs/entrypoints/decidim_initiatives_admin.scss
240
- - app/packs/entrypoints/decidim_initiatives_initiatives_votes.js
241
- - app/packs/entrypoints/decidim_initiatives_initiatives_votes.scss
242
- - app/packs/entrypoints/decidim_initiatives_print.js
243
- - app/packs/entrypoints/decidim_initiatives_print.scss
244
213
  - app/packs/images/decidim/gamification/badges/decidim_gamification_badges_initiatives.svg
245
214
  - app/packs/images/decidim/initiatives/decidim_initiatives.svg
246
215
  - app/packs/src/decidim/initiatives/admin/initiatives_types.js
@@ -249,8 +218,6 @@ files:
249
218
  - app/packs/src/decidim/initiatives/identity_selector_dialog.js
250
219
  - app/packs/src/decidim/initiatives/scoped_type.js
251
220
  - app/packs/stylesheets/decidim/initiatives/admin/initiatives.scss
252
- - app/packs/stylesheets/decidim/initiatives/initiatives-votes.scss
253
- - app/packs/stylesheets/decidim/initiatives/print-initiative.scss
254
221
  - app/packs/stylesheets/initiatives.scss
255
222
  - app/permissions/decidim/initiatives/admin/permissions.rb
256
223
  - app/permissions/decidim/initiatives/permissions.rb
@@ -269,7 +236,9 @@ files:
269
236
  - app/queries/decidim/initiatives/outdated_validating_initiatives.rb
270
237
  - app/queries/decidim/initiatives/support_period_finished_initiatives.rb
271
238
  - app/queries/decidim/initiatives/user_authorizations.rb
239
+ - app/serializers/decidim/initiatives/download_your_data_initiative_serializer.rb
272
240
  - app/serializers/decidim/initiatives/initiative_serializer.rb
241
+ - app/serializers/decidim/initiatives/open_data_initiative_serializer.rb
273
242
  - app/services/decidim/initiatives/data_encryptor.rb
274
243
  - app/services/decidim/initiatives/diff_renderer.rb
275
244
  - app/services/decidim/initiatives/dummy_timestamp.rb
@@ -285,10 +254,7 @@ files:
285
254
  - app/views/decidim/initiatives/admin/exports/_dropdown.html.erb
286
255
  - app/views/decidim/initiatives/admin/initiatives/_form.html.erb
287
256
  - app/views/decidim/initiatives/admin/initiatives/_initiative_attachments.erb
288
- - app/views/decidim/initiatives/admin/initiatives/_signatures.html.erb
289
257
  - app/views/decidim/initiatives/admin/initiatives/edit.html.erb
290
- - app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.html.erb
291
- - app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.pdf.erb
292
258
  - app/views/decidim/initiatives/admin/initiatives/index.html.erb
293
259
  - app/views/decidim/initiatives/admin/initiatives_settings/_form.html.erb
294
260
  - app/views/decidim/initiatives/admin/initiatives_settings/edit.html.erb
@@ -320,7 +286,6 @@ files:
320
286
  - app/views/decidim/initiatives/initiatives/_initiative_hero.html.erb
321
287
  - app/views/decidim/initiatives/initiatives/_initiatives.html.erb
322
288
  - app/views/decidim/initiatives/initiatives/_interactions.html.erb
323
- - app/views/decidim/initiatives/initiatives/_linked_initiatives.html.erb
324
289
  - app/views/decidim/initiatives/initiatives/_new_initiative_button.html.erb
325
290
  - app/views/decidim/initiatives/initiatives/_no_initiatives_yet.html.erb
326
291
  - app/views/decidim/initiatives/initiatives/_progress_bar.html.erb
@@ -331,7 +296,6 @@ files:
331
296
  - app/views/decidim/initiatives/initiatives/edit.html.erb
332
297
  - app/views/decidim/initiatives/initiatives/index.html.erb
333
298
  - app/views/decidim/initiatives/initiatives/index.js.erb
334
- - app/views/decidim/initiatives/initiatives/print.html.erb
335
299
  - app/views/decidim/initiatives/initiatives/show.html.erb
336
300
  - app/views/decidim/initiatives/initiatives_mailer/_initiative_link.html.erb
337
301
  - app/views/decidim/initiatives/initiatives_mailer/notify_creation.html.erb
@@ -344,15 +308,14 @@ files:
344
308
  - app/views/layouts/decidim/_initiative_header.html.erb
345
309
  - app/views/layouts/decidim/_initiative_header_steps.html.erb
346
310
  - app/views/layouts/decidim/_initiative_signature_creation_header.html.erb
311
+ - app/views/layouts/decidim/admin/_manage_initiatives.html.erb
347
312
  - app/views/layouts/decidim/admin/initiative.html.erb
348
313
  - app/views/layouts/decidim/admin/initiatives.html.erb
349
- - app/views/layouts/decidim/admin/initiatives_votes.pdf.erb
350
314
  - app/views/layouts/decidim/initiative.html.erb
351
315
  - app/views/layouts/decidim/initiative_creation.html.erb
352
316
  - app/views/layouts/decidim/initiative_head.html.erb
353
317
  - app/views/layouts/decidim/initiative_signature_creation.html.erb
354
318
  - config/assets.rb
355
- - config/initializers/wicked_pdf.rb
356
319
  - config/locales/am-ET.yml
357
320
  - config/locales/ar-SA.yml
358
321
  - config/locales/ar.yml
@@ -494,15 +457,18 @@ files:
494
457
  - db/migrate/20210310120720_add_followable_counter_cache_to_initiatives.rb
495
458
  - db/migrate/20220518053612_add_comments_enabled_to_initiative_types.rb
496
459
  - db/migrate/20220527130640_create_decidim_initiatives_settings.rb
460
+ - db/migrate/20241127104718_add_taxonomy_to_initiatives_type_scope.rb
497
461
  - decidim-initiatives.gemspec
498
462
  - lib/decidim/api/initiative_api_type.rb
499
463
  - lib/decidim/api/initiative_committee_member_type.rb
500
464
  - lib/decidim/api/initiative_type.rb
501
465
  - lib/decidim/api/initiative_type_interface.rb
466
+ - lib/decidim/exporters/initiative_votes_pdf.rb
502
467
  - lib/decidim/initiatives.rb
503
468
  - lib/decidim/initiatives/admin.rb
504
469
  - lib/decidim/initiatives/admin_engine.rb
505
470
  - lib/decidim/initiatives/api.rb
471
+ - lib/decidim/initiatives/application_form_pdf.rb
506
472
  - lib/decidim/initiatives/content_blocks/registry_manager.rb
507
473
  - lib/decidim/initiatives/current_locale.rb
508
474
  - lib/decidim/initiatives/engine.rb
@@ -532,14 +498,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
532
498
  requirements:
533
499
  - - "~>"
534
500
  - !ruby/object:Gem::Version
535
- version: 3.2.0
501
+ version: 3.3.0
536
502
  required_rubygems_version: !ruby/object:Gem::Requirement
537
503
  requirements:
538
504
  - - ">="
539
505
  - !ruby/object:Gem::Version
540
506
  version: '0'
541
507
  requirements: []
542
- rubygems_version: 3.4.10
508
+ rubygems_version: 3.5.11
543
509
  signing_key:
544
510
  specification_version: 4
545
511
  summary: Decidim initiatives module
@@ -1,39 +0,0 @@
1
- <% collect_user_extra_fields = model.initiative.type.collect_user_extra_fields %>
2
- <% cell_small_width = collect_user_extra_fields ? "9.4%" : "15.6%" %>
3
- <% style_initiatives_votes_table_row = "width: 100%; display: inline-block; min-height: 33pt; border-bottom: 1pt solid black;" %>
4
- <% style_initiatives_votes_table_cell = "width: #{cell_small_width}; padding-left: 5pt; word-wrap: break-word; display: inline-block; float: left; min-height: 36pt;" %>
5
- <br>
6
- <div class="initiatives-votes-table-row" style="<%= style_initiatives_votes_table_row %>">
7
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
8
- <%= initiative_id %>
9
- </div>
10
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
11
- <%= initiative_title %>
12
- </div>
13
- <% if collect_user_extra_fields %>
14
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
15
- <%= name_and_surname %>
16
- </div>
17
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
18
- <%= document_number %>
19
- </div>
20
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
21
- <%= date_of_birth %>
22
- </div>
23
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
24
- <%= postal_code %>
25
- </div>
26
- <% end %>
27
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
28
- <%= time_and_date %>
29
- </div>
30
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
31
- <%= timestamp %>
32
- </div>
33
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
34
- <%= hash_id %>
35
- </div>
36
- <div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell %>">
37
- <%= scope %>
38
- </div>
39
- </div>
@@ -1,58 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module InitiativesVotes
5
- class VoteCell < Decidim::ViewModel
6
- delegate :timestamp, :hash_id, to: :model
7
-
8
- def show
9
- render
10
- end
11
-
12
- def initiative_id
13
- model.initiative.reference
14
- end
15
-
16
- def initiative_title
17
- decidim_sanitize_translated(model.initiative.title)
18
- end
19
-
20
- def name_and_surname
21
- metadata[:name_and_surname]
22
- end
23
-
24
- def document_number
25
- metadata[:document_number]
26
- end
27
-
28
- def date_of_birth
29
- metadata[:date_of_birth]
30
- end
31
-
32
- def postal_code
33
- metadata[:postal_code]
34
- end
35
-
36
- def time_and_date
37
- model.created_at
38
- end
39
-
40
- def scope
41
- return I18n.t("decidim.scopes.global") if model.decidim_scope_id.nil?
42
- return I18n.t("decidim.initiatives.unavailable_scope") if model.scope.blank?
43
-
44
- translated_attribute(model.scope.name)
45
- end
46
-
47
- protected
48
-
49
- def encryptor
50
- @encryptor ||= Decidim::Initiatives::DataEncryptor.new(secret: "personal user metadata")
51
- end
52
-
53
- def metadata
54
- @metadata ||= model.encrypted_metadata ? encryptor.decrypt(model.encrypted_metadata) : {}
55
- end
56
- end
57
- end
58
- end
@@ -1 +0,0 @@
1
- import "entrypoints/decidim_initiatives_initiatives_votes.scss"
@@ -1 +0,0 @@
1
- @import "stylesheets/decidim/initiatives/initiatives-votes.scss";
@@ -1 +0,0 @@
1
- import "entrypoints/decidim_initiatives_print.scss"
@@ -1 +0,0 @@
1
- @import "stylesheets/decidim/initiatives/print-initiative";
@@ -1,96 +0,0 @@
1
- @media all {
2
- .initiative-title {
3
- border: 1pt solid black;
4
- margin: 15pt 0;
5
- font-size: 12pt;
6
- font-weight: bold;
7
- text-align: center;
8
- }
9
-
10
- .initiatives-votes-table {
11
- width: 100%;
12
- display: block;
13
- border: 1pt solid black;
14
-
15
- .initiatives-votes-table-header {
16
- background-color: lightgray;
17
- display: inline-block;
18
- width: 100%;
19
- font-size: 12pt;
20
- font-weight: bold;
21
- border-bottom: 1pt solid black;
22
- }
23
-
24
- .initiatives-votes-table-row {
25
- width: 100%;
26
- display: inline-block;
27
- min-height: 33pt;
28
- }
29
-
30
- .initiatives-votes-table-row::after {
31
- content: "";
32
- display: inline-block;
33
- clear: both;
34
- }
35
-
36
- .initiatives-votes-table-row:last-child {
37
- border-bottom: 0;
38
- }
39
-
40
- .initiatives-votes-table-cell {
41
- padding-left: 5pt;
42
- word-wrap: break-word;
43
- display: inline-block;
44
- float: left;
45
- min-height: 36pt;
46
-
47
- .cell-content {
48
- font-size: 10pt;
49
- word-wrap: break-word;
50
- }
51
- }
52
-
53
- .checkbox-cell {
54
- width: 36pt;
55
- }
56
-
57
- .initiatives-votes-table-cell:last-child {
58
- border-right: 0;
59
- }
60
-
61
- .w11 {
62
- width: 10.8%;
63
- }
64
-
65
- .w20 {
66
- width: 19%;
67
- }
68
- }
69
-
70
- .no-border {
71
- border: none !important;
72
- }
73
- }
74
-
75
- @page {
76
- size: A4;
77
- margin: 17mm 17mm 11mm 11mm;
78
- }
79
-
80
- @media print {
81
- .title-bar {
82
- display: none;
83
- }
84
-
85
- .layout-nav {
86
- display: none;
87
- }
88
-
89
- .button.expanded {
90
- display: none;
91
- }
92
-
93
- .page-break {
94
- page-break-before: auto;
95
- }
96
- }
@@ -1,172 +0,0 @@
1
- @media all {
2
- .printable {
3
- width: 80%;
4
- margin-left: auto;
5
- margin-right: auto;
6
- }
7
-
8
- .initiative-letterhead {
9
- font-size: 14pt;
10
- font-weight: bold;
11
-
12
- img {
13
- margin-right: 5pt;
14
- }
15
- }
16
-
17
- .initiative-print-title {
18
- border: 1pt solid black;
19
- margin: 15pt 0;
20
- font-size: 12pt;
21
- font-weight: bold;
22
- text-align: center;
23
- }
24
-
25
- .print-table {
26
- width: 100%;
27
- display: block;
28
- border: 1pt solid black;
29
-
30
- .print-table-header {
31
- background-color: lightgray;
32
- display: inline-block;
33
- width: 100%;
34
- padding-left: 5pt;
35
- font-size: 12pt;
36
- font-weight: bold;
37
- border-bottom: 1pt solid black;
38
- }
39
-
40
- .print-table-row {
41
- width: 100%;
42
- display: inline-block;
43
- min-height: 33pt;
44
- border-bottom: 1pt solid black;
45
- }
46
-
47
- .print-table-row::after {
48
- content: "";
49
- display: inline-block;
50
- clear: both;
51
- }
52
-
53
- .print-table-row:last-child {
54
- border-bottom: 0;
55
- }
56
-
57
- .print-table-cell {
58
- padding-left: 5pt;
59
- display: inline-block;
60
- float: left;
61
- border-right: 1pt solid black;
62
- min-height: 36pt;
63
-
64
- .cell-content {
65
- font-size: 10pt;
66
- word-wrap: break-word;
67
- }
68
- }
69
-
70
- .checkbox-cell {
71
- width: 36pt;
72
- }
73
-
74
- .print-table-cell:last-child {
75
- border-right: 0;
76
- }
77
-
78
- .w33 {
79
- width: 33%;
80
- }
81
-
82
- .w66 {
83
- width: 66%;
84
- }
85
-
86
- .w50 {
87
- width: 50%;
88
- }
89
- }
90
-
91
- .no-border {
92
- border: none !important;
93
- }
94
-
95
- .print-section-title {
96
- font-size: 12pt;
97
- font-weight: bold;
98
- margin-top: 15pt;
99
- }
100
-
101
- .print-initiative-legal-text {
102
- font-size: 10pt;
103
- margin-top: 80pt;
104
- }
105
- }
106
-
107
- @page {
108
- size: A4;
109
- margin: 17mm 17mm 11mm 11mm;
110
- }
111
-
112
- @media print {
113
- h3.print-section-title {
114
- display: none;
115
- }
116
-
117
- .print-button {
118
- display: none;
119
- }
120
-
121
- .omnipresent-banner {
122
- display: none;
123
- }
124
-
125
- .decidim-accessibility-indicator {
126
- display: none;
127
- }
128
-
129
- .decidim-accessibility-badge {
130
- display: none;
131
- }
132
-
133
- .decidim-accessibility-report {
134
- display: none;
135
- }
136
-
137
- .process-header {
138
- display: none;
139
- }
140
-
141
- header {
142
- display: none;
143
- }
144
-
145
- .main-nav {
146
- display: none;
147
- }
148
-
149
- .title-bar {
150
- display: none;
151
- }
152
-
153
- .layout-nav {
154
- display: none;
155
- }
156
-
157
- .button.expanded {
158
- display: none;
159
- }
160
-
161
- .page-break {
162
- page-break-before: auto;
163
- }
164
-
165
- .main-footer {
166
- display: none;
167
- }
168
-
169
- .mini-footer {
170
- display: none;
171
- }
172
- }