decidim-initiatives 0.27.10 → 0.28.0.rc4

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 (240) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -3
  3. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell.rb +17 -18
  4. data/app/cells/decidim/initiatives/initiative_cell.rb +6 -1
  5. data/app/cells/decidim/initiatives/initiative_dropdown_metadata_cell.rb +19 -0
  6. data/app/cells/decidim/initiatives/initiative_g_cell.rb +31 -0
  7. data/app/cells/decidim/initiatives/initiative_metadata_g_cell.rb +62 -0
  8. data/app/cells/decidim/initiatives/initiative_s_cell.rb +15 -0
  9. data/app/cells/decidim/initiatives_votes/vote/show.erb +25 -19
  10. data/app/cells/decidim/initiatives_votes/vote_cell.rb +3 -1
  11. data/app/commands/decidim/initiatives/admin/accept_initiative.rb +40 -0
  12. data/app/commands/decidim/initiatives/admin/create_initiative_type.rb +1 -1
  13. data/app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb +1 -1
  14. data/app/commands/decidim/initiatives/admin/discard_initiative.rb +40 -0
  15. data/app/commands/decidim/initiatives/admin/publish_initiative.rb +1 -1
  16. data/app/commands/decidim/initiatives/admin/reject_initiative.rb +40 -0
  17. data/app/commands/decidim/initiatives/admin/send_initiative_to_technical_validation.rb +2 -2
  18. data/app/commands/decidim/initiatives/admin/unpublish_initiative.rb +1 -1
  19. data/app/commands/decidim/initiatives/admin/update_initiative.rb +1 -1
  20. data/app/commands/decidim/initiatives/admin/update_initiative_answer.rb +1 -1
  21. data/app/commands/decidim/initiatives/admin/update_initiative_type.rb +1 -1
  22. data/app/commands/decidim/initiatives/admin/update_initiative_type_scope.rb +1 -1
  23. data/app/commands/decidim/initiatives/admin/update_initiatives_settings.rb +1 -1
  24. data/app/commands/decidim/initiatives/attachment_methods.rb +2 -24
  25. data/app/commands/decidim/initiatives/create_initiative.rb +19 -14
  26. data/app/commands/decidim/initiatives/send_initiative_to_technical_validation.rb +2 -2
  27. data/app/commands/decidim/initiatives/spawn_committee_request.rb +1 -1
  28. data/app/commands/decidim/initiatives/unvote_initiative.rb +1 -1
  29. data/app/commands/decidim/initiatives/update_initiative.rb +9 -2
  30. data/app/commands/decidim/initiatives/validate_mobile_phone.rb +2 -2
  31. data/app/commands/decidim/initiatives/vote_initiative.rb +5 -5
  32. data/app/constraints/decidim/initiatives/current_initiative.rb +1 -1
  33. data/app/controllers/concerns/decidim/initiatives/admin/filterable.rb +2 -2
  34. data/app/controllers/concerns/decidim/initiatives/needs_initiative.rb +1 -1
  35. data/app/controllers/decidim/initiatives/admin/answers_controller.rb +3 -0
  36. data/app/controllers/decidim/initiatives/admin/committee_requests_controller.rb +2 -0
  37. data/app/controllers/decidim/initiatives/admin/components_controller.rb +3 -0
  38. data/app/controllers/decidim/initiatives/admin/initiative_attachments_controller.rb +2 -0
  39. data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +17 -6
  40. data/app/controllers/decidim/initiatives/admin/initiatives_permissions_controller.rb +3 -0
  41. data/app/controllers/decidim/initiatives/admin/initiatives_settings_controller.rb +2 -0
  42. data/app/controllers/decidim/initiatives/admin/initiatives_type_scopes_controller.rb +30 -0
  43. data/app/controllers/decidim/initiatives/admin/initiatives_types_controller.rb +14 -0
  44. data/app/controllers/decidim/initiatives/admin/initiatives_types_permissions_controller.rb +21 -0
  45. data/app/controllers/decidim/initiatives/admin/moderations/reports_controller.rb +2 -2
  46. data/app/controllers/decidim/initiatives/admin/moderations_controller.rb +4 -2
  47. data/app/controllers/decidim/initiatives/application_controller.rb +0 -1
  48. data/app/controllers/decidim/initiatives/authorization_create_modals_controller.rb +25 -0
  49. data/app/controllers/decidim/initiatives/authorization_sign_modals_controller.rb +2 -2
  50. data/app/controllers/decidim/initiatives/committee_requests_controller.rb +0 -2
  51. data/app/controllers/decidim/initiatives/create_initiative_controller.rb +62 -115
  52. data/app/controllers/decidim/initiatives/initiative_signatures_controller.rb +113 -81
  53. data/app/controllers/decidim/initiatives/initiative_types_controller.rb +7 -0
  54. data/app/controllers/decidim/initiatives/initiatives_controller.rb +37 -17
  55. data/app/controllers/decidim/initiatives/versions_controller.rb +0 -1
  56. data/app/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event.rb +2 -2
  57. data/app/events/decidim/initiatives/admin/support_threshold_reached_event.rb +1 -1
  58. data/app/events/decidim/initiatives/approve_membership_request_event.rb +16 -13
  59. data/app/events/decidim/initiatives/create_initiative_event.rb +10 -7
  60. data/app/events/decidim/initiatives/endorse_initiative_event.rb +1 -1
  61. data/app/events/decidim/initiatives/extend_initiative_event.rb +1 -1
  62. data/app/events/decidim/initiatives/initiative_sent_to_technical_validation_event.rb +2 -2
  63. data/app/events/decidim/initiatives/milestone_completed_event.rb +1 -1
  64. data/app/events/decidim/initiatives/revoke_membership_request_event.rb +16 -13
  65. data/app/events/decidim/initiatives/spawn_committee_request_event.rb +16 -13
  66. data/app/forms/decidim/initiatives/admin/initiative_form.rb +1 -1
  67. data/app/forms/decidim/initiatives/initiative_form.rb +22 -31
  68. data/app/forms/decidim/initiatives/previous_form.rb +4 -0
  69. data/app/forms/decidim/initiatives/vote_form.rb +11 -11
  70. data/app/helpers/decidim/initiatives/admin/initiatives_helper.rb +1 -1
  71. data/app/helpers/decidim/initiatives/application_helper.rb +5 -62
  72. data/app/helpers/decidim/initiatives/initiative_helper.rb +48 -5
  73. data/app/helpers/decidim/initiatives/initiatives_helper.rb +33 -12
  74. data/app/jobs/decidim/initiatives/export_initiatives_job.rb +1 -1
  75. data/app/models/decidim/initiative.rb +16 -14
  76. data/app/models/decidim/initiatives_vote.rb +1 -1
  77. data/app/packs/entrypoints/decidim_initiatives.js +3 -0
  78. data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_initiatives.svg +42 -1
  79. data/app/packs/src/decidim/initiatives/application.js +0 -1
  80. data/app/packs/src/decidim/initiatives/scoped_type.js +1 -1
  81. data/app/packs/stylesheets/decidim/initiatives/initiatives-votes.scss +21 -21
  82. data/app/packs/stylesheets/decidim/initiatives/print-initiative.scss +47 -35
  83. data/app/packs/stylesheets/initiatives.scss +171 -0
  84. data/app/permissions/decidim/initiatives/permissions.rb +3 -13
  85. data/app/presenters/decidim/initiatives/admin_log/initiative_presenter.rb +2 -2
  86. data/app/presenters/decidim/initiatives/admin_log/initiatives_settings_presenter.rb +2 -2
  87. data/app/presenters/decidim/initiatives/admin_log/initiatives_type_presenter.rb +2 -2
  88. data/app/queries/decidim/initiatives/organization_prioritized_initiatives.rb +1 -1
  89. data/app/queries/decidim/initiatives/similar_initiatives.rb +2 -2
  90. data/app/queries/decidim/initiatives/support_period_finished_initiatives.rb +1 -1
  91. data/app/queries/decidim/initiatives/user_authorizations.rb +1 -1
  92. data/app/services/decidim/initiatives/pdf_signature_example.rb +44 -52
  93. data/app/views/decidim/initiatives/_modal.html.erb +15 -0
  94. data/app/views/decidim/initiatives/admin/answers/_info_initiative.html.erb +21 -19
  95. data/app/views/decidim/initiatives/admin/answers/edit.html.erb +41 -27
  96. data/app/views/decidim/initiatives/admin/committee_requests/index.html.erb +41 -48
  97. data/app/views/decidim/initiatives/admin/exports/_dropdown.html.erb +8 -7
  98. data/app/views/decidim/initiatives/admin/initiatives/_form.html.erb +111 -95
  99. data/app/views/decidim/initiatives/admin/initiatives/_initiative_attachments.erb +7 -7
  100. data/app/views/decidim/initiatives/admin/initiatives/_signatures.html.erb +87 -0
  101. data/app/views/decidim/initiatives/admin/initiatives/edit.html.erb +72 -60
  102. data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.html.erb +8 -0
  103. data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.pdf.erb +5 -78
  104. data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +76 -75
  105. data/app/views/decidim/initiatives/admin/initiatives_settings/_form.html.erb +7 -8
  106. data/app/views/decidim/initiatives/admin/initiatives_settings/edit.html.erb +17 -5
  107. data/app/views/decidim/initiatives/admin/initiatives_type_scopes/_form.html.erb +11 -6
  108. data/app/views/decidim/initiatives/admin/initiatives_type_scopes/edit.html.erb +16 -22
  109. data/app/views/decidim/initiatives/admin/initiatives_type_scopes/new.html.erb +17 -15
  110. data/app/views/decidim/initiatives/admin/initiatives_types/_form.html.erb +93 -76
  111. data/app/views/decidim/initiatives/admin/initiatives_types/_initiative_type_scopes.html.erb +35 -33
  112. data/app/views/decidim/initiatives/admin/initiatives_types/edit.html.erb +16 -12
  113. data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +39 -48
  114. data/app/views/decidim/initiatives/admin/initiatives_types/new.html.erb +16 -9
  115. data/app/views/decidim/initiatives/committee_requests/new.html.erb +21 -19
  116. data/app/views/decidim/initiatives/create_initiative/_share_committee_link.html.erb +15 -20
  117. data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +62 -100
  118. data/app/views/decidim/initiatives/create_initiative/finish.html.erb +24 -28
  119. data/app/views/decidim/initiatives/create_initiative/promotal_committee.html.erb +15 -17
  120. data/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +32 -46
  121. data/app/views/decidim/initiatives/initiative_signatures/_wizard_steps.html.erb +15 -19
  122. data/app/views/decidim/initiatives/initiative_signatures/fill_personal_data.html.erb +25 -36
  123. data/app/views/decidim/initiatives/initiative_signatures/finish.html.erb +5 -16
  124. data/app/views/decidim/initiatives/initiative_signatures/sms_code.html.erb +8 -19
  125. data/app/views/decidim/initiatives/initiative_signatures/sms_phone_number.html.erb +8 -20
  126. data/app/views/decidim/initiatives/initiatives/_committee_members.html.erb +48 -66
  127. data/app/views/decidim/initiatives/initiatives/_form.html.erb +49 -95
  128. data/app/views/decidim/initiatives/initiatives/_initiative_badge.html.erb +3 -5
  129. data/app/views/decidim/initiatives/initiatives/_initiative_hero.html.erb +13 -0
  130. data/app/views/decidim/initiatives/initiatives/_initiatives.html.erb +6 -15
  131. data/app/views/decidim/initiatives/initiatives/_interactions.html.erb +1 -1
  132. data/app/views/decidim/initiatives/initiatives/_new_initiative_button.html.erb +28 -0
  133. data/app/views/decidim/initiatives/initiatives/_progress_bar.html.erb +2 -6
  134. data/app/views/decidim/initiatives/initiatives/_result.html.erb +15 -21
  135. data/app/views/decidim/initiatives/initiatives/_send_to_technical_validation.html.erb +3 -3
  136. data/app/views/decidim/initiatives/initiatives/_tags_type.html.erb +1 -0
  137. data/app/views/decidim/initiatives/initiatives/_vote_button.html.erb +9 -9
  138. data/app/views/decidim/initiatives/initiatives/_vote_cabin.html.erb +7 -7
  139. data/app/views/decidim/initiatives/initiatives/edit.html.erb +63 -68
  140. data/app/views/decidim/initiatives/initiatives/index.html.erb +17 -18
  141. data/app/views/decidim/initiatives/initiatives/index.js.erb +0 -5
  142. data/app/views/decidim/initiatives/initiatives/print.html.erb +123 -120
  143. data/app/views/decidim/initiatives/initiatives/show.html.erb +188 -72
  144. data/app/views/decidim/initiatives/initiatives_mailer/notify_creation.html.erb +2 -2
  145. data/app/views/decidim/initiatives/initiatives_type_scopes/search.html.erb +2 -1
  146. data/app/views/decidim/initiatives/versions/show.html.erb +15 -6
  147. data/app/views/layouts/decidim/_initiative_creation_header.html.erb +17 -28
  148. data/app/views/layouts/decidim/_initiative_header.html.erb +3 -23
  149. data/app/views/layouts/decidim/_initiative_header_steps.html.erb +4 -12
  150. data/app/views/layouts/decidim/_initiative_signature_creation_header.html.erb +5 -26
  151. data/app/views/layouts/decidim/admin/initiative.html.erb +12 -13
  152. data/app/views/layouts/decidim/admin/initiatives.html.erb +40 -11
  153. data/app/views/layouts/decidim/initiative.html.erb +16 -11
  154. data/app/views/layouts/decidim/initiative_creation.html.erb +7 -18
  155. data/app/views/layouts/decidim/initiative_head.html.erb +15 -0
  156. data/app/views/layouts/decidim/initiative_signature_creation.html.erb +3 -11
  157. data/config/assets.rb +0 -1
  158. data/config/initializers/wicked_pdf.rb +1 -1
  159. data/config/locales/ar.yml +1 -96
  160. data/config/locales/bg.yml +0 -642
  161. data/config/locales/ca.yml +76 -115
  162. data/config/locales/cs.yml +70 -109
  163. data/config/locales/de.yml +78 -117
  164. data/config/locales/el.yml +1 -98
  165. data/config/locales/en.yml +69 -108
  166. data/config/locales/es-MX.yml +65 -104
  167. data/config/locales/es-PY.yml +65 -104
  168. data/config/locales/es.yml +73 -112
  169. data/config/locales/eu.yml +66 -105
  170. data/config/locales/fi-plain.yml +67 -106
  171. data/config/locales/fi.yml +68 -107
  172. data/config/locales/fr-CA.yml +69 -108
  173. data/config/locales/fr.yml +67 -106
  174. data/config/locales/ga-IE.yml +0 -35
  175. data/config/locales/gl.yml +1 -89
  176. data/config/locales/hu.yml +25 -114
  177. data/config/locales/id-ID.yml +1 -89
  178. data/config/locales/is-IS.yml +1 -60
  179. data/config/locales/it.yml +6 -111
  180. data/config/locales/ja.yml +65 -111
  181. data/config/locales/lb.yml +6 -88
  182. data/config/locales/lt.yml +52 -103
  183. data/config/locales/lv.yml +1 -99
  184. data/config/locales/nl.yml +6 -104
  185. data/config/locales/no.yml +6 -114
  186. data/config/locales/pl.yml +6 -158
  187. data/config/locales/pt-BR.yml +23 -146
  188. data/config/locales/pt.yml +6 -111
  189. data/config/locales/ro-RO.yml +13 -108
  190. data/config/locales/ru.yml +1 -68
  191. data/config/locales/sk.yml +1 -85
  192. data/config/locales/sl.yml +3 -5
  193. data/config/locales/sv.yml +25 -120
  194. data/config/locales/tr-TR.yml +9 -110
  195. data/config/locales/uk.yml +1 -68
  196. data/config/locales/zh-CN.yml +6 -102
  197. data/config/locales/zh-TW.yml +31 -95
  198. data/db/migrate/20171017091734_add_scopes_for_all_initiative_types.rb +1 -1
  199. data/db/migrate/20171017095143_update_initiative_scoped_type.rb +1 -1
  200. data/db/migrate/20191002082220_move_signature_type_to_initative_type.rb +1 -1
  201. data/lib/decidim/api/initiative_committee_member_type.rb +2 -2
  202. data/lib/decidim/initiatives/admin_engine.rb +13 -93
  203. data/lib/decidim/initiatives/content_blocks/registry_manager.rb +22 -0
  204. data/lib/decidim/initiatives/engine.rb +45 -23
  205. data/lib/decidim/initiatives/menu.rb +150 -0
  206. data/lib/decidim/initiatives/participatory_space.rb +6 -91
  207. data/lib/decidim/initiatives/query_extensions.rb +5 -5
  208. data/lib/decidim/initiatives/seeds.rb +95 -0
  209. data/lib/decidim/initiatives/test/factories.rb +43 -48
  210. data/lib/decidim/initiatives/version.rb +1 -1
  211. data/lib/decidim/initiatives.rb +1 -1
  212. data/lib/tasks/decidim_initiatives.rake +2 -2
  213. data/lib/tasks/initiatives/upgrade/decidim_initiatives_upgrade_tasks.rake +1 -1
  214. metadata +51 -81
  215. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +0 -28
  216. data/app/cells/decidim/initiatives/initiative_m/author.erb +0 -10
  217. data/app/cells/decidim/initiatives/initiative_m/footer.erb +0 -28
  218. data/app/cells/decidim/initiatives/initiative_m/tags.erb +0 -9
  219. data/app/cells/decidim/initiatives/initiative_m_cell.rb +0 -77
  220. data/app/controllers/decidim/initiatives/widgets_controller.rb +0 -44
  221. data/app/packs/stylesheets/decidim/initiatives/admin.scss +0 -33
  222. data/app/packs/stylesheets/decidim/initiatives/initiatives.scss +0 -64
  223. data/app/packs/stylesheets/decidim/initiatives/popularity_item.scss +0 -76
  224. data/app/packs/stylesheets/decidim/initiatives/statistics.scss +0 -15
  225. data/app/views/decidim/initiatives/create_initiative/_finish_help.html.erb +0 -2
  226. data/app/views/decidim/initiatives/create_initiative/previous_form.html.erb +0 -40
  227. data/app/views/decidim/initiatives/create_initiative/show_similar_initiatives.html.erb +0 -23
  228. data/app/views/decidim/initiatives/initiatives/_author.html.erb +0 -35
  229. data/app/views/decidim/initiatives/initiatives/_count.html.erb +0 -1
  230. data/app/views/decidim/initiatives/initiatives/_filters.html.erb +0 -33
  231. data/app/views/decidim/initiatives/initiatives/_filters_small_view.html.erb +0 -18
  232. data/app/views/decidim/initiatives/initiatives/_index_header.html.erb +0 -44
  233. data/app/views/decidim/initiatives/initiatives/_tags.html.erb +0 -7
  234. data/app/views/decidim/initiatives/versions/index.html.erb +0 -8
  235. data/config/locales/he-IL.yml +0 -1
  236. data/db/seeds/city.jpeg +0 -0
  237. data/db/seeds/city2.jpeg +0 -0
  238. data/decidim-initiatives.gemspec +0 -38
  239. data/lib/decidim/initiatives/initiatives_filter_form_builder.rb +0 -56
  240. data/lib/gem_overrides/origami/date.rb +0 -47
