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,29 +1,18 @@
1
- <div class="columns large-3">
2
- <div class="m-bottom">
3
- <%= link_to :back do %>
4
- <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %> <%= t(".back") %>
5
- <% end %>
6
- </div>
7
- <div class="section">
8
- <p>
9
- <%= t(".title") %>
10
- </p>
11
- </div>
12
- <div class="show-for-large">
13
- <ol class="wizard__steps">
14
- <% wizard_steps.each do |wizard_step| %>
15
- <% next if wizard_step.to_s == "promotal_committee" && !promotal_committee_required? %>
16
- <% next if wizard_step.to_s == "select_initiative_type" && single_initiative_type? %>
17
- <% if step == wizard_step %>
18
- <li class="step--active">
19
- <%= t(".#{wizard_step}") %>
20
- </li>
21
- <% else %>
22
- <li>
23
- <%= t(".#{wizard_step}") %>
24
- </li>
25
- <% end %>
26
- <% end %>
27
- </ol>
28
- </div>
1
+ <div class="flex justify-center">
2
+ <h1 class="title-decorator my-12">
3
+ <%= t("new", scope: "decidim.initiatives.create_initiative.select_initiative_type") %>
4
+ </h1>
29
5
  </div>
6
+
7
+ <ol id="wizard-steps" class="wizard-steps">
8
+ <% options = { data: { active: true }, aria: { current: "step" } } %>
9
+
10
+ <% unless single_initiative_type? %>
11
+ <%= content_tag :li, t(".select_initiative_type"), action_name == "select_initiative_type" ? options : {} %>
12
+ <% end %>
13
+ <%= content_tag :li, t(".fill_data"), action_name == "fill_data" ? options : {} %>
14
+ <% if promotal_committee_required? %>
15
+ <%= content_tag :li, t(".promotal_committee"), action_name == "promotal_committee" ? options : {} %>
16
+ <% end %>
17
+ <%= content_tag :li, t(".finish"), action_name == "finish" ? options : {} %>
18
+ </ol>
@@ -6,12 +6,12 @@
6
6
  <div class="process-header__container row collapse column">
7
7
  <div class="columns mediumlarge-8 process-header__info">
8
8
  <div>
9
- <h1 class="text-highlight heading2">
9
+ <h1>
10
10
  <%= participatory_space_helpers.translated_attribute(current_participatory_space.title) %>
11
11
  </h1>
12
12
  </div>
13
13
  <div>
14
- <p class="text-highlight heading-small">
14
+ <p>
15
15
  <% if current_participatory_space.hashtag.present? %>
16
16
  <span class="process-header__hashtag">
17
17
  <%= link_to "##{current_participatory_space.hashtag}", twitter_hashtag_url(current_participatory_space.hashtag), target: "_blank" %>
@@ -21,27 +21,7 @@
21
21
  </p>
22
22
  </div>
23
23
  </div>
24
- <%= render partial: "layouts/decidim/initiative_header_steps", locals: { initiative: current_participatory_space } %>
25
24
  </div>
26
25
  </div>
27
- <%
28
- components = current_participatory_space.components.published.or(Decidim::Component.where(id: self.try(:current_component)))
29
- %>
30
-
31
- <%=
32
- extended_navigation_bar([
33
- {
34
- name: t(".initiative_menu_item"),
35
- url: decidim_initiatives.initiative_path(current_participatory_space),
36
- active: is_active_link?(decidim_initiatives.initiative_path(current_participatory_space), :exclusive) ||
37
- is_active_link?(decidim_initiatives.initiative_versions_path(current_participatory_space), :inclusive)
38
- }
39
- ] + components.map do |component|
40
- {
41
- name: translated_attribute(component.name),
42
- url: main_component_path(component),
43
- active: is_active_link?(main_component_path(component), :inclusive)
44
- }
45
- end)
46
- %>
26
+ <%= extended_navigation_bar(initiative_nav_items(current_participatory_space)) %>
47
27
  </div>
