decidim-initiatives 0.27.4 → 0.28.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -3
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell.rb +17 -18
- data/app/cells/decidim/initiatives/initiative_cell.rb +6 -1
- data/app/cells/decidim/initiatives/initiative_dropdown_metadata_cell.rb +19 -0
- data/app/cells/decidim/initiatives/initiative_g_cell.rb +31 -0
- data/app/cells/decidim/initiatives/initiative_metadata_g_cell.rb +62 -0
- data/app/cells/decidim/initiatives/initiative_s_cell.rb +15 -0
- data/app/cells/decidim/initiatives_votes/vote/show.erb +25 -19
- data/app/cells/decidim/initiatives_votes/vote_cell.rb +3 -1
- data/app/commands/decidim/initiatives/admin/accept_initiative.rb +40 -0
- data/app/commands/decidim/initiatives/admin/create_initiative_type.rb +1 -1
- data/app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb +1 -1
- data/app/commands/decidim/initiatives/admin/discard_initiative.rb +40 -0
- data/app/commands/decidim/initiatives/admin/publish_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/admin/reject_initiative.rb +40 -0
- data/app/commands/decidim/initiatives/admin/send_initiative_to_technical_validation.rb +2 -2
- data/app/commands/decidim/initiatives/admin/unpublish_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative_answer.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative_type.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative_type_scope.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiatives_settings.rb +1 -1
- data/app/commands/decidim/initiatives/attachment_methods.rb +2 -24
- data/app/commands/decidim/initiatives/create_initiative.rb +19 -14
- data/app/commands/decidim/initiatives/send_initiative_to_technical_validation.rb +2 -2
- data/app/commands/decidim/initiatives/spawn_committee_request.rb +1 -1
- data/app/commands/decidim/initiatives/unvote_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/update_initiative.rb +9 -2
- data/app/commands/decidim/initiatives/validate_mobile_phone.rb +2 -2
- data/app/commands/decidim/initiatives/vote_initiative.rb +5 -5
- data/app/constraints/decidim/initiatives/current_initiative.rb +1 -1
- data/app/controllers/concerns/decidim/initiatives/admin/filterable.rb +2 -2
- data/app/controllers/concerns/decidim/initiatives/needs_initiative.rb +1 -1
- data/app/controllers/decidim/initiatives/admin/answers_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/admin/committee_requests_controller.rb +2 -0
- data/app/controllers/decidim/initiatives/admin/components_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/admin/initiative_attachments_controller.rb +2 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +17 -6
- data/app/controllers/decidim/initiatives/admin/initiatives_permissions_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_settings_controller.rb +2 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_type_scopes_controller.rb +30 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_types_controller.rb +14 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_types_permissions_controller.rb +21 -0
- data/app/controllers/decidim/initiatives/admin/moderations/reports_controller.rb +2 -2
- data/app/controllers/decidim/initiatives/admin/moderations_controller.rb +4 -2
- data/app/controllers/decidim/initiatives/application_controller.rb +0 -1
- data/app/controllers/decidim/initiatives/authorization_create_modals_controller.rb +25 -0
- data/app/controllers/decidim/initiatives/authorization_sign_modals_controller.rb +2 -2
- data/app/controllers/decidim/initiatives/committee_requests_controller.rb +0 -2
- data/app/controllers/decidim/initiatives/create_initiative_controller.rb +62 -115
- data/app/controllers/decidim/initiatives/initiative_signatures_controller.rb +113 -81
- data/app/controllers/decidim/initiatives/initiative_types_controller.rb +7 -0
- data/app/controllers/decidim/initiatives/initiatives_controller.rb +37 -17
- data/app/controllers/decidim/initiatives/versions_controller.rb +0 -1
- data/app/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event.rb +1 -1
- data/app/events/decidim/initiatives/admin/support_threshold_reached_event.rb +1 -1
- data/app/events/decidim/initiatives/approve_membership_request_event.rb +12 -12
- data/app/events/decidim/initiatives/create_initiative_event.rb +6 -6
- data/app/events/decidim/initiatives/endorse_initiative_event.rb +1 -1
- data/app/events/decidim/initiatives/extend_initiative_event.rb +1 -1
- data/app/events/decidim/initiatives/initiative_sent_to_technical_validation_event.rb +1 -1
- data/app/events/decidim/initiatives/milestone_completed_event.rb +1 -1
- data/app/events/decidim/initiatives/revoke_membership_request_event.rb +12 -12
- data/app/events/decidim/initiatives/spawn_committee_request_event.rb +12 -12
- data/app/forms/decidim/initiatives/admin/initiative_form.rb +1 -1
- data/app/forms/decidim/initiatives/initiative_form.rb +22 -31
- data/app/forms/decidim/initiatives/previous_form.rb +4 -0
- data/app/forms/decidim/initiatives/vote_form.rb +11 -11
- data/app/helpers/decidim/initiatives/admin/initiatives_helper.rb +1 -1
- data/app/helpers/decidim/initiatives/application_helper.rb +4 -61
- data/app/helpers/decidim/initiatives/initiative_helper.rb +48 -5
- data/app/helpers/decidim/initiatives/initiatives_helper.rb +33 -12
- data/app/jobs/decidim/initiatives/export_initiatives_job.rb +1 -1
- data/app/models/decidim/initiative.rb +17 -20
- data/app/models/decidim/initiatives_vote.rb +1 -1
- data/app/packs/entrypoints/decidim_initiatives.js +3 -0
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_initiatives.svg +42 -1
- data/app/packs/src/decidim/initiatives/application.js +0 -1
- data/app/packs/src/decidim/initiatives/scoped_type.js +1 -1
- data/app/packs/stylesheets/decidim/initiatives/initiatives-votes.scss +21 -21
- data/app/packs/stylesheets/decidim/initiatives/print-initiative.scss +59 -31
- data/app/packs/stylesheets/initiatives.scss +171 -0
- data/app/permissions/decidim/initiatives/permissions.rb +3 -3
- data/app/presenters/decidim/initiatives/admin_log/initiative_presenter.rb +2 -2
- data/app/presenters/decidim/initiatives/admin_log/initiatives_settings_presenter.rb +2 -2
- data/app/presenters/decidim/initiatives/admin_log/initiatives_type_presenter.rb +2 -2
- data/app/queries/decidim/initiatives/organization_prioritized_initiatives.rb +1 -1
- data/app/queries/decidim/initiatives/similar_initiatives.rb +2 -2
- data/app/queries/decidim/initiatives/support_period_finished_initiatives.rb +1 -1
- data/app/queries/decidim/initiatives/user_authorizations.rb +1 -1
- data/app/services/decidim/initiatives/pdf_signature_example.rb +44 -52
- data/app/views/decidim/initiatives/_modal.html.erb +15 -0
- data/app/views/decidim/initiatives/admin/answers/_info_initiative.html.erb +21 -19
- data/app/views/decidim/initiatives/admin/answers/edit.html.erb +41 -27
- data/app/views/decidim/initiatives/admin/committee_requests/index.html.erb +41 -48
- data/app/views/decidim/initiatives/admin/exports/_dropdown.html.erb +8 -7
- data/app/views/decidim/initiatives/admin/initiatives/_form.html.erb +111 -95
- data/app/views/decidim/initiatives/admin/initiatives/_initiative_attachments.erb +7 -7
- data/app/views/decidim/initiatives/admin/initiatives/_signatures.html.erb +87 -0
- data/app/views/decidim/initiatives/admin/initiatives/edit.html.erb +72 -60
- data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.html.erb +8 -0
- data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.pdf.erb +5 -78
- data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +76 -75
- data/app/views/decidim/initiatives/admin/initiatives_settings/_form.html.erb +7 -8
- data/app/views/decidim/initiatives/admin/initiatives_settings/edit.html.erb +17 -5
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/_form.html.erb +11 -6
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/edit.html.erb +16 -22
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/new.html.erb +17 -15
- data/app/views/decidim/initiatives/admin/initiatives_types/_form.html.erb +93 -76
- data/app/views/decidim/initiatives/admin/initiatives_types/_initiative_type_scopes.html.erb +35 -33
- data/app/views/decidim/initiatives/admin/initiatives_types/edit.html.erb +16 -12
- data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +39 -48
- data/app/views/decidim/initiatives/admin/initiatives_types/new.html.erb +16 -9
- data/app/views/decidim/initiatives/committee_requests/new.html.erb +21 -19
- data/app/views/decidim/initiatives/create_initiative/_share_committee_link.html.erb +15 -20
- data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +62 -100
- data/app/views/decidim/initiatives/create_initiative/finish.html.erb +24 -28
- data/app/views/decidim/initiatives/create_initiative/promotal_committee.html.erb +15 -17
- data/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +32 -46
- data/app/views/decidim/initiatives/initiative_signatures/_wizard_steps.html.erb +15 -19
- data/app/views/decidim/initiatives/initiative_signatures/fill_personal_data.html.erb +25 -36
- data/app/views/decidim/initiatives/initiative_signatures/finish.html.erb +5 -16
- data/app/views/decidim/initiatives/initiative_signatures/sms_code.html.erb +8 -19
- data/app/views/decidim/initiatives/initiative_signatures/sms_phone_number.html.erb +8 -20
- data/app/views/decidim/initiatives/initiatives/_committee_members.html.erb +48 -66
- data/app/views/decidim/initiatives/initiatives/_form.html.erb +49 -95
- data/app/views/decidim/initiatives/initiatives/_initiative_badge.html.erb +3 -5
- data/app/views/decidim/initiatives/initiatives/_initiative_hero.html.erb +13 -0
- data/app/views/decidim/initiatives/initiatives/_initiatives.html.erb +6 -15
- data/app/views/decidim/initiatives/initiatives/_interactions.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_new_initiative_button.html.erb +28 -0
- data/app/views/decidim/initiatives/initiatives/_progress_bar.html.erb +2 -6
- data/app/views/decidim/initiatives/initiatives/_result.html.erb +15 -21
- data/app/views/decidim/initiatives/initiatives/_send_to_technical_validation.html.erb +3 -3
- data/app/views/decidim/initiatives/initiatives/_tags_type.html.erb +1 -0
- data/app/views/decidim/initiatives/initiatives/_vote_button.html.erb +9 -9
- data/app/views/decidim/initiatives/initiatives/_vote_cabin.html.erb +7 -7
- data/app/views/decidim/initiatives/initiatives/edit.html.erb +63 -68
- data/app/views/decidim/initiatives/initiatives/index.html.erb +17 -18
- data/app/views/decidim/initiatives/initiatives/index.js.erb +0 -5
- data/app/views/decidim/initiatives/initiatives/print.html.erb +123 -120
- data/app/views/decidim/initiatives/initiatives/show.html.erb +188 -70
- data/app/views/decidim/initiatives/initiatives_mailer/notify_creation.html.erb +2 -2
- data/app/views/decidim/initiatives/initiatives_type_scopes/search.html.erb +2 -1
- data/app/views/decidim/initiatives/versions/show.html.erb +14 -5
- data/app/views/layouts/decidim/_initiative_creation_header.html.erb +17 -28
- data/app/views/layouts/decidim/_initiative_header.html.erb +3 -23
- data/app/views/layouts/decidim/_initiative_header_steps.html.erb +4 -12
- data/app/views/layouts/decidim/_initiative_signature_creation_header.html.erb +5 -26
- data/app/views/layouts/decidim/admin/initiative.html.erb +12 -13
- data/app/views/layouts/decidim/admin/initiatives.html.erb +40 -11
- data/app/views/layouts/decidim/initiative.html.erb +16 -11
- data/app/views/layouts/decidim/initiative_creation.html.erb +7 -18
- data/app/views/layouts/decidim/initiative_head.html.erb +15 -0
- data/app/views/layouts/decidim/initiative_signature_creation.html.erb +3 -11
- data/config/assets.rb +0 -1
- data/config/environment.rb +3 -0
- data/config/initializers/wicked_pdf.rb +1 -1
- data/config/locales/ar.yml +1 -92
- data/config/locales/ca.yml +65 -104
- data/config/locales/cs.yml +70 -109
- data/config/locales/de.yml +71 -110
- data/config/locales/el.yml +1 -97
- data/config/locales/en.yml +69 -108
- data/config/locales/es-MX.yml +65 -104
- data/config/locales/es-PY.yml +65 -104
- data/config/locales/es.yml +65 -104
- data/config/locales/eu.yml +171 -161
- data/config/locales/fi-plain.yml +67 -106
- data/config/locales/fi.yml +67 -106
- data/config/locales/fr-CA.yml +72 -106
- data/config/locales/fr.yml +70 -104
- data/config/locales/ga-IE.yml +0 -35
- data/config/locales/gl.yml +1 -87
- data/config/locales/hu.yml +25 -107
- data/config/locales/id-ID.yml +1 -88
- data/config/locales/is-IS.yml +1 -57
- data/config/locales/it.yml +6 -111
- data/config/locales/ja.yml +63 -109
- data/config/locales/lb.yml +6 -73
- data/config/locales/lt.yml +72 -101
- data/config/locales/lv.yml +1 -98
- data/config/locales/nl.yml +6 -103
- data/config/locales/no.yml +6 -114
- data/config/locales/pl.yml +11 -111
- data/config/locales/pt-BR.yml +21 -116
- data/config/locales/pt.yml +6 -111
- data/config/locales/ro-RO.yml +13 -108
- data/config/locales/ru.yml +1 -65
- data/config/locales/sk.yml +1 -84
- data/config/locales/sl.yml +3 -5
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/sv.yml +20 -107
- data/config/locales/th-TH.yml +1 -0
- data/config/locales/tr-TR.yml +9 -111
- data/config/locales/uk.yml +1 -65
- data/config/locales/zh-CN.yml +6 -102
- data/config/locales/zh-TW.yml +31 -97
- data/db/migrate/20171017091734_add_scopes_for_all_initiative_types.rb +1 -1
- data/db/migrate/20171017095143_update_initiative_scoped_type.rb +1 -1
- data/db/migrate/20191002082220_move_signature_type_to_initative_type.rb +1 -1
- data/lib/decidim/api/initiative_committee_member_type.rb +2 -2
- data/lib/decidim/initiatives/admin_engine.rb +13 -93
- data/lib/decidim/initiatives/content_blocks/registry_manager.rb +22 -0
- data/lib/decidim/initiatives/engine.rb +45 -23
- data/lib/decidim/initiatives/menu.rb +150 -0
- data/lib/decidim/initiatives/participatory_space.rb +6 -91
- data/lib/decidim/initiatives/query_extensions.rb +5 -5
- data/lib/decidim/initiatives/seeds.rb +95 -0
- data/lib/decidim/initiatives/test/factories.rb +25 -7
- data/lib/decidim/initiatives/version.rb +1 -1
- data/lib/decidim/initiatives.rb +1 -1
- data/lib/tasks/decidim_initiatives.rake +2 -2
- data/lib/tasks/initiatives/upgrade/decidim_initiatives_upgrade_tasks.rake +1 -1
- metadata +49 -75
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +0 -28
- data/app/cells/decidim/initiatives/initiative_m/author.erb +0 -10
- data/app/cells/decidim/initiatives/initiative_m/footer.erb +0 -28
- data/app/cells/decidim/initiatives/initiative_m/tags.erb +0 -9
- data/app/cells/decidim/initiatives/initiative_m_cell.rb +0 -77
- data/app/controllers/decidim/initiatives/widgets_controller.rb +0 -30
- data/app/packs/stylesheets/decidim/initiatives/admin.scss +0 -33
- data/app/packs/stylesheets/decidim/initiatives/initiatives.scss +0 -64
- data/app/packs/stylesheets/decidim/initiatives/popularity_item.scss +0 -76
- data/app/packs/stylesheets/decidim/initiatives/statistics.scss +0 -15
- data/app/views/decidim/initiatives/create_initiative/_finish_help.html.erb +0 -2
- data/app/views/decidim/initiatives/create_initiative/previous_form.html.erb +0 -40
- data/app/views/decidim/initiatives/create_initiative/show_similar_initiatives.html.erb +0 -23
- data/app/views/decidim/initiatives/initiatives/_author.html.erb +0 -35
- data/app/views/decidim/initiatives/initiatives/_count.html.erb +0 -1
- data/app/views/decidim/initiatives/initiatives/_filters.html.erb +0 -33
- data/app/views/decidim/initiatives/initiatives/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/initiatives/initiatives/_index_header.html.erb +0 -44
- data/app/views/decidim/initiatives/initiatives/_tags.html.erb +0 -7
- data/app/views/decidim/initiatives/versions/index.html.erb +0 -8
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/lib/decidim/initiatives/initiatives_filter_form_builder.rb +0 -56
- data/lib/gem_overrides/origami/date.rb +0 -47
@@ -1,53 +1,39 @@
|
|
1
|
+
<% add_decidim_page_title(t("new", scope: "decidim.initiatives.create_initiative.select_initiative_type")) %>
|
1
2
|
<% default_type = available_initiative_types.first %>
|
2
|
-
<%
|
3
|
-
<%=
|
4
|
-
|
5
|
-
<%= t(".back") %>
|
6
|
-
<% end %>
|
3
|
+
<% announcement_body = capture do %>
|
4
|
+
<%= t("select_initiative_type_help", scope: "decidim.initiatives.create_initiative.select_initiative_type") %>
|
5
|
+
<%= link_to t("more_information", scope: "decidim.initiatives.create_initiative.select_initiative_type"), decidim.page_path("initiatives"), target: "_blank", class: "button button__sm button__text-secondary block text-left" %>
|
7
6
|
<% end %>
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<ul class="tabs vertical side-panel__tabs" id="initiatives-tabs" data-tabs>
|
22
|
-
<% initiative_types_each do |type| %>
|
23
|
-
<li class="tabs-title <%= "is-active" if type == default_type %>">
|
24
|
-
<%= link_to "#initiativeType#{type.id}" do %>
|
25
|
-
<%= t(".choose_html", title: translated_attribute(type.title)) %>
|
26
|
-
<% end %>
|
27
|
-
</li>
|
28
|
-
<% end %>
|
29
|
-
</ul>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
<div class="columns medium-8 large-9">
|
33
|
-
<div class="main-container__content">
|
34
|
-
<div class="tabs-content vertical" data-tabs-content="initiatives-tabs">
|
35
|
-
<% initiative_types_each do |type| %>
|
36
|
-
<div class="tabs-panel <%= "is-active" if type == default_type %>" id="<%= "initiativeType#{type.id}" %>">
|
37
|
-
<h2 class="section-heading"><%= translated_attribute(type.title) %></h2>
|
38
|
-
<div>
|
39
|
-
<%= raw translated_attribute type.description %>
|
40
|
-
</div>
|
41
|
-
<br>
|
42
|
-
<%= decidim_form_for(@form, url: next_wizard_path, method: :put, html: { id: "new_initiative_#{type.id}", class: "form select-initiative_type-form" }) do |f| %>
|
43
|
-
<%= f.hidden_field :type_id, value: type.id, id: "initiative_type_id_#{ type.id }" %>
|
44
|
-
<%= f.submit t(".select"), class: "button" %>
|
45
|
-
<% end %>
|
46
|
-
</div>
|
47
|
-
<% end %>
|
8
|
+
<%= cell("decidim/announcement", { body: announcement_body }, callout_class: "secondary") %>
|
9
|
+
|
10
|
+
<div class="initiatives__selection">
|
11
|
+
<% initiative_types_each do |type| %>
|
12
|
+
<% if allowed_to?(:create, :initiative, { initiative_type: type }) %>
|
13
|
+
<%= decidim_form_for(@form, url: select_initiative_type_create_initiative_index_path, method: :put, html: { id: "new_initiative_#{type.id}", class: "form-defaults " }) do |f| %>
|
14
|
+
<%= f.hidden_field :type_id, value: type.id, id: "initiative_type_id_#{type.id}" %>
|
15
|
+
<button class="card__highlight w-full">
|
16
|
+
<%= icon "lightbulb-flash-line", class: "verification__icon " %>
|
17
|
+
<div class="initiatives__selection__text">
|
18
|
+
<h2 class="h5 text-secondary"><%= translated_attribute(type.title) %></h2>
|
19
|
+
<span><%= raw translated_attribute type.description %></span>
|
48
20
|
</div>
|
21
|
+
<%= icon "arrow-right-s-line", class: "fill-secondary initiatives__selection__icon" %>
|
22
|
+
</button>
|
23
|
+
<% end %>
|
24
|
+
<% else %>
|
25
|
+
<div class="card__highlight card__highlight-authorized">
|
26
|
+
<%= icon "lightbulb-flash-line", class: "verification__icon " %>
|
27
|
+
<div class="initiatives__selection__text">
|
28
|
+
<h2 class="h5 text-secondary"><%= translated_attribute(type.title) %></h2>
|
29
|
+
<span><%= raw translated_attribute type.description %></span>
|
30
|
+
<%= authorized_create_modal_button(type, remote: true, class: "button button__sm button__secondary") do %>
|
31
|
+
<%= t("verification_required", scope: "decidim.initiatives.create_initiative.select_initiative_type") %>
|
32
|
+
<% end %>
|
49
33
|
</div>
|
50
34
|
</div>
|
51
|
-
|
52
|
-
|
35
|
+
<% end %>
|
36
|
+
<% end %>
|
53
37
|
</div>
|
38
|
+
|
39
|
+
<%= render partial: "decidim/initiatives/modal" %>
|
@@ -1,19 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<% end %>
|
17
|
-
<% end %>
|
18
|
-
</ol>
|
19
|
-
</div>
|
1
|
+
<% scope = "layouts.decidim.initiative_signature_creation_header" %>
|
2
|
+
<ol id="wizard-steps" class="wizard-steps">
|
3
|
+
<% options = { data: { active: false }, aria: { current: "step" } } %>
|
4
|
+
|
5
|
+
<% if fill_personal_data_step? %>
|
6
|
+
<%= content_tag :li, t("fill_personal_data", scope: ),
|
7
|
+
%w(fill_personal_data update_fill_personal_data).include?(action_name) ? options : {} %>
|
8
|
+
<% end %>
|
9
|
+
<% if sms_step? %>
|
10
|
+
<%= content_tag :li, t("sms_phone_number", scope: ),
|
11
|
+
%w(sms_phone_number update_sms_phone_number).include?(action_name) ? options : {} %>
|
12
|
+
<%= content_tag :li, t("sms_code", scope: ), %w(sms_code update_sms_code).include?(action_name) ? options : {} %>
|
13
|
+
<% end %>
|
14
|
+
<%= content_tag :li, t("finish", scope: ), action_name == "finish" ? options : {} %>
|
15
|
+
</ol>
|
@@ -1,43 +1,32 @@
|
|
1
|
-
|
2
|
-
<p>
|
3
|
-
<%= t ".help" %>
|
4
|
-
</p>
|
5
|
-
</div>
|
6
|
-
<h2 class="section-heading"><%= t(step, scope: "layouts.decidim.initiative_signature_creation_header") %></h2>
|
1
|
+
<%= cell("decidim/announcement", t("decidim.initiatives.initiative_signatures.fill_personal_data.help"), callout_class: "secondary") %>
|
7
2
|
|
8
|
-
<%=
|
3
|
+
<%= decidim_form_for(@form, url: fill_personal_data_initiative_signatures_path, method: :put) do |f| %>
|
4
|
+
<%= form_required_explanation %>
|
5
|
+
<div>
|
6
|
+
<div class="form__wrapper">
|
7
|
+
<%= f.text_field :name_and_surname, autofocus: true, required: true %>
|
8
|
+
</div>
|
9
9
|
|
10
|
-
<div class="
|
11
|
-
|
12
|
-
|
13
|
-
<%= form_required_explanation %>
|
14
|
-
<div>
|
15
|
-
<div class="field">
|
16
|
-
<%= f.text_field :name_and_surname, autofocus: true, required: true %>
|
17
|
-
</div>
|
10
|
+
<div class="form__wrapper">
|
11
|
+
<%= f.text_field :document_number, required: true %>
|
12
|
+
</div>
|
18
13
|
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
<div class="form__wrapper">
|
15
|
+
<%= f.date_field :date_of_birth, min: 120.years.ago.to_date, max: 16.years.ago.to_date, value: 35.years.ago.to_date %>
|
16
|
+
</div>
|
22
17
|
|
23
|
-
|
24
|
-
|
25
|
-
|
18
|
+
<div class="form__wrapper">
|
19
|
+
<%= f.text_field :postal_code, required: true %>
|
20
|
+
</div>
|
26
21
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
<%= strip_tags(translated_attribute(extra_data_legal_information)) %>
|
34
|
-
</small>
|
35
|
-
</div>
|
36
|
-
</div>
|
22
|
+
<div class="pb-s">
|
23
|
+
<small>
|
24
|
+
<%= strip_tags(translated_attribute(extra_data_legal_information)) %>
|
25
|
+
</small>
|
26
|
+
</div>
|
27
|
+
</div>
|
37
28
|
|
38
|
-
|
39
|
-
|
40
|
-
</div>
|
41
|
-
<% end %>
|
29
|
+
<div class="form__wrapper-block">
|
30
|
+
<%= f.submit t(".continue"), class: "button button__sm md:button__lg button__secondary" %>
|
42
31
|
</div>
|
43
|
-
|
32
|
+
<% end %>
|
@@ -1,17 +1,6 @@
|
|
1
|
-
|
2
|
-
<p>
|
3
|
-
<%= t("create.success_html",
|
4
|
-
scope: "decidim.initiatives.initiative_votes",
|
5
|
-
title: translated_attribute(current_initiative.title)) %>
|
6
|
-
</p>
|
7
|
-
</div>
|
8
|
-
<h2 class="section-heading"><%= t("finished", scope: "layouts.decidim.initiative_signature_creation_header") %></h2>
|
1
|
+
<%= cell("decidim/announcement", t("decidim.initiatives.initiative_votes.create.success_html", title: translated_attribute(current_initiative.title)), callout_class: "secondary") %>
|
9
2
|
|
10
|
-
<%=
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<div class="column actions">
|
15
|
-
<%= link_to t(".back_to_initiative"), initiative_path(current_initiative), class: "button white-button expanded" %>
|
16
|
-
</div>
|
17
|
-
</div>
|
3
|
+
<%= link_to initiative_path(current_initiative), class: "button button__sm md:button__lg button__text-secondary" do %>
|
4
|
+
<%= icon "arrow-left-line" %>
|
5
|
+
<%= t(".back_to_initiative") %>
|
6
|
+
<% end %>
|
@@ -1,22 +1,11 @@
|
|
1
|
-
|
2
|
-
<p>
|
3
|
-
<%= t ".help" %>
|
4
|
-
</p>
|
5
|
-
</div>
|
6
|
-
<h2 class="section-heading"><%= t(step, scope: "layouts.decidim.initiative_signature_creation_header") %></h2>
|
1
|
+
<%= cell("decidim/announcement", t("decidim.initiatives.initiative_signatures.sms_code.help"), callout_class: "secondary") %>
|
7
2
|
|
8
|
-
<%=
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<%= decidim_form_for(@form, url: next_wizard_path, method: :put, html: { class: "form sms_code" }) do |f| %>
|
13
|
-
<div class="field">
|
14
|
-
<%= f.text_field :verification_code %>
|
15
|
-
</div>
|
3
|
+
<%= decidim_form_for(@form, url: sms_code_initiative_signatures_path, method: :put) do |f| %>
|
4
|
+
<div class="form__wrapper">
|
5
|
+
<%= f.text_field :verification_code %>
|
6
|
+
</div>
|
16
7
|
|
17
|
-
|
18
|
-
|
19
|
-
</div>
|
20
|
-
<% end %>
|
8
|
+
<div class="form__wrapper-block">
|
9
|
+
<%= f.submit t(".continue"), class: "button button__sm md:button__lg button__secondary" %>
|
21
10
|
</div>
|
22
|
-
|
11
|
+
<% end %>
|
@@ -1,22 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
</div>
|
6
|
-
<h2 class="section-heading"><%= t(step, scope: "layouts.decidim.initiative_signature_creation_header") %></h2>
|
7
|
-
|
8
|
-
<%= render partial: "wizard_steps" %>
|
9
|
-
|
10
|
-
<div class="card">
|
11
|
-
<div class="card__content">
|
12
|
-
<%= decidim_form_for(@form, url: next_wizard_path, method: :put, html: { class: "form mobile_phone_number" }) do |f| %>
|
13
|
-
<div class="field">
|
14
|
-
<%= f.text_field :mobile_phone_number %>
|
15
|
-
</div>
|
1
|
+
<%= cell("decidim/announcement", t("decidim.initiatives.initiative_signatures.sms_phone_number.help"), callout_class: "secondary") %>
|
2
|
+
<%= decidim_form_for(@form, url: sms_phone_number_initiative_signatures_path, method: :put) do |f| %>
|
3
|
+
<div class="form__wrapper">
|
4
|
+
<%= f.text_field :mobile_phone_number %>
|
5
|
+
</div>
|
16
6
|
|
17
|
-
|
18
|
-
|
19
|
-
</div>
|
20
|
-
<% end %>
|
7
|
+
<div class="form__wrapper-block">
|
8
|
+
<%= f.submit t(".continue"), class: "button button__sm md:button__lg button__secondary" %>
|
21
9
|
</div>
|
22
|
-
|
10
|
+
<% end %>
|
@@ -1,73 +1,55 @@
|
|
1
|
-
<
|
2
|
-
<
|
1
|
+
<div class="block">
|
2
|
+
<span class="font-semibold text-xl"><%= t ".link" %></span>
|
3
|
+
<span class="help-text mb-2">
|
4
|
+
<%= t ".invite_to_committee_help" %>
|
5
|
+
</span>
|
3
6
|
|
4
|
-
<div class="
|
5
|
-
<
|
6
|
-
<%=
|
7
|
-
</
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
<h6 class="card--list__heading heading6 lowercase" id="committee_link">
|
15
|
-
<%= decidim_initiatives.new_initiative_committee_request_url(current_initiative) %>
|
16
|
-
</h6>
|
17
|
-
</div>
|
18
|
-
</div>
|
19
|
-
<div class="card--list__data">
|
20
|
-
<%= icon_link_to "clipboard", "#", t(".invite_to_committee_help"), class: "card--list__data__icon invite-users-link" %>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
</div>
|
7
|
+
<div class="initiative__form__committee">
|
8
|
+
<span>
|
9
|
+
<%= decidim_initiatives.new_initiative_committee_request_url(current_initiative) %>
|
10
|
+
</span>
|
11
|
+
<div class="ml-auto fill-secondary inline-block">
|
12
|
+
<button type="button" class="button button__sm button__text-secondary" data-clipboard-copy="#urlShareLink-committee">
|
13
|
+
<%= render_committee_tooltip %>
|
14
|
+
<span class="sr-only"><%= t("decidim.shared.share_modal.copy_share_link") %></span>
|
15
|
+
</button>
|
16
|
+
<input id="urlShareLink-committee" type="text" class="!hidden" value="<%= decidim_initiatives.new_initiative_committee_request_url(current_initiative) %>" readonly>
|
24
17
|
</div>
|
25
18
|
</div>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<tr data-id="<%= request.id %>">
|
45
|
-
<td>
|
46
|
-
<%= link_to request.user.name, "mailto:#{request.user.email}" %>
|
47
|
-
</td>
|
48
|
-
<td class="table-list__actions">
|
49
|
-
<% if allowed_to? :approve, :initiative_committee_member, initiative: current_initiative, request: request %>
|
50
|
-
<%= icon_link_to "check",
|
51
|
-
approve_initiative_committee_request_path(current_initiative, request),
|
52
|
-
t(".approve"),
|
53
|
-
class: "action-icon--check" %>
|
19
|
+
</div>
|
20
|
+
<div class="block">
|
21
|
+
<span class="font-semibold text-xl mb-4 block"><%= t ".title" %></span>
|
22
|
+
<% if current_initiative.committee_members.empty? %>
|
23
|
+
<%= t ".no_members_yet" %>
|
24
|
+
<% end %>
|
25
|
+
<% current_initiative.committee_members.each do |request| %>
|
26
|
+
<div class="author mb-6" data-id="<%= request.id %>">
|
27
|
+
<div class="profile__group__list">
|
28
|
+
<%= card_for request.user %>
|
29
|
+
<% if allowed_to? :approve, :initiative_committee_member, initiative: current_initiative, request: request %>
|
30
|
+
<%= link_to(
|
31
|
+
approve_initiative_committee_request_path(current_initiative, request),
|
32
|
+
data: { confirm: t(".confirm_approve") },
|
33
|
+
class: "button button__sm button__transparent-secondary"
|
34
|
+
) do %>
|
35
|
+
<span><%= t(".approve") %></span>
|
36
|
+
<%= icon "check-line" %>
|
54
37
|
<% end %>
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
38
|
+
<% end %>
|
39
|
+
<% if allowed_to? :revoke, :initiative_committee_member, initiative: current_initiative, request: request %>
|
40
|
+
<%= link_to(
|
41
|
+
revoke_initiative_committee_request_path(current_initiative, request),
|
42
|
+
method: :delete,
|
43
|
+
data: { confirm: t(".confirm_revoke") },
|
44
|
+
class: "button button__sm button__transparent-secondary"
|
45
|
+
) do %>
|
46
|
+
<span><%= t(".revoke") %></span>
|
47
|
+
<%= icon "forbid-line" %>
|
63
48
|
<% end %>
|
64
|
-
|
65
|
-
|
66
|
-
<% end %>
|
67
|
-
</tbody>
|
68
|
-
</table>
|
49
|
+
<% end %>
|
50
|
+
</div>
|
69
51
|
</div>
|
70
|
-
|
71
|
-
</
|
52
|
+
<% end %>
|
53
|
+
</div>
|
72
54
|
|
73
|
-
<%=
|
55
|
+
<%= append_javascript_pack_tag "decidim_initiatives_admin" %>
|
@@ -1,120 +1,74 @@
|
|
1
1
|
<%= form_required_explanation %>
|
2
2
|
|
3
3
|
<% unless single_initiative_type? %>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
} %>
|
17
|
-
</div>
|
4
|
+
<%= form.select :type_id,
|
5
|
+
initiative_type_options,
|
6
|
+
{},
|
7
|
+
{
|
8
|
+
disabled: !@form.signature_type_updatable?,
|
9
|
+
"data-scope-selector": "initiative_decidim_scope_id",
|
10
|
+
"data-scope-id": form.object.scope_id.to_s,
|
11
|
+
"data-scope-search-url": decidim_initiatives.initiative_type_scopes_search_url,
|
12
|
+
"data-signature-types-selector": "initiative_signature_type",
|
13
|
+
"data-signature-type": current_initiative.signature_type,
|
14
|
+
"data-signature-types-search-url": decidim_initiatives.initiative_type_signature_types_search_url
|
15
|
+
} %>
|
18
16
|
<% end %>
|
19
17
|
|
20
|
-
|
21
|
-
<%= form.text_field :title, autofocus: true, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), value: translated_attribute(@form.title) %>
|
22
|
-
</div>
|
18
|
+
<%= form.text_field :title, autofocus: true, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), value: translated_attribute(@form.title) %>
|
23
19
|
|
24
|
-
|
25
|
-
<%= text_editor_for(form, :description, toolbar: :content, lines: 8, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), value: translated_attribute(@form.description)) %>
|
26
|
-
</div>
|
20
|
+
<%= text_editor_for(form, :description, toolbar: :content, lines: 8, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), value: translated_attribute(@form.description)) %>
|
27
21
|
|
28
|
-
|
29
|
-
<%= form.text_field :hashtag, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
30
|
-
</div>
|
22
|
+
<%= form.text_field :hashtag, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
31
23
|
|
32
|
-
<%
|
33
|
-
|
34
|
-
<%= form.hidden_field :signature_type %>
|
35
|
-
<% else %>
|
36
|
-
<div class="field">
|
37
|
-
<%= form.select :signature_type, signature_type_options, {}, { disabled: !@form.signature_type_updatable? } %>
|
38
|
-
</div>
|
24
|
+
<% if @form.state_updatable? %>
|
25
|
+
<%= form.select :state, Decidim::Initiative.states.keys.map { |state| [I18n.t(state, scope: "decidim.initiatives.admin_states"), state] }, {} %>
|
39
26
|
<% end %>
|
40
27
|
|
28
|
+
<%= form.select :scope_id, @form.available_scopes.map { |scope| [translated_attribute(scope.scope_name), scope.scope&.id] }, {}, { disabled: !@form.state_updatable? } %>
|
29
|
+
|
41
30
|
<% if can_edit_custom_signature_end_date?(current_initiative) %>
|
42
|
-
|
43
|
-
<%= form.date_field :signature_end_date, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
44
|
-
</div>
|
31
|
+
<%= form.date_field :signature_end_date, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
45
32
|
<% end %>
|
46
33
|
|
47
|
-
<div class="field">
|
48
|
-
<%= form.select :scope_id,
|
49
|
-
@form.available_scopes.map { |scope| [translated_attribute(scope.scope_name), scope&.scope&.id] },
|
50
|
-
{ disabled: !@form.state_updatable? } %>
|
51
|
-
</div>
|
52
|
-
|
53
34
|
<% if current_initiative.area_enabled? %>
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
disabled: !@form.area_updatable? %>
|
62
|
-
</div>
|
35
|
+
<%= form.areas_select :area_id,
|
36
|
+
areas_for_select(current_organization),
|
37
|
+
{
|
38
|
+
selected: current_initiative.decidim_area_id,
|
39
|
+
include_blank: current_initiative.decidim_area_id.blank? || current_initiative.created?
|
40
|
+
},
|
41
|
+
disabled: !@form.area_updatable? %>
|
63
42
|
<% end %>
|
64
43
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
44
|
+
<% signature_type_options = signature_type_options(form.object) %>
|
45
|
+
<% if signature_type_options.length == 1 %>
|
46
|
+
<%= form.hidden_field :signature_type %>
|
47
|
+
<% else %>
|
48
|
+
<%= form.select :signature_type, [], {}, { disabled: !@form.signature_type_updatable? } %>
|
49
|
+
<% end %>
|
71
50
|
|
72
51
|
<% if current_initiative.type.attachments_enabled? %>
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<%= form.hidden_field :photos, multiple: true, value: photo.id, id: "photo-#{photo.id}" %>
|
81
|
-
<button class="close-button"
|
82
|
-
aria-label="<%= t("delete_attachment", scope: "decidim.initiatives.form") %>"
|
83
|
-
title="<%= t("delete_attachment", scope: "decidim.initiatives.form") %>"
|
84
|
-
type="button"
|
85
|
-
data-close>
|
86
|
-
<span aria-hidden="true">×</span>
|
87
|
-
</button>
|
88
|
-
</div>
|
89
|
-
<% end %>
|
90
|
-
<% end %>
|
52
|
+
<%= form.attachment :documents,
|
53
|
+
multiple: true,
|
54
|
+
label: t("decidim.initiatives.form.add_documents"),
|
55
|
+
button_label: t("decidim.initiatives.form.add_documents"),
|
56
|
+
button_class: "button button__lg button__transparent-secondary w-full",
|
57
|
+
button_edit_label: t("decidim.initiatives.form.edit_documents"),
|
58
|
+
help_text: t("decidim.initiatives.form.attachment_legend") %>
|
91
59
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
aria-label="<%= t("delete_attachment", scope: "decidim.initiatives.form") %>"
|
100
|
-
title="<%= t("delete_attachment", scope: "decidim.initiatives.form") %>"
|
101
|
-
type="button" data-close>
|
102
|
-
<span aria-hidden="true">×</span>
|
103
|
-
</button>
|
104
|
-
</div>
|
105
|
-
<% end %>
|
106
|
-
<% end %>
|
107
|
-
|
108
|
-
<div class="row column">
|
109
|
-
<%= form.file_field :add_documents, multiple: true, label: t("add_attachments", scope: "decidim.initiatives.form") %>
|
110
|
-
</div>
|
111
|
-
</fieldset>
|
60
|
+
<%= form.attachment :photos,
|
61
|
+
multiple: true,
|
62
|
+
label: t("decidim.initiatives.form.add_image"),
|
63
|
+
button_label: t("decidim.initiatives.form.add_image"),
|
64
|
+
button_class: "button button__lg button__transparent-secondary w-full",
|
65
|
+
button_edit_label: t("decidim.initiatives.form.edit_image"),
|
66
|
+
help_text: t("decidim.initiatives.form.image_legend") %>
|
112
67
|
<% end %>
|
113
68
|
|
114
69
|
<% if current_initiative.type.promoting_committee_enabled? %>
|
115
70
|
<%= render partial: "committee_members" %>
|
116
71
|
<% end %>
|
117
72
|
|
118
|
-
|
119
|
-
|
120
|
-
<% end %>
|
73
|
+
<%= append_javascript_pack_tag "decidim_initiatives" %>
|
74
|
+
<%= append_stylesheet_pack_tag "decidim_initiatives", media: "all" %>
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
</span>
|
5
|
-
<% end %>
|
1
|
+
<span class="<%= metadata_badge_css_class(initiative.state) %> label initiative-status rounded px-2">
|
2
|
+
<%= t(initiative.state, scope: "decidim.initiatives.show.badge_name") %>
|
3
|
+
</span>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<section style="background-image:url('<%= hero_background_path(current_initiative) %>');">
|
2
|
+
<div class="initiative__hero">
|
3
|
+
<div class="initiative__hero-text">
|
4
|
+
<h1 class="h1 text-5xl">
|
5
|
+
<%= translated_attribute(current_participatory_space.title) %>
|
6
|
+
</h1>
|
7
|
+
<p class="initiative__hero-slogan">
|
8
|
+
<%= render partial: "tags_type", locals: { resource: current_initiative } %>
|
9
|
+
</p>
|
10
|
+
<%= render partial: "layouts/decidim/initiative_header_steps", locals: { initiative: current_participatory_space } %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</section>
|