decidim-initiatives 0.27.5 → 0.28.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) 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 +1 -1
  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 +12 -12
  59. data/app/events/decidim/initiatives/create_initiative_event.rb +6 -6
  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 +1 -1
  63. data/app/events/decidim/initiatives/milestone_completed_event.rb +1 -1
  64. data/app/events/decidim/initiatives/revoke_membership_request_event.rb +12 -12
  65. data/app/events/decidim/initiatives/spawn_committee_request_event.rb +12 -12
  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 +4 -61
  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 -3
  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 -70
  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 +14 -5
  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 -93
  160. data/config/locales/ca.yml +65 -104
  161. data/config/locales/cs.yml +70 -109
  162. data/config/locales/de.yml +72 -111
  163. data/config/locales/el.yml +1 -98
  164. data/config/locales/en.yml +69 -108
  165. data/config/locales/es-MX.yml +65 -104
  166. data/config/locales/es-PY.yml +65 -104
  167. data/config/locales/es.yml +65 -104
  168. data/config/locales/eu.yml +66 -105
  169. data/config/locales/fi-plain.yml +67 -106
  170. data/config/locales/fi.yml +67 -106
  171. data/config/locales/fr-CA.yml +69 -108
  172. data/config/locales/fr.yml +67 -106
  173. data/config/locales/ga-IE.yml +0 -35
  174. data/config/locales/gl.yml +1 -89
  175. data/config/locales/hu.yml +25 -105
  176. data/config/locales/id-ID.yml +1 -89
  177. data/config/locales/is-IS.yml +1 -60
  178. data/config/locales/it.yml +6 -111
  179. data/config/locales/ja.yml +62 -106
  180. data/config/locales/lb.yml +6 -86
  181. data/config/locales/lt.yml +52 -103
  182. data/config/locales/lv.yml +1 -99
  183. data/config/locales/nl.yml +6 -104
  184. data/config/locales/no.yml +6 -114
  185. data/config/locales/pl.yml +6 -119
  186. data/config/locales/pt-BR.yml +21 -119
  187. data/config/locales/pt.yml +6 -111
  188. data/config/locales/ro-RO.yml +13 -108
  189. data/config/locales/ru.yml +1 -68
  190. data/config/locales/sk.yml +1 -85
  191. data/config/locales/sl.yml +3 -5
  192. data/config/locales/sv.yml +16 -107
  193. data/config/locales/tr-TR.yml +9 -110
  194. data/config/locales/uk.yml +1 -68
  195. data/config/locales/zh-CN.yml +6 -102
  196. data/config/locales/zh-TW.yml +31 -95
  197. data/db/migrate/20171017091734_add_scopes_for_all_initiative_types.rb +1 -1
  198. data/db/migrate/20171017095143_update_initiative_scoped_type.rb +1 -1
  199. data/db/migrate/20191002082220_move_signature_type_to_initative_type.rb +1 -1
  200. data/lib/decidim/api/initiative_committee_member_type.rb +2 -2
  201. data/lib/decidim/initiatives/admin_engine.rb +13 -93
  202. data/lib/decidim/initiatives/content_blocks/registry_manager.rb +22 -0
  203. data/lib/decidim/initiatives/engine.rb +45 -23
  204. data/lib/decidim/initiatives/menu.rb +150 -0
  205. data/lib/decidim/initiatives/participatory_space.rb +6 -91
  206. data/lib/decidim/initiatives/query_extensions.rb +5 -5
  207. data/lib/decidim/initiatives/seeds.rb +95 -0
  208. data/lib/decidim/initiatives/test/factories.rb +25 -7
  209. data/lib/decidim/initiatives/version.rb +1 -1
  210. data/lib/decidim/initiatives.rb +1 -1
  211. data/lib/tasks/decidim_initiatives.rake +2 -2
  212. data/lib/tasks/initiatives/upgrade/decidim_initiatives_upgrade_tasks.rake +1 -1
  213. metadata +47 -76
  214. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +0 -28
  215. data/app/cells/decidim/initiatives/initiative_m/author.erb +0 -10
  216. data/app/cells/decidim/initiatives/initiative_m/footer.erb +0 -28
  217. data/app/cells/decidim/initiatives/initiative_m/tags.erb +0 -9
  218. data/app/cells/decidim/initiatives/initiative_m_cell.rb +0 -77
  219. data/app/controllers/decidim/initiatives/widgets_controller.rb +0 -30
  220. data/app/packs/stylesheets/decidim/initiatives/admin.scss +0 -33
  221. data/app/packs/stylesheets/decidim/initiatives/initiatives.scss +0 -64
  222. data/app/packs/stylesheets/decidim/initiatives/popularity_item.scss +0 -76
  223. data/app/packs/stylesheets/decidim/initiatives/statistics.scss +0 -15
  224. data/app/views/decidim/initiatives/create_initiative/_finish_help.html.erb +0 -2
  225. data/app/views/decidim/initiatives/create_initiative/previous_form.html.erb +0 -40
  226. data/app/views/decidim/initiatives/create_initiative/show_similar_initiatives.html.erb +0 -23
  227. data/app/views/decidim/initiatives/initiatives/_author.html.erb +0 -35
  228. data/app/views/decidim/initiatives/initiatives/_count.html.erb +0 -1
  229. data/app/views/decidim/initiatives/initiatives/_filters.html.erb +0 -33
  230. data/app/views/decidim/initiatives/initiatives/_filters_small_view.html.erb +0 -18
  231. data/app/views/decidim/initiatives/initiatives/_index_header.html.erb +0 -44
  232. data/app/views/decidim/initiatives/initiatives/_tags.html.erb +0 -7
  233. data/app/views/decidim/initiatives/versions/index.html.erb +0 -8
  234. data/config/environment.rb +0 -3
  235. data/db/seeds/city.jpeg +0 -0
  236. data/db/seeds/city2.jpeg +0 -0
  237. data/lib/decidim/initiatives/initiatives_filter_form_builder.rb +0 -56
  238. 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