@@ -1,158 +1,161 @@
1
- <div class="wrapper">
2
- <div class="initiative-letterhead">
3
- <% if current_organization.logo.present? %>
4
- <%= image_tag current_organization.attached_uploader(:logo).path(variant: :medium), title: current_organization.name %>
5
- <% end %>
1
+ <%= render layout: "layouts/decidim/shared/layout_center", locals: { columns: 10 } do %>
2
+ <div class="pt-10">
3
+ <div class="initiative-letterhead">
4
+ <% if current_organization.logo.present? %>
5
+ <%= image_tag current_organization.attached_uploader(:logo).path(variant: :medium), title: current_organization.name %>
6
+ <% end %>
6
7
 
7
- <%= current_organization.name %>
8
- </div>
9
- <h3 class="print-section-title"><%= t ".section" %></h3>
10
- <div class="initiative-print-title">
11
- <%= t ".general_title" %>
12
- </div>
13
-
14
- <div class="print-table">
15
- <div class="print-table-header">
16
- <%= t ".author_title" %>
8
+ <%= current_organization.name %>
17
9
  </div>
18
-
19
- <div class="print-table-row">
20
- <div class="print-table-cell">
21
- <div class="cell-header"><%= t ".id_number" %></div>
22
- <div class="cell-content"></div>
23
- </div>
10
+ <h3 class="print-section-title"><%= t "section", scope: "decidim.initiatives.initiatives.print" %></h3>
11
+ <div class="initiative-print-title">
12
+ <%= t "general_title", scope: "decidim.initiatives.initiatives.print" %>
24
13
  </div>