@@ -1,16 +1,8 @@
1
1
  <% if initiative.has_signature_interval_defined? %>
2
- <div class="columns mediumlarge-4">
3
- <div class="process-header__phase">
4
- <div>
5
- <span class="phase-title">
6
- <%= t("signature_interval.title", scope: "decidim.initiatives") %>
7
- </span>
8
- <span class="phase-date">
9
- <%= l(initiative.signature_start_date, format: :default) %>
10
- -
11
- <%= l(initiative.signature_end_date, format: :default) %>
12
- </span>
13
- </div>
2
+ <div class="initiatives__card__grid-metadata-dates">
3
+ <div class="flex items-center text-center justify-center">
4
+ <%= icon "calendar-line", class: "fill-gray mr-1" %>
5
+ <%= format_date_range(initiative.signature_start_date, initiative.signature_end_date) %>
14
6
  </div>
15
7
  </div>
16
8
  <% end %>
@@ -1,27 +1,6 @@
1
- <div class="columns large-3">
2
- <div class="m-bottom">
3
- <%= link_to initiative_path current_initiative do %>
4
- <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %> <%= t(".back") %>
5
- <% end %>
6
- </div>
7
- <div class="section">
8
- <p>
9
- <%= t(".title", initiative_title: translated_attribute(current_initiative.title)) %>
10
- </p>
11
- </div>
12
- <div class="show-for-large">
13
- <ol class="wizard__steps">
14
- <% wizard_steps.each do |wizard_step| %>
15
- <% if step == wizard_step %>
16
- <li class="step--active">
17
- <%= t(".#{wizard_step}") %>
18
- </li>
19
- <% else %>
20
- <li>
21
- <%= t(".#{wizard_step}") %>
22
- </li>
23
- <% end %>
24
- <% end %>
25
- </ol>
26
- </div>
1
+ <div class="flex justify-center">
2
+ <h1 class="title-decorator my-12">
3
+ <%= t(".title", initiative_title: translated_attribute(current_initiative.title)) %>
4
+ </h1>
27
5
  </div>
6
+ <%= render partial: "wizard_steps" %>
@@ -1,17 +1,16 @@
1
- <% content_for :sidebar_menu_nav do %>
2
- <%= sidebar_menu(:admin_initiative_menu).render do
3
- public_page_link decidim_initiatives.initiative_path(current_participatory_space)
4
- end %>
5
- <% end %>
1
+ <% add_secondary_root_menu(:admin_initiative_menu) %>
6
2
 
7
- <%= render "layouts/decidim/admin/application" do %>
8
- <div class="process-title">
9
- <div class="process-title-content">
10
- <%= link_to translated_attribute(current_participatory_space.title), decidim_initiatives.initiative_path(current_participatory_space), target: "_blank" %>
11
- </div>
3
+ <% content_for :breadcrumb_context_menu do %>
4
+ <div class="process-title-content-breadcrumb-container-right">
5
+ <%= link_to decidim_initiatives.initiative_path(current_participatory_space), class: "button button__sm button__transparent process-title-content-breadcrumb-container-right-link", target: "_blank", data: { "external-link": false } do %>
6
+ <%= icon "eye-line" %>
7
+ <span>
8
+ <%= t("see_initiative", scope: "decidim.admin.menu.initiatives_menu") %>
9
+ </span>
10
+ <% end %>
12
11
  </div>
12
+ <% end %>
13
13
 
14
- <div class="process-content">
15
- <%= yield %>
16
- </div>
14
+ <%= render "layouts/decidim/admin/application" do %>
15
+ <%= yield %>
17
16
  <% end %>