@@ -125,10 +125,8 @@ ar:
125
125
  - اتبع الخطوات لإنشاء مبادرة جديدة
126
126
  description: تُمنح هذه الشارة عند إطلاق مبادرات جديدة ، وإقامة شراكة مع الآخرين لتنفيذها.
127
127
  description_another: حصل هذا المشارك على %{score} مبادرة تم نشرها.
128
- description_own: لديك %{score} مبادرات تم نشرها.
129
128
  name: المبادرات المنشورة
130
129
  next_level_in: احصل على %{score} مبادرة تم نشرها للوصول إلى المستوى التالي!
131
- unearned_another: لم يحصل هذا المشارك على أية مبادرات منشورة حتى الآن.
132
130
  unearned_own: لم تحصل على أي مبادرات منشورة بعد.
133
131
  help:
134
132
  participatory_spaces:
@@ -154,8 +152,6 @@ ar:
154
152
  index:
155
153
  approve: يوافق
156
154
  confirm_revoke: هل أنت واثق؟
157
- invite_to_committee_help: شارك هذا الرابط لدعوة مشاركين آخرين إلى لجنة المروجين
158
- no_members_yet: لا يوجد أعضاء في لجنة المروجين
159
155
  revoke: سحب
160
156
  title: أعضاء اللجنة
161
157
  content_blocks:
@@ -170,7 +166,6 @@ ar:
170
166
  export_votes: توقيعات التصدير
171
167
  reject: رفض المبادرة
172
168
  send_to_technical_validation: إرسال إلى التحقق الفني
173
- success: تم إرسال المبادرة إلى التحقق الفني
174
169
  update: تحديث
175
170
  form:
176
171
  title: معلومات عامة
@@ -178,48 +173,21 @@ ar:
178
173
  actions_title: عمل
179
174
  preview: معاينة
180
175
  print: طباعة
181
- update:
182
- error: حدث خطأ
183
- success: تم تحديث المبادرة بنجاح
184
176
  initiatives_type_scopes:
185
- create:
186
- error: حدث خطأ
187
- success: تم إنشاء نطاق جديد لنوع المبادرة المحدد
188
- destroy:
189
- success: تمت إزالة النطاق بنجاح
190
177
  edit:
191
- back: الى الخلف
192
- confirm_destroy: هل أنت واثق؟
193
- destroy: حذف
194
178
  title: تحرير نطاق نوع المبادرة
195
179
  update: تحديث
196
180
  new:
197
- back: الى الخلف
198
181
  create: إنشاء
199
182
  title: إنشاء نطاق نوع المبادرة
200
- update:
201
- error: حدث خطأ
202
- success: تم تحديث النطاق بنجاح
203
183
  initiatives_types:
204
- create:
205
- error: حدث خطأ
206
- success: تم إنشاء نوع مبادرة جديد بنجاح
207
- destroy:
208
- success: تمت إزالة نوع المبادرة بنجاح
209
184
  edit:
210
- confirm_destroy: هل أنت واثق؟
211
- destroy: حذف
212
185
  update: تحديث
213
- form:
214
- title: معلومات عامة
215
186
  initiative_type_scopes:
216
187
  title: نطاقات لنوع المبادرة
217
188
  new:
218
189
  create: إنشاء
219
190
  title: نوع المبادرة الجديدة
220
- update:
221
- error: حدث خطأ
222
- success: تم تحديث نوع المبادرة بنجاح
223
191
  admin_log:
224
192
  initiative:
225
193
  publish: "%{user_name} نشرت المبادرة %{resource_name}"
@@ -232,10 +200,6 @@ ar:
232
200
  published: نشرت
233
201
  validating: المصادقة الفنية
234
202
  application_helper:
235
- filter_area_values:
236
- all: الكل
237
- filter_scope_values:
238
- all: الكل
239
203
  filter_state_values:
240
204
  all: الكل
241
205
  closed: مغلق
@@ -245,7 +209,6 @@ ar:
245
209
  committee_requests:
246
210
  new:
247
211
  continue: استمر
248
- help_text: أنت على وشك أن تصبح عضوًا في لجنة الترويج لهذه المبادرة
249
212
  spawn:
250
213
  success: تم إرسال طلبك إلى مؤلف المبادرة.
251
214
  content_blocks:
@@ -265,24 +228,15 @@ ar:
265
228
  previous_form:
266
229
  back: الى الخلف
267
230
  continue: استمر
268
- help: ماذا تتكون المبادرة؟ اكتب العنوان والوصف. نوصي بعنوان قصير وموجز ووصف يركز على الحل المقترح.
269
- more_information: "(معلومات اكثر)"
270
231
  promotal_committee:
271
- back: الى الخلف
272
232
  more_information: "(معلومات اكثر)"
273
233
  select_initiative_type:
274
234
  back: الى الخلف
275
235
  choose_html: أريد إنشاء <strong>%{title}</strong>
276
- more_information: "(معلومات اكثر)"
236
+ more_information: (معلومات اكثر)
277
237
  select: أريد أن أشجع هذه المبادرة
278
238
  share_committee_link:
279
- continue: استمر
280
239
  invite_to_committee_help: رابط لدعوة الأشخاص الذين سيكونون جزءًا من لجنة المروجين
281
- show_similar_initiatives:
282
- back: الى الخلف
283
- compare_help: إذا كانت أي من المبادرات التالية تشبه مبادراتك ، فنحن نشجعك على التوقيع عليها. سيكون لديك اقتراح المزيد من الاحتمالات لإنجازه.
284
- continue: مبادرتي مختلفة
285
- more_information: "(معلومات اكثر)"
286
240
  events:
287
241
  create_initiative_event:
288
242
  email_intro: "%{author_name} %{author_nickname}، الذي تتابعه ، بإنشاء مبادرة جديدة والتحقق منها والمساهمة فيها:"
@@ -294,18 +248,9 @@ ar:
294
248
  email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{author_nickname}. يمكنك إيقاف تلقي الإخطارات باتباع الرابط السابق.
295
249
  email_subject: المبادرة التي أقرتها %{author_nickname}
296
250
  notification_title: تمت الموافقة على مبادرة <a href="%{resource_path}">%{resource_title}</a> من قبل <a href="%{author_path}">%{author_name} %{author_nickname}</a>.
297
- form:
298
- delete_attachment: حذف
299
- index:
300
- title: المبادرات
301
251
  initiative_signatures:
302
252
  fill_personal_data:
303
253
  continue: استمر
304
- date_select:
305
- day: يوم
306
- month: شهر
307
- year: عام
308
- help: يرجى ملء الحقول التالية ببياناتك الشخصية لتوقيع المبادرة
309
254
  finish:
310
255
  back_to_initiative: العودة إلى المبادرة
311
256
  sms_code:
@@ -313,21 +258,14 @@ ar:
313
258
  help: تحقق من الرسائل القصيرة المستلمة على هاتفك
314
259
  sms_phone_number:
315
260
  continue: ارسل لي رسالة
316
- help: املأ النموذج برقم هاتفك الذي تم التحقق منه لطلب رمز التحقق
317
261
  initiative_votes:
318
262
  create:
319
263
  error: كانت هناك مشكلة في توقيع المبادرة.
320
- invalid: البيانات المقدمة للتوقيع على المبادرة غير صالحة
321
- success_html: تهانينا! و <strong> %{title}</strong> تم توقيع المبادرة بنجاح
322
264
  personal_data:
323
265
  invalid: البيانات الشخصية لا تتفق مع البيانات المقدمة للترخيص.
324
- sms_code:
325
- invalid: رمز التحقق الخاص بك لا يطابق رمزنا. يرجى التحقق مرة أخرى من الرسائل القصيرة التي أرسلناها إليك.
326
266
  sms_phone:
327
267
  invalid: رقم الهاتف غير صالح أو قيد التفويض. من فضلك ، تحقق من التراخيص الخاصة بك.
328
268
  initiatives:
329
- author:
330
- deleted: تم الحذف
331
269
  author_list:
332
270
  hidden_authors_count:
333
271
  zero: و %{count} المزيد من الناس
@@ -336,9 +274,6 @@ ar:
336
274
  few: و %{count} المزيد من الناس
337
275
  many: و %{count} المزيد من الناس
338
276
  other: و %{count} المزيد من الناس
339
- committee_members:
340
- confirm_revoke: هل أنت واثق؟
341
- revoke: سحب
342
277
  count:
343
278
  title:
344
279
  zero: "%{count} مبادرات"
@@ -351,14 +286,8 @@ ar:
351
286
  any: أي
352
287
  author: مؤلف
353
288
  myself: مبادراتي
354
- search: بحث
355
289
  state: الحالة
356
290
  type: نوع
357
- filters_small_view:
358
- close_modal: أغلق النافذة
359
- filter: منقي
360
- filter_by: مصنف بواسطة
361
- unfold: كشف
362
291
  index_header:
363
292
  new_initiative: مبادرة جديدة
364
293
  interactions:
@@ -383,8 +312,6 @@ ar:
383
312
  description: 'الوصف:'
384
313
  result:
385
314
  initiative_rejected_reason: تم رفض هذه المبادرة بسبب افتقارها للتوقيعات.
386
- show:
387
- follow_description: تلقي إشعار عند وجود أخبار في هذه المبادرة
388
315
  signatures_count:
389
316
  zero: " التوقيعات"
390
317
  one: " التوقيع"
@@ -406,8 +333,6 @@ ar:
406
333
  few: التوقيعات
407
334
  many: التوقيعات
408
335
  other: التوقيعات
409
- most_popular_initiative: المبادرة الأكثر شعبية
410
- need_more_votes: بحاجة الى مزيد من التوقيعات
411
336
  initiatives_mailer:
412
337
  creation_subject: تم إنشاء مبادرتك "%{title}"
413
338
  initiative_link:
@@ -419,8 +344,6 @@ ar:
419
344
  promotal_committee_help: تذكر أنه يجب دعوة %{member_count} شخصًا على الأقل إلى لجنة المروجين. أرسل الرابط التالي لدعوة الناس إلى لجنة المروجين
420
345
  status_change_body_for: 'لقد غيرت المبادرة %{title} حالتها إلى: %{state}'
421
346
  status_change_for: لقد غيرت المبادرة %{title} حالتها
422
- last_activity:
423
- new_initiative: مبادرة جديدة
424
347
  show:
425
348
  badge_name:
426
349
  accepted: ما يكفي من التوقيعات
@@ -439,31 +362,16 @@ ar:
439
362
  layouts:
440
363
  decidim:
441
364
  initiative_creation_header:
442
- back: الى الخلف
443
365
  fill_data: إنشاء
444
366
  finish: إنهاء
445
- previous_form: بداية
446
367
  promotal_committee: لجنة المروجين
447
368
  select_initiative_type: أختر
448
- show_similar_initiatives: قارن
449
- step: الخطوة %{current} من %{total}
450
- title: ابتكار مبادرة جديدة
451
- initiative_header:
452
- initiative_menu_item: مبادرة
453
369
  initiative_signature_creation_header:
454
- back: الى الخلف
455
370
  fill_personal_data: أكمل بياناتك
456
371
  finish: إنهاء
457
- finished: تم إنشاء توقيع المبادرة
458
- see_steps: انظر الخطوات
459
- select_identity: حدد الهوية
460
372
  sms_code: التحقق من رمز SMS
461
373
  sms_phone_number: رقم الهاتف الجوال
462
- step: الخطوة %{current} من %{total}
463
374
  title: تسجيل %{initiative_title}
464
375
  initiatives:
465
- initiative:
466
- check: تحقق من ذلك
467
- check_and_support: التحقق من ذلك وتوقيع
468
376
  no_initiatives_yet:
469
377
  no_initiatives_yet: لا توجد مبادرات حتى الآن!