25
14
 
26
- <div class="print-table-row">
27
- <div class="print-table-cell">
28
- <div class="cell-header"><%= t ".full_name" %></div>
29
- <div class="cell-content"></div>
15
+ <div class="print-table">
16
+ <div class="print-table-header">
17
+ <%= t "author_title", scope: "decidim.initiatives.initiatives.print" %>
30
18
  </div>
31
- </div>
32
19
 
33
- <div class="print-table-row">
34
- <div class="print-table-cell">
35
- <div class="cell-header"><%= t ".address" %></div>
36
- <div class="cell-content"></div>
20
+ <div class="print-table-row">
21
+ <div class="print-table-cell">
22
+ <div class="cell-header"><%= t "id_number", scope: "decidim.initiatives.initiatives.print" %></div>
23
+ <div class="cell-content"></div>
24
+ </div>
37
25
  </div>
38
- </div>
39
26
 
40
- <div class="print-table-row">
41
- <div class="print-table-cell w33">
42
- <div class="cell-header"><%= t ".city" %></div>
43
- <div class="cell-content"></div>
44
- </div>
45
- <div class="print-table-cell w33">
46
- <div class="cell-header"><%= t ".province" %></div>
47
- <div class="cell-content"></div>
48
- </div>
49
- <div class="print-table-cell w33">
50
- <div class="cell-header"><%= t ".postal_code" %></div>
51
- <div class="cell-content"></div>
27
+ <div class="print-table-row">
28
+ <div class="print-table-cell">
29
+ <div class="cell-header"><%= t "full_name", scope: "decidim.initiatives.initiatives.print" %></div>
30
+ <div class="cell-content"></div>
31
+ </div>
52
32
  </div>