@@ -1,15 +1,44 @@
1
- <% content_for :sidebar_menu_nav do %>
2
- <%= sidebar_menu(:admin_initiatives_menu).render %>
3
- <% end %>
4
-
5
- <%= render "layouts/decidim/admin/application" do %>
6
- <div class="process-title">
7
- <div class="process-title-content">
8
- <%= link_to t("decidim.admin.titles.initiatives"), decidim_initiatives.initiatives_path, target: "_blank" %>
1
+ <% content_for :breadcrumb_context_menu do %>
2
+ <div class="inline-block relative">
3
+ <%= button_tag data: { component: "dropdown", target: "initiatives-dropdown-menu-settings" }, class: "dropdown__trigger button button__transparent" do %>
4
+ <%= t("actions.manage", scope: "decidim.admin") %>
5
+ <%= icon "arrow-down-s-line" %>
6
+ <% end %>
7
+ <div id="initiatives-dropdown-menu-settings" aria-hidden="true">
8
+ <ul class="dropdown dropdown__bottom">
9
+ <li class="dropdown__item">
10
+ <% if allowed_to?(:index, :initiative) %>
11
+ <%= icon "lightbulb-flash-line" %>
12
+ <%= link_to t("menu.initiatives", scope: "decidim.admin"),
13
+ decidim_admin_initiatives.initiatives_path,
14
+ class: "text-secondary" %>
15
+ <% end %>
16
+ </li>
17
+ <li class="dropdown__item">
18
+ <% if allowed_to?(:manage, :initiative_type) %>
19
+ <%= icon "layout-masonry-line" %>
20
+ <%= link_to t("menu.initiatives_types", scope: "decidim.admin"),
21
+ decidim_admin_initiatives.initiatives_types_path,
22
+ class: "text-secondary" %>
23
+ <% end %>
24
+ </li>
25
+ <li class="dropdown__item">
26
+ <% if allowed_to?(:update, :initiatives_settings) %>
27
+ <%= icon "tools-line" %>
28
+ <%= link_to t("menu.initiatives_settings", scope: "decidim.admin"),
29
+ decidim_admin_initiatives.edit_initiatives_setting_path(
30
+ Decidim::InitiativesSettings.find_or_create_by!(
31
+ organization: current_organization
32
+ )
33
+ ),
34
+ class: "text-secondary" %>
35
+ <% end %>
36
+ </li>
37
+ </ul>
9
38
  </div>
10
39
  </div>
40
+ <% end %>
11
41
 
12
- <div class="process-content">
13
- <%= yield %>
14
- </div>
42
+ <%= render "layouts/decidim/admin/application" do %>
43
+ <%= yield %>
15
44
  <% end %>
@@ -1,16 +1,21 @@
1
+ <%= append_javascript_pack_tag "decidim_initiatives" %>
2
+ <%= append_stylesheet_pack_tag "decidim_initiatives", media: "all" %>
3
+
4
+ <% provide :meta_image_url, current_participatory_space.type.attached_uploader(:banner_image).path %>
5
+
1
6
  <%= render "layouts/decidim/application" do %>
2
- <%= render partial: "layouts/decidim/initiative_header" %>
3
- <%= cell "decidim/translation_bar", current_organization %>
4
- <div class="wrapper">
5
- <%= yield %>
6
- </div>
7
- <% if content_for? :expanded %>
8
- <div class="expanded">
9
- <div class="wrapper wrapper--inner">
10
- <div class="row">
11
- <%= yield :expanded %>
7
+ <%= render layout: "layouts/decidim/shared/layout_center" do %>
8
+ <main>
9
+ <%= yield %>
10
+ </main>
11
+ <% if content_for? :expanded %>
12
+ <div class="expanded">
13
+ <div class="wrapper wrapper--inner">
14
+ <div class="row">
15
+ <%= yield :expanded %>
16
+ </div>
12
17
  </div>
13
18
  </div>
14
- </div>
19
+ <% end %>
15
20
  <% end %>
16
21
  <% end %>
