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,24 +1,15 @@
|
|
1
1
|
<% if @forced_closed_initiatives %>
|
2
|
-
|
3
|
-
<%= t ".closed_initiatives_warning" %>
|
4
|
-
</div>
|
2
|
+
<%= cell("decidim/announcement", t("decidim.initiatives.initiatives.initiatives.closed_initiatives_warning"), callout_class: "warning") %>
|
5
3
|
<% elsif initiatives.blank? %>
|
6
|
-
|
7
|
-
<%= t ".no_initiatives_warning" %>
|
8
|
-
</div>
|
4
|
+
<%= cell("decidim/announcement", t("decidim.initiatives.initiatives.initiatives.no_initiatives_warning"), callout_class: "warning") %>
|
9
5
|
<% end %>
|
10
6
|
|
11
|
-
<
|
12
|
-
<div class="column">
|
13
|
-
<%= order_selector available_orders, i18n_scope: "decidim.initiatives.initiatives.orders" %>
|
14
|
-
</div>
|
7
|
+
<h2 class="h5 md:h3 decorator"><%= t("title", scope: "decidim.initiatives.initiatives.count", count: initiatives.total_count) %></h2>
|
15
8
|
|
16
|
-
|
17
|
-
<%= render partial: "decidim/shared/results_per_page" %>
|
18
|
-
</div>
|
19
|
-
</div>
|
9
|
+
<%= order_selector available_orders, i18n_scope: "decidim.initiatives.initiatives.orders" %>
|
20
10
|
|
21
|
-
<div class="
|
11
|
+
<div class="card__grid-grid">
|
22
12
|
<%= render initiatives %>
|
23
13
|
</div>
|
14
|
+
|
24
15
|
<%= decidim_paginate initiatives %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="row collapse buttons__row">
|
2
2
|
<div class="column collapse">
|
3
3
|
<%= link_to "#comments", class: "button small compact hollow button--nomargin expanded" do %>
|
4
|
-
<%= icon "
|
4
|
+
<%= icon "chat-1-line", class: "icon--small", role: "img", "aria-hidden": true %>
|
5
5
|
<%= stats.comments_count %>
|
6
6
|
<%= t(".comments_count.count", count: stats.comments_count) %>
|
7
7
|
<% end %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<% if Decidim::Initiatives.creation_enabled %>
|
2
|
+
<% if current_user && available_initiative_types.size > 1 %>
|
3
|
+
<%= link_to create_initiative_path(:select_initiative_type), class: "!px-4 title-action__action button button__xl button__secondary w-full" do %>
|
4
|
+
<%= t("new_initiative", scope: "decidim.initiatives.initiatives.index_header") %>
|
5
|
+
<%= icon "add-fill" %>
|
6
|
+
<% end %>
|
7
|
+
<% elsif current_user %>
|
8
|
+
<% if allowed_to?(:create, :initiative, { initiative_type: available_initiative_types.first }) %>
|
9
|
+
<%= link_to create_initiative_path(:select_initiative_type), class: "!px-4 title-action__action button button__xl button__secondary w-full" do %>
|
10
|
+
<%= t("new_initiative", scope: "decidim.initiatives.initiatives.index_header") %>
|
11
|
+
<%= icon "add-fill" %>
|
12
|
+
<% end %>
|
13
|
+
<% else %>
|
14
|
+
<%= authorized_create_modal_button(available_initiative_types.first, remote: true, class: "!px-4 title-action__action button button__xl button__secondary w-full") do %>
|
15
|
+
<%= t("new_initiative", scope: "decidim.initiatives.initiatives.index_header") %>
|
16
|
+
<%= icon "add-fill" %>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
19
|
+
<% else %>
|
20
|
+
<% content_for(:redirect_after_login) { create_initiative_url(:select_initiative_type) } %>
|
21
|
+
<button type="button" class="title-action__action button button__xl button__secondary w-full" data-dialog-open="loginModal" aria-controls="loginModal" aria-haspopup="dialog" tabindex="0">
|
22
|
+
<%= t("new_initiative", scope: "decidim.initiatives.initiatives.index_header") %>
|
23
|
+
<%= icon "add-fill" %>
|
24
|
+
</button>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%= render partial: "decidim/initiatives/modal" %>
|
@@ -6,18 +6,14 @@
|
|
6
6
|
current_initiative.supports_count_for(type_scope.scope),
|
7
7
|
total: type_scope.supports_required,
|
8
8
|
units_name: "decidim.initiatives.initiatives.votes_count.count",
|
9
|
-
element_id: "initiative-#{current_initiative.id}-votes-count"
|
10
|
-
subtitle_text: current_initiative.supports_goal_reached? ? t("decidim.initiatives.initiatives.votes_count.most_popular_initiative") : t("decidim.initiatives.initiatives.votes_count.need_more_votes"),
|
11
|
-
small: false
|
9
|
+
element_id: "initiative-#{current_initiative.id}-votes-count"
|
12
10
|
) %>
|
13
11
|
<% else %>
|
14
12
|
<%= cell(
|
15
13
|
"decidim/progress_bar",
|
16
14
|
current_initiative.supports_count_for(type_scope.scope),
|
17
15
|
total: type_scope.supports_required,
|
18
|
-
|
19
|
-
element_id: "initiative-scope-#{type_scope.id}-#{current_initiative.id}-votes-count",
|
20
|
-
horizontal: true
|
16
|
+
element_id: "initiative-scope-#{type_scope.id}-#{current_initiative.id}-votes-count"
|
21
17
|
) %>
|
22
18
|
<% end %>
|
23
19
|
<% end %>
|
@@ -1,26 +1,20 @@
|
|
1
1
|
<% if initiative.answered? && translated_attribute(initiative.answer).present? %>
|
2
|
-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
</div>
|
2
|
+
<% announcement_body = capture do %>
|
3
|
+
<h5><%= t("decidim.initiatives.initiatives.result.answer_title") %>:</h5>
|
4
|
+
<p>
|
5
|
+
<% if initiative.answer_url.present? %>
|
6
|
+
<a href="<%= initiative.answer_url %>" target="_blank">
|
7
|
+
<%= decidim_sanitize_editor translated_attribute initiative.answer %>
|
8
|
+
</a>
|
9
|
+
<% else %>
|
10
|
+
<%= decidim_sanitize_editor translated_attribute initiative.answer %>
|
11
|
+
<% end %>
|
12
|
+
</p>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<%= cell("decidim/announcement", { body: announcement_body }, callout_class: "success") %>
|
17
16
|
<% end %>
|
18
17
|
|
19
18
|
<% if initiative.rejected? %>
|
20
|
-
|
21
|
-
<div class="row column">
|
22
|
-
<div class="callout warning">
|
23
|
-
<h5><%= t(".initiative_rejected_reason") %></h5>
|
24
|
-
</div>
|
25
|
-
</div>
|
19
|
+
<%= cell("decidim/announcement", t("decidim.initiatives.initiatives.result.initiative_rejected_reason"), callout_class: "warning") %>
|
26
20
|
<% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% if allowed_to? :send_to_technical_validation, :initiative, initiative: current_initiative %>
|
2
2
|
<%= link_to title,
|
3
3
|
send_to_technical_validation_initiative_path(current_initiative),
|
4
|
-
class: "button
|
5
|
-
data: { confirm:
|
4
|
+
class: "button button__xl w-full button__secondary mt-4",
|
5
|
+
data: { confirm: } %>
|
6
6
|
<% else %>
|
7
|
-
<%= link_to title, "#", class: "button
|
7
|
+
<%= link_to title, "#", class: "button button__xl w-full button__secondary mt-4 disabled", disabled: true %>
|
8
8
|
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<span class="text-sm font-normal block"><%= link_to translated_attribute(resource.type.title), initiatives_path(filter: { with_any_type: [resource.type.id] }) %></span>
|
@@ -2,16 +2,16 @@
|
|
2
2
|
<% if steps %>
|
3
3
|
<%= link_to(
|
4
4
|
vote_label,
|
5
|
-
|
6
|
-
class: "button
|
5
|
+
initiative_signatures_path(initiative_slug: current_initiative.slug),
|
6
|
+
class: "button button__xl w-full button__secondary"
|
7
7
|
) %>
|
8
8
|
<% else %>
|
9
9
|
<%= button_to(
|
10
10
|
vote_label,
|
11
|
-
|
11
|
+
initiative_signatures_path(initiative_slug: current_initiative.slug),
|
12
12
|
remote: true,
|
13
13
|
data: { disable: true },
|
14
|
-
class: "button
|
14
|
+
class: "button button__xl w-full button__secondary"
|
15
15
|
) %>
|
16
16
|
<% end %>
|
17
17
|
<% else %>
|
@@ -22,19 +22,19 @@
|
|
22
22
|
method: :delete,
|
23
23
|
remote: true,
|
24
24
|
data: { disable: true },
|
25
|
-
class: "button
|
25
|
+
class: "button button__xl w-full button__secondary success"
|
26
26
|
) do %>
|
27
|
-
<%= icon
|
27
|
+
<%= icon "check-line" %>
|
28
28
|
<%= unvote_label %>
|
29
29
|
<% end %>
|
30
30
|
<% else %>
|
31
|
-
<button class='button
|
32
|
-
<%= icon
|
31
|
+
<button class='button button__xl w-full button__secondary success light' disabled>
|
32
|
+
<%= icon "check-line" %>
|
33
33
|
<%= unvote_label %>
|
34
34
|
</button>
|
35
35
|
<% end %>
|
36
36
|
<% else %>
|
37
|
-
<%= authorized_vote_modal_button(initiative, remote: true, class: "button
|
37
|
+
<%= authorized_vote_modal_button(initiative, remote: true, class: "button button__xl w-full button__secondary") do %>
|
38
38
|
<%= verification_label %>
|
39
39
|
<% end %>
|
40
40
|
<% end %>
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<% if initiative.accepts_online_votes? %>
|
2
2
|
<%= render partial: "decidim/initiatives/initiatives/vote_button",
|
3
3
|
locals: {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
initiative:,
|
5
|
+
vote_label: t("vote", scope: "decidim.initiatives.initiatives.vote_cabin"),
|
6
|
+
unvote_label: t("already_voted", scope: "decidim.initiatives.initiatives.vote_cabin"),
|
7
|
+
verification_label: t("verification_required", scope: "decidim.initiatives.initiatives.vote_cabin"),
|
8
|
+
steps: signature_has_steps?
|
9
9
|
} %>
|
10
10
|
<% else %>
|
11
|
-
<button class='button
|
12
|
-
<%= t("
|
11
|
+
<button class='button button__lg button__secondary w-full' disabled>
|
12
|
+
<%= t("votes_blocked", scope: "decidim.initiatives.initiatives.vote_cabin") %>
|
13
13
|
</button>
|
14
14
|
<% end %>
|
@@ -1,78 +1,73 @@
|
|
1
|
-
<% add_decidim_page_title(
|
1
|
+
<% add_decidim_page_title(t("title", scope: "decidim.initiatives.edit")) %>
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
<%= render layout:"layouts/decidim/shared/layout_center" do %>
|
4
|
+
<div class="text-center py-10">
|
5
|
+
<h1 class="title-decorator inline-block text-left"><%= t("title", scope: "decidim.initiatives.edit") %></h1>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<%= decidim_form_for @form, html: { class: "form__wrapper edit_initiative" } do |f| %>
|
9
|
+
<%= render partial: "form", object: f %>
|
10
10
|
|
11
|
-
<div class="row">
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<div class="actions">
|
18
|
-
<%= f.submit t("update", scope: "decidim.initiatives.edit"), class: "button expanded" if allowed_to? :update, :initiative, initiative: current_initiative %>
|
11
|
+
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
12
|
+
<%= link_to :back, class: "button button__sm md:button__lg button__text-secondary" do %>
|
13
|
+
<%= icon "arrow-left-line", class: "fill-current" %>
|
14
|
+
<%= t("back", scope: "decidim.initiatives.edit") %>
|
15
|
+
<% end %>
|
16
|
+
<%= f.submit t("update", scope: "decidim.initiatives.edit"), class: "button button__sm md:button__lg button__secondary" if allowed_to? :update, :initiative, initiative: current_initiative %>
|
19
17
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
<% if allowed_to? :publish, :initiative, initiative: current_initiative %>
|
19
|
+
<%= link_to t("actions.publish", scope: "decidim.admin"),
|
20
|
+
publish_initiative_path(current_initiative),
|
21
|
+
method: :post,
|
22
|
+
class: "button button__sm md:button__lg button__secondary",
|
23
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
24
|
+
<% end %>
|
27
25
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
26
|
+
<% if allowed_to? :unpublish, :initiative, initiative: current_initiative %>
|
27
|
+
<%= link_to t("actions.unpublish", scope: "decidim.admin"),
|
28
|
+
unpublish_initiative_path(current_initiative),
|
29
|
+
method: :delete,
|
30
|
+
class: "button button__sm md:button__lg button__secondary",
|
31
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
32
|
+
<% end %>
|
35
33
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
34
|
+
<% if allowed_to? :accept, :initiative, initiative: current_initiative %>
|
35
|
+
<%= link_to t("accept", scope: "decidim.initiatives.edit"),
|
36
|
+
accept_initiative_path(current_initiative),
|
37
|
+
method: :post,
|
38
|
+
class: "button button__sm md:button__lg button__secondary",
|
39
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
40
|
+
<% end %>
|
43
41
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
42
|
+
<% if allowed_to? :reject, :initiative, initiative: current_initiative %>
|
43
|
+
<%= link_to t("reject", scope: "decidim.initiatives.edit"),
|
44
|
+
reject_initiative_path(current_initiative),
|
45
|
+
method: :delete,
|
46
|
+
class: "button button__sm md:button__lg button__secondary",
|
47
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
48
|
+
<% end %>
|
51
49
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
50
|
+
<% if allowed_to? :discard, :initiative, initiative: current_initiative %>
|
51
|
+
<%= link_to t("discard", scope: "decidim.initiatives.edit"),
|
52
|
+
discard_initiative_path(current_initiative),
|
53
|
+
method: :delete,
|
54
|
+
class: "button button__sm md:button__lg button__secondary",
|
55
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
56
|
+
<% end %>
|
59
57
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
58
|
+
<% if allowed_to? :export_votes, :initiative, initiative: current_initiative %>
|
59
|
+
<%= link_to t("export_votes", scope: "decidim.initiatives.edit"),
|
60
|
+
export_votes_initiative_path(current_initiative, format: :csv),
|
61
|
+
class: "button button__sm md:button__lg button__secondary",
|
62
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
63
|
+
<% end %>
|
66
64
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
</div>
|
74
|
-
<% end %>
|
75
|
-
</div>
|
65
|
+
<% if allowed_to? :export_pdf_signatures, :initiative, initiative: current_initiative %>
|
66
|
+
<%= link_to t("export_pdf_signatures", scope: "decidim.initiatives.edit"),
|
67
|
+
export_pdf_signatures_initiative_path(current_initiative, format: :pdf),
|
68
|
+
class: "button button__sm md:button__lg button__secondary",
|
69
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
70
|
+
<% end %>
|
76
71
|
</div>
|
77
|
-
|
78
|
-
|
72
|
+
<% end %>
|
73
|
+
<% end %>
|
@@ -1,3 +1,7 @@
|
|
1
|
+
<% add_decidim_page_title(component_name) %>
|
2
|
+
<%= append_javascript_pack_tag "decidim_initiatives" %>
|
3
|
+
<%= append_stylesheet_pack_tag "decidim_initiatives", media: "all" %>
|
4
|
+
|
1
5
|
<%
|
2
6
|
edit_link(
|
3
7
|
decidim_admin_initiatives.initiatives_path,
|
@@ -6,24 +10,19 @@ edit_link(
|
|
6
10
|
)
|
7
11
|
%>
|
8
12
|
|
9
|
-
<%
|
13
|
+
<% content_for :aside do %>
|
14
|
+
<h1 class="title-decorator"><%= component_name %></h1>
|
15
|
+
<%= render partial: "new_initiative_button" %>
|
16
|
+
|
17
|
+
<%= render layout: "decidim/shared/filters", locals: { filter_sections: , search_variable: :search_text_cont, skip_to_id: "initiatives" } do %>
|
18
|
+
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
10
21
|
|
11
|
-
<%=
|
12
|
-
|
13
|
-
<div class="title-action">
|
14
|
-
<%= render partial: "index_header" %>
|
15
|
-
</div>
|
16
|
-
</div>
|
22
|
+
<%= render layout: "layouts/decidim/shared/layout_two_col" do %>
|
23
|
+
<%= participatory_space_floating_help %>
|
17
24
|
|
18
|
-
<
|
19
|
-
|
20
|
-
|
21
|
-
<div class="card card--secondary show-for-mediumlarge">
|
22
|
-
<%= render partial: "filters" %>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
<div id="initiatives" class="columns mediumlarge-8 large-9">
|
26
|
-
<%= render partial: "initiatives" %>
|
27
|
-
</div>
|
28
|
-
</div>
|
25
|
+
<section id="initiatives" class="layout-main__section layout-main__heading">
|
26
|
+
<%= render partial: "initiatives" %>
|
27
|
+
</section>
|
29
28
|
<% end %>
|
@@ -1,10 +1,5 @@
|
|
1
1
|
var $initiatives = $('#initiatives');
|
2
|
-
var $initiativesCount = $('#initiatives-count');
|
3
2
|
var $orderFilterInput = $('.order_filter');
|
4
3
|
|
5
4
|
$initiatives.html('<%= j(render partial: "initiatives") %>');
|
6
|
-
$initiativesCount.html('<%= j(render partial: "count") %>');
|
7
5
|
$orderFilterInput.val('<%= order %>');
|
8
|
-
|
9
|
-
var $dropdownMenu = $('.dropdown.menu', $initiatives);
|
10
|
-
$dropdownMenu.foundation();
|