53
- </div>
54
33
 
55
- <div class="print-table-row">
56
- <div class="print-table-cell w33">
57
- <div class="cell-header"><%= t ".phone_number" %></div>
58
- <div class="cell-content"></div>
34
+ <div class="print-table-row">
35
+ <div class="print-table-cell">
36
+ <div class="cell-header"><%= t "address", scope: "decidim.initiatives.initiatives.print" %></div>
37
+ <div class="cell-content"></div>
38
+ </div>
59
39
  </div>
60
40
 
61
- <div class="print-table-cell">
62
- <div class="cell-header"><%= t ".email" %></div>
63
- <div class="cell-content"></div>
41
+ <div class="print-table-row">
42
+ <div class="print-table-cell w33">
43
+ <div class="cell-header"><%= t "city", scope: "decidim.initiatives.initiatives.print" %></div>
44
+ <div class="cell-content"></div>
45
+ </div>
46
+ <div class="print-table-cell w33">
47
+ <div class="cell-header"><%= t "province", scope: "decidim.initiatives.initiatives.print" %></div>
48
+ <div class="cell-content"></div>
49
+ </div>
50
+ <div class="print-table-cell w33">
51
+ <div class="cell-header"><%= t "postal_code", scope: "decidim.initiatives.initiatives.print" %></div>
52
+ <div class="cell-content"></div>
53
+ </div>
64
54
  </div>