@@ -1,21 +1,10 @@
1
- <%= render "layouts/decidim/application" do %>
2
- <% if wizard_steps.first == step %>
3
- <div class="wrapper">
4
- <%= yield %>
5
- </div>
6
- <% else %>
7
- <div class="wrapper">
8
- <div class="row">
9
- <%= render partial: "layouts/decidim/initiative_creation_header" %>
10
- <div class="columns large-6">
11
- <%= yield %>
12
- </div>
13
- <div class="columns large-3"></div>
14
- </div>
15
- </div>
16
- <% end %>
1
+ <%= append_javascript_pack_tag "decidim_initiatives" %>
2
+ <%= append_stylesheet_pack_tag "decidim_initiatives", media: "all" %>
3
+ <%= append_stylesheet_pack_tag "decidim_verifications", media: "all" %>
17
4
 
18
- <% content_for :js_content do %>
19
- <%= javascript_pack_tag "decidim_initiatives" %>
5
+ <%= render "layouts/decidim/application" do %>
6
+ <%= render layout: "layouts/decidim/shared/layout_center" do %>
7
+ <%= render partial: "layouts/decidim/initiative_creation_header" %>
8
+ <%= yield %>
20
9
  <% end %>
21
10
  <% end %>
@@ -0,0 +1,15 @@
1
+ <%= append_javascript_pack_tag "decidim_initiatives" %>
2
+ <%= append_stylesheet_pack_tag "decidim_initiatives", media: "all" %>
3
+
4
+ <% provide :meta_image_url, current_initiative.type.attached_uploader(:banner_image).path %>
5
+
6
+ <%= render partial: "layouts/decidim/header/follow_space_menu_bar_button", locals: { participatory_space: current_participatory_space } %>
7
+
8
+ <%= render "layouts/decidim/application" do %>
9
+ <%= render partial: "decidim/initiatives/initiatives/initiative_hero" %>
10
+ <%= render layout:"layouts/decidim/shared/layout_two_col", locals: { reverse: true, main_enabled: false } do %>
11
+ <main>
12
+ <%= yield %>
13
+ </main>
14
+ <% end %>
15
+ <% end %>
@@ -1,15 +1,7 @@
1
1
  <%= render "layouts/decidim/application" do %>
2
- <div class="wrapper">
3
- <div class="row">
2
+ <%= render layout:"layouts/decidim/shared/layout_center", locals: { main_enabled: false } do %>
4
3
  <%= render partial: "layouts/decidim/initiative_signature_creation_header" %>
5
- <div class="columns large-6">
6
- <%= yield %>
7
- </div>
8
- <div class="columns large-3"></div>
9
- </div>
10
- </div>
11
-
12
- <% content_for :js_content do %>
13
- <%= javascript_pack_tag "decidim_initiatives" %>
4
+ <%= yield %>
5
+ <%= append_javascript_pack_tag "decidim_initiatives" %>
14
6
  <% end %>
15
7
  <% end %>
data/config/assets.rb CHANGED
@@ -9,4 +9,3 @@ Decidim::Webpacker.register_entrypoints(
9
9
  decidim_initiatives_print: "#{base_path}/app/packs/entrypoints/decidim_initiatives_print.js",
10
10
  decidim_initiatives_initiatives_votes: "#{base_path}/app/packs/entrypoints/decidim_initiatives_initiatives_votes.js"
11
11
  )
12
- Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/initiatives/initiatives")
@@ -11,7 +11,7 @@
11
11
  # https://github.com/mileszs/wicked_pdf/blob/master/README.md
12
12
 