65
- </div>
66
- </div>
67
- <br><br>
68
- <div class="print-table">
69
- <div class="print-table-header">
70
- <%= t ".members_header" %>
71
- </div>
72
55
 
73
- <div class="print-table-row">
74
- <div class="print-table-cell w33"><%= t ".full_name" %></div>
75
- <div class="print-table-cell w33"><%= t ".id_number" %></div>
76
- <div class="print-table-cell w33"><%= t ".address" %></div>
56
+ <div class="print-table-row">
57
+ <div class="print-table-cell w33">
58
+ <div class="cell-header"><%= t "phone_number", scope: "decidim.initiatives.initiatives.print" %></div>
59
+ <div class="cell-content"></div>
60
+ </div>
61
+
62
+ <div class="print-table-cell">
63
+ <div class="cell-header"><%= t "email", scope: "decidim.initiatives.initiatives.print" %></div>
64
+ <div class="cell-content"></div>
65
+ </div>
66
+ </div>
77
67
  </div>
68
+ <br><br>
69
+ <div class="print-table">
70
+ <div class="print-table-header">
71
+ <%= t "members_header", scope: "decidim.initiatives.initiatives.print" %>
72
+ </div>
78
73
 
79
- <% 4.times do %>
80
74
  <div class="print-table-row">
81
- <div class="print-table-cell w33"></div>
82
- <div class="print-table-cell w33"></div>
83
- <div class="print-table-cell w33"></div>
75
+ <div class="print-table-cell w33"><%= t "full_name", scope: "decidim.initiatives.initiatives.print" %></div>
76
+ <div class="print-table-cell w33"><%= t "id_number", scope: "decidim.initiatives.initiatives.print" %></div>
77
+ <div class="print-table-cell w33"><%= t "address", scope: "decidim.initiatives.initiatives.print" %></div>
84
78
  </div>
85
- <% end %>
86
- </div>
87
79
 
88
- <h2 class="print-section-title"><%= t ".initiative.type" %></h2>
89
- <%= translated_attribute(current_initiative.type.title) %>
80
+ <% 4.times do %>
81
+ <div class="print-table-row">
82
+ <div class="print-table-cell w33"></div>
83
+ <div class="print-table-cell w33"></div>
84
+ <div class="print-table-cell w33"></div>
85
+ </div>
86
+ <% end %>
87
+ </div>
90
88
 
91
- <h2 class="print-section-title"><%= t ".initiative.title" %></h2>
92
- <%= translated_attribute(current_initiative.title) %>
89
+ <h2 class="print-section-title"><%= t "initiative.type", scope: "decidim.initiatives.initiatives.print" %></h2>
90
+ <%= translated_attribute(current_initiative.type.title) %>
93
91
 
94
- <h2 class="print-section-title"><%= t ".initiative.description" %></h2>
95
- <%= decidim_sanitize_editor translated_attribute(current_initiative.description) %>
92
+ <h2 class="print-section-title"><%= t "initiative.title", scope: "decidim.initiatives.initiatives.print" %></h2>
93
+ <%= translated_attribute(current_initiative.title) %>
96
94
 
97
- <div class="print-table">
98
- <div class="print-table-header">
99
- <%= t ".initiative.attachments" %>
100
- </div>
95
+ <h2 class="print-section-title"><%= t "initiative.description", scope: "decidim.initiatives.initiatives.print" %></h2>
96
+ <%= decidim_sanitize_editor translated_attribute(current_initiative.description) %>
101
97
 
102
- <div class="print-table-row">
103
- <div class="print-table-cell checkbox-cell"></div>
104
- <div class="print-table-cell">
105
- <div class="cell-content"></div>
98
+ <div class="print-table">
99
+ <div class="print-table-header">
100
+ <%= t "initiative.attachments", scope: "decidim.initiatives.initiatives.print" %>
106
101
  </div>
107
- </div>
108
102
 
109
- <div class="print-table-row">
110
- <div class="print-table-cell checkbox-cell"></div>
111
- <div class="print-table-cell">
112
- <div class="cell-content"><div class="cell-content"></div></div>
103
+ <div class="print-table-row">
104
+ <div class="print-table-cell checkbox-cell"></div>
105
+ <div class="print-table-cell">
106
+ <div class="cell-content"></div>
107
+ </div>
113
108
  </div>
114
- </div>
115
109
 
116
- <div class="print-table-row">
117
- <div class="print-table-cell checkbox-cell"></div>
118
- <div class="print-table-cell">
119
- <div class="cell-content"></div>
110
+ <div class="print-table-row">
111
+ <div class="print-table-cell checkbox-cell"></div>
112
+ <div class="print-table-cell">
113
+ <div class="cell-content"><div class="cell-content"></div></div>
114
+ </div>
120
115
  </div>
121
- </div>
122
116
 
123
- <div class="print-table-row">
124
- <div class="print-table-cell checkbox-cell"></div>
125
- <div class="print-table-cell">
126
- <div class="cell-content"></div>
117
+ <div class="print-table-row">
118
+ <div class="print-table-cell checkbox-cell"></div>
119
+ <div class="print-table-cell">
120
+ <div class="cell-content"></div>
121
+ </div>
122
+ </div>
123
+
124
+ <div class="print-table-row">
125
+ <div class="print-table-cell checkbox-cell"></div>
126
+ <div class="print-table-cell">
127
+ <div class="cell-content"></div>
128
+ </div>
127
129
  </div>
128
- </div>
129
130
 
130
- <div class="print-table-row">
131
- <div class="print-table-cell checkbox-cell"></div>
132
- <div class="print-table-cell">
133
- <div class="cell-content"></div>
131
+ <div class="print-table-row">
132
+ <div class="print-table-cell checkbox-cell"></div>
133
+ <div class="print-table-cell">
134
+ <div class="cell-content"></div>
135
+ </div>
134
136
  </div>
135
- </div>
136
137
 
137
- <div class="print-table-row">
138
- <div class="print-table-cell checkbox-cell"></div>
139
- <div class="print-table-cell">
140
- <div class="cell-content"></div>
138
+ <div class="print-table-row">
139
+ <div class="print-table-cell checkbox-cell"></div>
140
+ <div class="print-table-cell">
141
+ <div class="cell-content"></div>
142
+ </div>
141
143
  </div>
142
144
  </div>
143
- </div>
144
- <br>
145
- <div class="print-table no-border">
146
- <div class="print-table-row no-border">
147
- <div class="print-table-cell w50 no-border" style="font-weight: bold"><%= t ".place_date" %></div>
148
- <div class="print-table-cell w50 no-border" style="font-weight: bold"><%= t ".signature" %></div>
145
+ <br>
146
+ <div class="print-table no-border">
147
+ <div class="print-table-row no-border">
148
+ <div class="print-table-cell w50 no-border" style="font-weight: bold"><%= t "place_date", scope: "decidim.initiatives.initiatives.print" %></div>
149
+ <div class="print-table-cell w50 no-border" style="font-weight: bold"><%= t "signature", scope: "decidim.initiatives.initiatives.print" %></div>
150
+ </div>
149
151
  </div>
150
- </div>
151
152
 
152
- <p class="print-initiative-legal-text">
153
- <%= t ".legal_text" %>
154
- </p>
153
+ <p class="print-initiative-legal-text">
154
+ <%= t "legal_text", scope: "decidim.initiatives.initiatives.print" %>
155
+ </p>
155
156
 
156
- <a href="#" onclick="window.print();return false;" class="button expanded print-button"><%= t ".print" %></a>
157
- <%= stylesheet_pack_tag "decidim_initiatives_print", media: "all" %>
158
- </div>
157
+ <a href="#" onclick="window.print();return false;" class="button button__lg button__secondary mt-4 print-button"><%= t "print", scope: "decidim.initiatives.initiatives.print" %></a>
158
+ <%= append_stylesheet_pack_tag "decidim_initiatives_print" %>
159
+
160
+ </div>
161
+ <% end %>
@@ -1,10 +1,10 @@
1
1
  <% add_decidim_meta_tags({
2
- image_url: current_initiative.type.attached_uploader(:banner_image).path,
3
- description: translated_attribute(current_initiative.description),
4
- title: translated_attribute(current_initiative.title),
5
- url: initiative_url(current_initiative.id),
6
- twitter_handler: current_organization.twitter_handler
7
- }) %>
2
+ image_url: current_initiative.type.attached_uploader(:banner_image).path,
3
+ description: translated_attribute(current_initiative.description),
4
+ title: translated_attribute(current_initiative.title),
5
+ url: initiative_url(current_initiative.id),
6
+ twitter_handler: current_organization.twitter_handler
7
+ }) %>
8
8
 
9
9
  <%