13
13
  WickedPdf.config = {
14
- # Path to the wkhtmltopdf executable: This usually isn't needed if using
14
+ # Path to the wkhtmltopdf executable: This usually is not needed if using
15
15
  # one of the wkhtmltopdf-binary family of gems.
16
16
  # exe_path: '/usr/local/bin/wkhtmltopdf',
17
17
  # or
@@ -63,9 +63,7 @@ ar:
63
63
  components: المكونات
64
64
  information: معلومات
65
65
  initiatives: المبادرات
66
- initiatives_settings: الإعدادات
67
66
  initiatives_types: أنواع المبادرة
68
- moderations: الإشراف
69
67
  models:
70
68
  initiatives:
71
69
  fields:
@@ -127,10 +125,8 @@ ar:
127
125
  - اتبع الخطوات لإنشاء مبادرة جديدة
128
126
  description: تُمنح هذه الشارة عند إطلاق مبادرات جديدة ، وإقامة شراكة مع الآخرين لتنفيذها.
129
127
  description_another: حصل هذا المشارك على %{score} مبادرة تم نشرها.
130
- description_own: لديك %{score} مبادرات تم نشرها.
131
128
  name: المبادرات المنشورة
132
129
  next_level_in: احصل على %{score} مبادرة تم نشرها للوصول إلى المستوى التالي!
133
- unearned_another: لم يحصل هذا المشارك على أية مبادرات منشورة حتى الآن.
134
130
  unearned_own: لم تحصل على أي مبادرات منشورة بعد.
135
131
  help:
136
132
  participatory_spaces:
@@ -156,8 +152,6 @@ ar:
156
152
  index:
157
153
  approve: يوافق
158
154
  confirm_revoke: هل أنت واثق؟
159
- invite_to_committee_help: شارك هذا الرابط لدعوة مشاركين آخرين إلى لجنة المروجين
160
- no_members_yet: لا يوجد أعضاء في لجنة المروجين
161
155
  revoke: سحب
162
156
  title: أعضاء اللجنة
163
157
  content_blocks:
@@ -172,57 +166,28 @@ ar:
172
166
  export_votes: توقيعات التصدير
173
167
  reject: رفض المبادرة
174
168
  send_to_technical_validation: إرسال إلى التحقق الفني
175
- success: تم إرسال المبادرة إلى التحقق الفني
176
169
  update: تحديث
177
170
  form:
178
- settings: الإعدادات
179
171
  title: معلومات عامة
180
172
  index:
181
173
  actions_title: عمل
182
174
  preview: معاينة
183
175
  print: طباعة
184
- update:
185
- error: حدث خطأ
186
- success: تم تحديث المبادرة بنجاح
187
176
  initiatives_type_scopes:
188
- create:
189
- error: حدث خطأ
190
- success: تم إنشاء نطاق جديد لنوع المبادرة المحدد
191
- destroy:
192
- success: تمت إزالة النطاق بنجاح
193
177
  edit:
194
- back: الى الخلف
195
- confirm_destroy: هل أنت واثق؟
196
- destroy: حذف
197
178
  title: تحرير نطاق نوع المبادرة
198
179
  update: تحديث
199
180
  new:
200
- back: الى الخلف
201
181
  create: إنشاء
202
182
  title: إنشاء نطاق نوع المبادرة
203
- update:
204
- error: حدث خطأ
205
- success: تم تحديث النطاق بنجاح
206
183
  initiatives_types:
207
- create:
208
- error: حدث خطأ
209
- success: تم إنشاء نوع مبادرة جديد بنجاح
210
- destroy:
211
- success: تمت إزالة نوع المبادرة بنجاح
212
184
  edit:
213
- confirm_destroy: هل أنت واثق؟
214
- destroy: حذف
215
185
  update: تحديث
216
- form:
217
- title: معلومات عامة
218
186
  initiative_type_scopes:
219
187
  title: نطاقات لنوع المبادرة
220
188
  new:
221
189
  create: إنشاء
222
190
  title: نوع المبادرة الجديدة
223
- update:
224
- error: حدث خطأ
225
- success: تم تحديث نوع المبادرة بنجاح
226
191
  admin_log:
227
192
  initiative:
228
193
  publish: "%{user_name} نشرت المبادرة %{resource_name}"
@@ -235,10 +200,6 @@ ar:
235
200
  published: نشرت
236
201
  validating: المصادقة الفنية
237
202
  application_helper:
238
- filter_area_values:
239
- all: الكل
240
- filter_scope_values:
241
- all: الكل
242
203
  filter_state_values:
243
204
  all: الكل
244
205
  closed: مغلق
@@ -248,7 +209,6 @@ ar:
248
209
  committee_requests:
249
210
  new:
250
211
  continue: استمر
251
- help_text: أنت على وشك أن تصبح عضوًا في لجنة الترويج لهذه المبادرة
252
212
  spawn:
253
213
  success: تم إرسال طلبك إلى مؤلف المبادرة.
254
214
  content_blocks:
@@ -268,24 +228,15 @@ ar:
268
228
  previous_form:
269
229
  back: الى الخلف
270
230
  continue: استمر
271
- help: ماذا تتكون المبادرة؟ اكتب العنوان والوصف. نوصي بعنوان قصير وموجز ووصف يركز على الحل المقترح.
272
- more_information: "(معلومات اكثر)"
273
231
  promotal_committee:
274
- back: الى الخلف
275
232
  more_information: "(معلومات اكثر)"
276
233
  select_initiative_type:
277
234
  back: الى الخلف
278
235
  choose_html: أريد إنشاء <strong>%{title}</strong>
279
- more_information: "(معلومات اكثر)"
236
+ more_information: (معلومات اكثر)
280
237
  select: أريد أن أشجع هذه المبادرة
281
238
  share_committee_link:
282
- continue: استمر
283
239
  invite_to_committee_help: رابط لدعوة الأشخاص الذين سيكونون جزءًا من لجنة المروجين
284
- show_similar_initiatives:
285
- back: الى الخلف
286
- compare_help: إذا كانت أي من المبادرات التالية تشبه مبادراتك ، فنحن نشجعك على التوقيع عليها. سيكون لديك اقتراح المزيد من الاحتمالات لإنجازه.
287
- continue: مبادرتي مختلفة
288
- more_information: "(معلومات اكثر)"
289
240
  events:
290
241
  create_initiative_event:
291
242
  email_intro: "%{author_name} %{author_nickname}، الذي تتابعه ، بإنشاء مبادرة جديدة والتحقق منها والمساهمة فيها:"
@@ -297,18 +248,9 @@ ar:
297
248
  email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{author_nickname}. يمكنك إيقاف تلقي الإخطارات باتباع الرابط السابق.
298
249
  email_subject: المبادرة التي أقرتها %{author_nickname}
299
250
  notification_title: تمت الموافقة على مبادرة <a href="%{resource_path}">%{resource_title}</a> من قبل <a href="%{author_path}">%{author_name} %{author_nickname}</a>.
300
- form:
301
- delete_attachment: حذف
302
- index:
303
- title: المبادرات
304
251
  initiative_signatures:
305
252
  fill_personal_data:
306
253
  continue: استمر
307
- date_select:
308
- day: يوم
309
- month: شهر
310
- year: عام
311
- help: يرجى ملء الحقول التالية ببياناتك الشخصية لتوقيع المبادرة
312
254
  finish:
313
255
  back_to_initiative: العودة إلى المبادرة
314
256
  sms_code:
@@ -316,21 +258,14 @@ ar:
316
258
  help: تحقق من الرسائل القصيرة المستلمة على هاتفك
317
259
  sms_phone_number:
318
260
  continue: ارسل لي رسالة
319
- help: املأ النموذج برقم هاتفك الذي تم التحقق منه لطلب رمز التحقق
320
261
  initiative_votes:
321
262
  create:
322
263
  error: كانت هناك مشكلة في توقيع المبادرة.
323
- invalid: البيانات المقدمة للتوقيع على المبادرة غير صالحة
324
- success_html: تهانينا! و <strong> %{title}</strong> تم توقيع المبادرة بنجاح
325
264
  personal_data:
326
265
  invalid: البيانات الشخصية لا تتفق مع البيانات المقدمة للترخيص.
327
- sms_code:
328
- invalid: رمز التحقق الخاص بك لا يطابق رمزنا. يرجى التحقق مرة أخرى من الرسائل القصيرة التي أرسلناها إليك.
329
266
  sms_phone:
330
267
  invalid: رقم الهاتف غير صالح أو قيد التفويض. من فضلك ، تحقق من التراخيص الخاصة بك.
331
268
  initiatives:
332
- author:
333
- deleted: تم الحذف
334
269
  author_list:
335
270
  hidden_authors_count:
336
271
  zero: و %{count} المزيد من الناس
@@ -339,9 +274,6 @@ ar:
339
274
  few: و %{count} المزيد من الناس
340
275
  many: و %{count} المزيد من الناس
341
276
  other: و %{count} المزيد من الناس
342
- committee_members:
343
- confirm_revoke: هل أنت واثق؟
344
- revoke: سحب
345
277
  count:
346
278
  title:
347
279
  zero: "%{count} مبادرات"
@@ -354,14 +286,8 @@ ar:
354
286
  any: أي
355
287
  author: مؤلف
356
288
  myself: مبادراتي
357
- search: بحث
358
289
  state: الحالة
359
290
  type: نوع
360
- filters_small_view:
361
- close_modal: أغلق النافذة
362
- filter: منقي
363
- filter_by: مصنف بواسطة
364
- unfold: كشف
365
291
  index_header:
366
292
  new_initiative: مبادرة جديدة
367
293
  interactions:
@@ -386,8 +312,6 @@ ar:
386
312
  description: 'الوصف:'
387
313
  result:
388
314
  initiative_rejected_reason: تم رفض هذه المبادرة بسبب افتقارها للتوقيعات.
389
- show:
390
- follow_description: تلقي إشعار عند وجود أخبار في هذه المبادرة
391
315
  signatures_count:
392
316
  zero: " التوقيعات"
393
317
  one: " التوقيع"
@@ -409,8 +333,6 @@ ar:
409
333
  few: التوقيعات
410
334
  many: التوقيعات
411
335
  other: التوقيعات
412
- most_popular_initiative: المبادرة الأكثر شعبية
413
- need_more_votes: بحاجة الى مزيد من التوقيعات
414
336
  initiatives_mailer:
415
337
  creation_subject: تم إنشاء مبادرتك "%{title}"
416
338
  initiative_link:
@@ -422,8 +344,6 @@ ar:
422
344
  promotal_committee_help: تذكر أنه يجب دعوة %{member_count} شخصًا على الأقل إلى لجنة المروجين. أرسل الرابط التالي لدعوة الناس إلى لجنة المروجين
423
345
  status_change_body_for: 'لقد غيرت المبادرة %{title} حالتها إلى: %{state}'
424
346
  status_change_for: لقد غيرت المبادرة %{title} حالتها
425
- last_activity:
426
- new_initiative: مبادرة جديدة
427
347
  show:
428
348
  badge_name:
429
349
  accepted: ما يكفي من التوقيعات
@@ -442,31 +362,16 @@ ar:
442
362
  layouts:
443
363
  decidim:
444
364
  initiative_creation_header:
445
- back: الى الخلف
446
365
  fill_data: إنشاء
447
366
  finish: إنهاء
448
- previous_form: بداية
449
367
  promotal_committee: لجنة المروجين
450
368
  select_initiative_type: أختر
451
- show_similar_initiatives: قارن
452
- step: الخطوة %{current} من %{total}
453
- title: ابتكار مبادرة جديدة
454
- initiative_header:
455
- initiative_menu_item: مبادرة
456
369
  initiative_signature_creation_header:
457
- back: الى الخلف
458
370
  fill_personal_data: أكمل بياناتك
459
371
  finish: إنهاء
460
- finished: تم إنشاء توقيع المبادرة
461
- see_steps: انظر الخطوات
462
- select_identity: حدد الهوية
463
372
  sms_code: التحقق من رمز SMS
464
373
  sms_phone_number: رقم الهاتف الجوال
465
- step: الخطوة %{current} من %{total}
466
374
  title: تسجيل %{initiative_title}
467
375
  initiatives:
468
- initiative:
469
- check: تحقق من ذلك
470
- check_and_support: التحقق من ذلك وتوقيع
471
376
  no_initiatives_yet:
472
377
  no_initiatives_yet: لا توجد مبادرات حتى الآن!