10
10
  edit_link(
@@ -14,84 +14,200 @@ edit_link(
14
14
  )
15
15
  %>
16
16
 
17
- <%= participatory_space_floating_help %>
17
+ <%= content_for :aside do %>
18
+ <section class="initiative__aside">
19
+ <% if current_initiative.published? || current_initiative.rejected? || current_initiative.accepted? || current_initiative.discarded? %>
20
+ <% if current_initiative.votes_enabled? %>
21
+ <section class="layout-aside__section layout-aside__buttons" id="initiative-<%= current_initiative.id %>-vote-cabin">
22
+ <%= render partial: "vote_cabin", locals: { initiative: current_initiative } %>
23
+ </section>
24
+ <% end %>
25
+ <% else %>
26
+ <section class="layout-aside__section layout-aside__buttons">
27
+ <%= link_to t(".edit"),
28
+ edit_initiative_path(current_initiative),
29
+ class: "button button__xl w-full button__secondary" %>
30
+ <%= render partial: "send_to_technical_validation", locals: { title: t(".send_to_technical_validation"), confirm: t(".confirm") } %>
31
+ </section>
32
+ <% end %>
18
33
 
19
- <% add_decidim_page_title(translated_attribute(current_initiative.title)) %>
20
- <% provide :meta_image_url, current_initiative.type.attached_uploader(:banner_image).path %>
21
- <div class="row">
22
- <% unless current_initiative.online_signature_type? %>
23
- <div class="column">
24
- <div class="callout secondary">
25
- <p>
26
- <%= t ".any_vote_method" if current_initiative.any_signature_type? %>
27
- <%= t ".offline_method" if current_initiative.offline_signature_type? %>
28
- </p>
29
- </div>
30
- </div>
31
- <% end %>
34
+ <section class="layout-aside__section">
35
+ <%= render partial: "progress_bar" %>
36
+ </section>
32
37
 
33
- <div class="columns section view-side mediumlarge-4 mediumlarge-push-8 large-3 large-push-9">
34
- <div class="card text-center">
35
- <div class="card__content">
36
- <% if current_initiative.published? || current_initiative.rejected? || current_initiative.accepted? %>
37
- <%= render partial: "progress_bar" %>
38
- <% if current_initiative.votes_enabled? %>
39
- <div id="initiative-<%= current_initiative.id %>-vote-cabin">
40
- <%= render partial: "vote_cabin", locals: { initiative: current_initiative } %>
41
- </div>
38
+ <section class="layout-aside__section">
39
+ <%= cell("decidim/nav_links", initiative_nav_items(current_initiative)) %>
40
+ </section>
41
+
42
+ <% if current_initiative.type.promoting_committee_enabled? && current_user&.admin? %>
43
+ <div class="layout-aside__section">
44
+ <div class="initiative__aside__element__committee">
45
+ <%= icon "account-circle-line", class: "fill-gray inline-block" %>
46
+ <span class="ml-2 initiative__aside__element-title">
47
+ <%= t("title", scope: "decidim.initiatives.admin.committee_requests.index") %>
48
+ </span>
49
+ <div class="ml-auto fill-secondary inline-block">
50
+ <input id="urlShareLink-committee" type="text" class="!hidden" value="<%= decidim_initiatives.new_initiative_committee_request_url(current_initiative) %>" readonly>
51
+ <button type="button" class="button button__sm button__text-secondary" data-clipboard-copy="#urlShareLink-committee">
52
+ <%= render_committee_tooltip %>
53
+ <span class="sr-only"><%= t("decidim.shared.share_modal.copy_share_link") %></span>
54
+ </button>
55
+ </div>
56
+ </div>
57
+ <% if current_initiative.committee_members.empty? %>
58
+ <span class="initiative__aside__element__data-text">
59
+ <%= t("no_members_yet", scope: "decidim.initiatives.admin.committee_requests.index") %>
60
+ </span>
42
61
  <% end %>
43
- <% if current_initiative.commentable? %>
44
- <%= render partial: "interactions" %>
62
+ <% current_initiative.committee_members.each do |request| %>
63
+ <div class="author" data-id="<%= request.id %>">
64
+ <div class="profile__group__list">
65
+ <%= card_for request.user %>
66
+ </div>
67
+ </div>
45
68
  <% end %>
46
- <% else %>
47
- <%= link_to t(".edit"),
48
- edit_initiative_path(current_initiative),
49
- class: "button expanded" %>
50
- <%= render partial: "send_to_technical_validation", locals: {
51
- title: t(".send_to_technical_validation"),
52
- confirm: t(".confirm")
53
- } %>
54
- <%= link_to t(".print"), print_initiative_path(current_initiative), class: "link action-print" %>
55
- <% end %>
69
+ </div>
70
+ <% end %>
56
71
 
72
+ <section class="layout-aside__section">
73
+ <div class="mb-6">
74
+ <%= icon "apps-line", class: "fill-gray inline-block" %>
75
+ <span class="initiative__aside__element-title">
76
+ <%= t("initiative_data", scope: "decidim.initiatives.initiatives.show") %>
77
+ </span>
57
78
  </div>
58
- </div>
59
- <% if current_user %>
60
- <div class="card text-center">
61
- <div class="card__content">
62
- <%= cell "decidim/follow_button", current_participatory_space, inline: false, large: true %>
63
- <small><%= t(".follow_description") %></small>
64
- </div>
79
+
80
+ <div class="initiative__aside__element__data">
81
+ <p class="initiative__aside__element__data-title">
82
+ <%= t("state", scope: "decidim.initiatives.initiatives.show") %>
83
+ </p>
84
+ <span class="initiative__aside__element__data-text">
85
+ <%= render partial: "initiative_badge", locals: { initiative: current_initiative } %>
86
+ </span>
65
87
  </div>
66
- <% end %>
67
- <%= render partial: "decidim/shared/share_modal" %>
68
- <% if allowed_to? :embed, :initiative, initiative: current_initiative %>
69
- <%= embed_modal_for initiative_widget_url(current_initiative, format: :js) %>
70
- <% end %>
71
- <%= resource_reference(current_initiative) %>
72
- <%= resource_version(current_initiative, versions_path: initiative_versions_path(current_initiative)) %>
73
- </div>
74
88
 
75
- <div class="columns mediumlarge-8 mediumlarge-pull-4">
76
- <div class="section">
77
- <div class="row column">
78
- <h2 class="heading2">
79
- <%= translated_attribute(current_initiative.title) %>
80
- </h2>
81
- <%= render partial: "author", locals: { initiative: current_initiative } %>
89
+ <% if current_initiative.offline_signature_type? || current_initiative.online_signature_type? %>
90
+ <div class="initiative__aside__element__data">
91
+ <p class="initiative__aside__element__data-title">
92
+ <%= t("signature_collection", scope: "decidim.initiatives.initiatives.show") %>
93
+ </p>
94
+ <span class="initiative__aside__element__data-text">
95
+ <span class="text-sm font-normal text-gray-2 block">
96
+ <% if current_initiative.offline_signature_type? %>
97
+ <%= t("offline", scope: "activemodel.attributes.initiative.signature_type_values") %>
98
+ <% end %>
99
+ <% if current_initiative.online_signature_type? %>
100
+ <%= t("online", scope: "activemodel.attributes.initiative.signature_type_values") %>
101
+ <% end %>
102
+ </span>
103
+ </span>
104
+ </div>
105
+ <% end %>
106
+
107
+ <div class="initiative__aside__element__data">
108
+ <p class="initiative__aside__element__data-title">
109
+ <%= t("scope", scope: "decidim.initiatives.initiatives.show") %>
110
+ </p>
111
+ <span class="initiative__aside__element__data-text">
112
+ <span class="text-sm font-normal text-gray-2 block">
113
+ <%= link_to translated_attribute(current_initiative.scope_name), initiatives_path(filter: { with_any_scope: [current_initiative.scope&.id] }) %>
114
+ </span>
115
+ </span>
82
116
  </div>
83
- <br>
84
- <div class="row column">
85
- <%= render partial: "initiative_badge", locals: { initiative: current_initiative } %>
86
- <%= decidim_sanitize_editor translated_attribute(current_initiative.description) %>
87
- <%= render partial: "tags", locals: { resource: current_initiative } %>
117
+
118
+ <div class="initiative__aside__element__data">
119
+ <p class="initiative__aside__element__data-title">
120
+ <%= t("type", scope: "decidim.initiatives.initiatives.show") %>
121
+ </p>
122
+ <span class="initiative__aside__element__data-text text-gray-2">
123
+ <%= render partial: "tags_type", locals: { resource: current_initiative } %>
124
+ </span>
88
125
  </div>
89
126
 
90
- <%= render partial: "result", locals: { initiative: current_initiative } %>
127
+ <% if current_initiative.area %>
128
+ <div class="initiative__aside__element__data">
129
+ <p class="initiative__aside__element__data-title">
130
+ <%= t("area", scope: "decidim.initiatives.initiatives.show") %>
131
+ </p>
132
+ <span class="initiative__aside__element__data-text">
133
+ <span class="text-sm font-normal text-gray-2 block">
134
+ <%= link_to translated_attribute(current_initiative.area_name), initiatives_path(filter: { with_any_area: [current_initiative.area.id] }) %>
135
+ </span>
136
+ </span>
137
+ </div>
138
+ <% end %>
139
+ </section>
140
+ </section>
141
+ <% end %>
142
+
143
+ <%= participatory_space_floating_help %>
144
+
145
+ <% if current_initiative.created? %>
146
+ <% if allowed_to? :send_to_technical_validation, :initiative, initiative: current_initiative %>
147
+ <%= cell("decidim/announcement", t(".send_to_technical_validation_announcement"), callout_class: "success") %>
148
+ <% else %>
149
+ <%= cell("decidim/announcement", t(".before_send_to_technical_validation_announcement",
150
+ count: current_initiative.missing_committee_members,
151
+ href: link_to(new_initiative_committee_request_url(current_initiative),
152
+ new_initiative_committee_request_path(current_initiative))), callout_class: "warning") %>
153
+ <% end %>
154
+ <% end %>
155
+
156
+ <% add_decidim_page_title(translated_attribute(current_initiative.title)) %>
157
+
158
+ <section class="layout-main__section layout-main__heading">
159
+ <h2 class="h2 decorator">
160
+ <%= translated_attribute(current_initiative.title) %>
161
+ </h2>
162
+ </section>
163
+
164
+ <section class="layout-main__section">
165
+ <div class="content-block__description">
166
+ <div class="editor-content">
167
+ <%= decidim_sanitize_editor translated_attribute(current_initiative.description) %>
91
168
  </div>
169
+ </div>
170
+ </section>
92
171
 
93
- <%= attachments_for current_initiative %>
172
+ <section class="layout-main__section">
173
+ <% if tabs.any? %>
174
+ <div class="mt-8" data-component="accordion" data-multiselectable="false" data-collapsible="false">
175
+ <ul class="tab-x-container">
176
+ <% tabs.each_with_index do |tab, i| %>
177
+ <li>
178
+ <button id="trigger-<%= tab[:id] %>" class="tab-x" data-controls="panel-<%= tab[:id] %>" data-open="<%= "true" if i.zero? %>">
179
+ <%= icon tab[:icon], class: "text-gray fill-current" %><%= tab[:text] %>
180
+ </button>
181
+ </li>
182
+ <% end %>
183
+ </ul>
184
+
185
+ <% panels.each do |panel| %>
186
+ <div id="panel-<%= panel[:id] %>" class="py-8">
187
+ <%= send(panel[:method], *panel[:args]) %>
188
+ </div>
189
+ <% end %>
190
+ </div>
191
+ <% end %>
192
+ </section>
193
+
194
+ <section class="layout-main__section">
195
+ <%= render partial: "result", locals: { initiative: current_initiative } %>
196
+ </section>
197
+
198
+ <section class="layout-main__section layout-main__buttons" data-buttons>
199
+ <% if current_initiative.commentable? && current_initiative.published? %>
200
+ <%= cell "decidim/comments_button", nil, display: current_initiative.commentable? && current_initiative.published? %>
201
+ <% end %>
202
+ <div class="ml-auto">
203
+ <%= cell "decidim/share_button", nil %>
94
204
  </div>
95
- </div>
205
+ </section>
96
206
 
97
- <%= comments_for current_initiative if current_initiative.commentable? && current_initiative.published? %>
207
+ <section class="layout-main__section layout-item__aside--footer">
208
+ <%= comments_for current_initiative if current_initiative.commentable? && current_initiative.published? %>
209
+ <ul class="metadata__container layout-main__section" data-metadata-footer>
210
+ <%= content_tag :li, resource_reference(current_initiative), class: "metadata__item" %>
211
+ <%= content_tag :li, resource_version(current_initiative, versions_path: initiative_version_path(current_initiative, current_initiative.versions.count)), class: "metadata__item" %>
212
+ </ul>
213
+ </section>
@@ -6,7 +6,7 @@
6
6
  <% if @initiative.promoting_committee_enabled? %>
7
7
  <p>
8
8
  <%= t "decidim.initiatives.initiatives_mailer.promotal_committee_help",
9
- member_count: Decidim::Initiatives.minimum_committee_members %>
9
+ member_count: Decidim::Initiatives.minimum_committee_members %>
10
10
  </p>
11
11
  <p>
12
12
  <%= link_to decidim_initiatives.new_initiative_committee_request_url(@initiative, host: @organization.host),
@@ -17,6 +17,6 @@
17
17
 
18
18
  <p>
19
19
  <%= t("check_initiative_details", scope: "decidim.initiatives.initiatives_mailer.initiative_link") %>
20
- <%= link_to t("here", scope: "decidim.initiatives.initiatives_mailer.initiative_link"),
20
+ <%= link_to t("here", scope: "decidim.initiatives.initiatives_mailer.initiative_link"),
21
21
  decidim_initiatives.initiative_url(@initiative, host: @organization.host) %>
22
22
  </p>
@@ -1 +1,2 @@
1
- <%= options_for_select scoped_types.map { |s| [translated_attribute(s.scope_name), s&.scope&.id] }, params[:selected] %>
1
+ <% blank = [t("select_scope", scope: "decidim.initiatives.create_initiative.fill_data"), ""] %>
2
+ <%= options_for_select scoped_types.map { |s| [translated_attribute(s.scope_name), s&.scope&.id] }.prepend(blank), params[:selected] %>
@@ -1,10 +1,19 @@
1
- <div class="row">
1
+ <% content_for :aside do %>
2
+ <%= cell(
3
+ "decidim/versions_list",
4
+ versioned_resource,
5
+ version_path: proc { |version_index| url_for(action: :show, id: version_index) },
6
+ i18n_scope: "decidim.initiatives.versions.shared"
7
+ ) %>
8
+ <% end %>
9
+
10
+ <%= render layout: "layouts/decidim/shared/layout_item" do %>
2
11
  <%= cell(
3
12
  "decidim/version",
4
13
  current_version,
5
- index: params[:id].to_i,
6
- versioned_resource: versioned_resource,
7
- versions_path: proc { url_for(action: :index) },
8
- i18n_scope: "decidim.initiatives.versions.shared"
14
+ index: params[:id],
15
+ versioned_resource:,
16
+ path: proc { |extra_params| url_for(action: :show, id: params[:id], **extra_params) },
17
+ versions_path: proc { url_for(action: :index) }
9
18
  ) %>
10
- </div>
19
+ <% end %>