decidim-proposals 0.20.1 → 0.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/admin/decidim_proposals_manifest.js +1 -0
- data/app/assets/images/decidim/gamification/badges/accepted_proposals.svg +1 -234
- data/app/assets/images/decidim/gamification/badges/proposal_votes.svg +1 -95
- data/app/assets/images/decidim/gamification/badges/proposals.svg +1 -229
- data/app/assets/images/decidim/proposals/icon.svg +1 -3
- data/app/assets/javascripts/decidim/proposals/add_proposal.js.es6 +6 -0
- data/app/assets/javascripts/decidim/proposals/admin/proposals.es6 +24 -11
- data/app/assets/javascripts/decidim/proposals/admin/proposals_form.js.es6 +3 -5
- data/app/assets/javascripts/decidim/proposals/admin/proposals_picker.js.es6 +35 -0
- data/app/cells/decidim/proposals/collaborative_draft_cell.rb +1 -1
- data/app/cells/decidim/proposals/collaborative_draft_link_to_proposal_cell.rb +1 -1
- data/app/cells/decidim/proposals/collaborative_draft_m/footer.erb +1 -1
- data/app/cells/decidim/proposals/collaborative_draft_m_cell.rb +1 -1
- data/app/cells/decidim/proposals/cost_report/show.erb +35 -0
- data/app/cells/decidim/proposals/cost_report_cell.rb +42 -0
- data/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb +3 -3
- data/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb +1 -1
- data/app/cells/decidim/proposals/irreversible_action_modal/show.erb +2 -2
- data/app/cells/decidim/proposals/irreversible_action_modal_cell.rb +1 -1
- data/app/cells/decidim/proposals/participatory_text_proposal/buttons.erb +3 -3
- data/app/cells/decidim/proposals/participatory_text_proposal_cell.rb +2 -2
- data/app/cells/decidim/proposals/proposal_cell.rb +1 -1
- data/app/cells/decidim/proposals/proposal_m/footer.erb +4 -1
- data/app/cells/decidim/proposals/proposal_m_cell.rb +37 -9
- data/app/cells/decidim/proposals/proposal_tags/show.erb +18 -10
- data/app/cells/decidim/proposals/proposal_tags_cell.rb +5 -0
- data/app/cells/decidim/proposals/proposals_picker/proposals.erb +12 -0
- data/app/cells/decidim/proposals/proposals_picker/show.erb +14 -0
- data/app/cells/decidim/proposals/proposals_picker_cell.rb +72 -0
- data/app/commands/decidim/proposals/admin/answer_proposal.rb +24 -46
- data/app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb +61 -0
- data/app/commands/decidim/proposals/admin/create_proposal.rb +10 -3
- data/app/commands/decidim/proposals/admin/create_proposal_note.rb +15 -0
- data/app/commands/decidim/proposals/admin/notify_proposal_answer.rb +85 -0
- data/app/commands/decidim/proposals/admin/publish_answers.rb +67 -0
- data/app/commands/decidim/proposals/admin/publish_participatory_text.rb +6 -1
- data/app/commands/decidim/proposals/admin/unassign_proposals_from_valuator.rb +62 -0
- data/app/commands/decidim/proposals/admin/update_participatory_text.rb +10 -2
- data/app/commands/decidim/proposals/admin/update_proposal.rb +5 -3
- data/app/commands/decidim/proposals/admin/update_proposal_scope.rb +75 -0
- data/app/commands/decidim/proposals/create_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/create_proposal.rb +7 -3
- data/app/commands/decidim/proposals/gallery_methods.rb +2 -51
- data/app/commands/decidim/proposals/publish_collaborative_draft.rb +2 -2
- data/app/commands/decidim/proposals/update_proposal.rb +25 -9
- data/app/controllers/concerns/decidim/proposals/admin/filterable.rb +82 -0
- data/app/controllers/concerns/decidim/proposals/admin/picker.rb +21 -0
- data/app/controllers/concerns/decidim/proposals/orderable.rb +1 -1
- data/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb +16 -6
- data/app/controllers/decidim/proposals/admin/proposal_notes_controller.rb +8 -9
- data/app/controllers/decidim/proposals/admin/proposals_controller.rb +107 -31
- data/app/controllers/decidim/proposals/admin/valuation_assignments_controller.rb +58 -0
- data/app/controllers/decidim/proposals/collaborative_drafts_controller.rb +10 -3
- data/app/controllers/decidim/proposals/proposals_controller.rb +30 -10
- data/app/controllers/decidim/proposals/versions_controller.rb +9 -16
- data/app/controllers/decidim/proposals/{proposal_widgets_controller.rb → widgets_controller.rb} +2 -2
- data/app/events/decidim/proposals/admin/proposal_note_created_event.rb +27 -0
- data/app/events/decidim/proposals/admin/update_proposal_scope_event.rb +11 -0
- data/app/forms/decidim/proposals/admin/import_participatory_text_form.rb +3 -1
- data/app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb +20 -0
- data/app/forms/decidim/proposals/admin/preview_participatory_text_form.rb +2 -2
- data/app/forms/decidim/proposals/admin/proposal_answer_form.rb +27 -2
- data/app/forms/decidim/proposals/admin/proposal_base_form.rb +136 -0
- data/app/forms/decidim/proposals/admin/proposal_form.rb +6 -117
- data/app/forms/decidim/proposals/admin/valuation_assignment_form.rb +37 -0
- data/app/forms/decidim/proposals/proposal_form.rb +25 -12
- data/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb +13 -1
- data/app/helpers/decidim/proposals/admin/filterable_helper.rb +17 -0
- data/app/helpers/decidim/proposals/admin/proposal_bulk_actions_helper.rb +35 -0
- data/app/helpers/decidim/proposals/admin/proposal_rankings_helper.rb +63 -0
- data/app/helpers/decidim/proposals/admin/proposals_helper.rb +124 -0
- data/app/helpers/decidim/proposals/admin/proposals_picker_helper.rb +30 -0
- data/app/helpers/decidim/proposals/application_helper.rb +54 -38
- data/app/helpers/decidim/proposals/collaborative_draft_helper.rb +9 -9
- data/app/helpers/decidim/proposals/control_version_helper.rb +1 -37
- data/app/helpers/decidim/proposals/proposal_cells_helper.rb +1 -1
- data/app/helpers/decidim/proposals/proposal_endorsements_helper.rb +0 -145
- data/app/helpers/decidim/proposals/proposal_votes_helper.rb +2 -2
- data/app/helpers/decidim/proposals/proposal_wizard_helper.rb +24 -7
- data/app/helpers/decidim/proposals/proposals_helper.rb +24 -0
- data/app/models/decidim/proposals/collaborative_draft.rb +2 -2
- data/app/models/decidim/proposals/participatory_text.rb +3 -0
- data/app/models/decidim/proposals/proposal.rb +152 -42
- data/app/models/decidim/proposals/valuation_assignment.rb +24 -0
- data/app/permissions/decidim/proposals/admin/permissions.rb +77 -11
- data/app/permissions/decidim/proposals/permissions.rb +1 -22
- data/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb +1 -1
- data/app/presenters/decidim/proposals/admin_log/valuation_assignment_presenter.rb +51 -0
- data/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb +6 -1
- data/app/presenters/decidim/proposals/admin_log/value_types/valuator_role_user_presenter.rb +19 -0
- data/app/presenters/decidim/proposals/collaborative_draft_presenter.rb +2 -28
- data/app/presenters/decidim/proposals/log/valuation_assignment_presenter.rb +22 -0
- data/app/presenters/decidim/proposals/official_author_presenter.rb +1 -29
- data/app/presenters/decidim/proposals/proposal_presenter.rb +79 -5
- data/app/queries/decidim/proposals/metrics/accepted_proposals_metric_manage.rb +1 -2
- data/app/queries/decidim/proposals/metrics/endorsements_metric_manage.rb +15 -12
- data/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb +5 -4
- data/app/queries/decidim/proposals/metrics/proposals_metric_manage.rb +2 -8
- data/app/queries/decidim/proposals/metrics/votes_metric_manage.rb +3 -9
- data/app/queries/decidim/proposals/similar_proposals.rb +4 -4
- data/app/services/decidim/proposals/collaborative_draft_search.rb +8 -10
- data/app/services/decidim/proposals/diff_renderer.rb +17 -5
- data/app/services/decidim/proposals/proposal_builder.rb +9 -3
- data/app/services/decidim/proposals/proposal_search.rb +11 -69
- data/app/types/decidim/proposals/proposal_input_filter.rb +29 -0
- data/app/types/decidim/proposals/proposal_input_sort.rb +22 -0
- data/app/types/decidim/proposals/proposal_type.rb +34 -13
- data/app/types/decidim/proposals/proposals_type.rb +22 -15
- data/app/validators/proposal_length_validator.rb +38 -0
- data/app/views/decidim/proposals/admin/participatory_texts/index.html.erb +9 -1
- data/app/views/decidim/proposals/admin/proposal_answers/_form.html.erb +35 -0
- data/app/views/decidim/proposals/admin/proposal_notes/_form.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposal_notes/_proposal_notes.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +8 -2
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +8 -28
- data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +26 -27
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_assign_to_valuator.html.erb +15 -0
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_dropdown.html.erb +21 -1
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_publish_answers.html.erb +14 -0
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_scope-change.html.erb +25 -0
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_unassign_from_valuator.html.erb +15 -0
- data/app/views/decidim/proposals/admin/proposals/index.html.erb +18 -9
- data/app/views/decidim/proposals/admin/proposals/publish_answers.js.erb +12 -0
- data/app/views/decidim/proposals/admin/proposals/show.html.erb +186 -0
- data/app/views/decidim/proposals/admin/proposals/update_category.js.erb +3 -2
- data/app/views/decidim/proposals/admin/proposals/update_scope.js.erb +27 -0
- data/app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb +11 -9
- data/app/views/decidim/proposals/collaborative_drafts/_filters.html.erb +10 -8
- data/app/views/decidim/proposals/collaborative_drafts/_new_collaborative_draft_button.html.erb +4 -4
- data/app/views/decidim/proposals/collaborative_drafts/_reject_request_access_form.html.erb +1 -1
- data/app/views/decidim/proposals/collaborative_drafts/_wizard_aside.html.erb +4 -2
- data/app/views/decidim/proposals/collaborative_drafts/compare.html.erb +2 -0
- data/app/views/decidim/proposals/collaborative_drafts/complete.html.erb +2 -0
- data/app/views/decidim/proposals/collaborative_drafts/edit.html.erb +3 -1
- data/app/views/decidim/proposals/collaborative_drafts/index.html.erb +4 -2
- data/app/views/decidim/proposals/collaborative_drafts/new.html.erb +4 -0
- data/app/views/decidim/proposals/collaborative_drafts/show.html.erb +29 -30
- data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +52 -22
- data/app/views/decidim/proposals/proposals/_endorsements_card_row.html.erb +0 -16
- data/app/views/decidim/proposals/proposals/_filters.html.erb +18 -16
- data/app/views/decidim/proposals/proposals/_proposal_badge.html.erb +1 -4
- data/app/views/decidim/proposals/proposals/_proposal_preview.html.erb +1 -11
- data/app/views/decidim/proposals/proposals/_proposal_similar.html.erb +2 -2
- data/app/views/decidim/proposals/proposals/_proposals.html.erb +14 -0
- data/app/views/decidim/proposals/proposals/_vote_button.html.erb +14 -7
- data/app/views/decidim/proposals/proposals/_wizard_aside.html.erb +4 -2
- data/app/views/decidim/proposals/proposals/_wizard_header.html.erb +4 -3
- data/app/views/decidim/proposals/proposals/compare.html.erb +2 -0
- data/app/views/decidim/proposals/proposals/complete.html.erb +2 -0
- data/app/views/decidim/proposals/proposals/edit.html.erb +3 -1
- data/app/views/decidim/proposals/proposals/edit_draft.html.erb +2 -0
- data/app/views/decidim/proposals/proposals/index.html.erb +6 -13
- data/app/views/decidim/proposals/proposals/new.html.erb +6 -2
- data/app/views/decidim/proposals/proposals/participatory_texts/_index.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb +10 -3
- data/app/views/decidim/proposals/proposals/participatory_texts/_view_index.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/preview.html.erb +7 -8
- data/app/views/decidim/proposals/proposals/show.html.erb +62 -50
- data/app/views/decidim/proposals/versions/index.html.erb +14 -32
- data/app/views/decidim/proposals/versions/show.html.erb +16 -34
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +62 -66
- data/config/locales/bg-BG.yml +237 -0
- data/config/locales/bg.yml +237 -0
- data/config/locales/ca.yml +176 -66
- data/config/locales/cs.yml +188 -78
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +169 -62
- data/config/locales/el.yml +876 -0
- data/config/locales/en.yml +179 -69
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +173 -63
- data/config/locales/es-PY.yml +173 -63
- data/config/locales/es.yml +179 -69
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +28 -61
- data/config/locales/fi-plain.yml +174 -64
- data/config/locales/fi.yml +210 -100
- data/config/locales/fr-CA.yml +906 -0
- data/config/locales/fr.yml +184 -66
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +28 -61
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +135 -63
- data/config/locales/id-ID.yml +28 -60
- data/config/locales/is-IS.yml +14 -30
- data/config/locales/is.yml +274 -0
- data/config/locales/it.yml +166 -80
- data/config/locales/ja-JP.yml +865 -0
- data/config/locales/ja.yml +889 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +858 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +151 -63
- data/config/locales/no.yml +62 -67
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +525 -392
- data/config/locales/pt-BR.yml +30 -66
- data/config/locales/pt.yml +439 -330
- data/config/locales/ro-RO.yml +841 -0
- data/config/locales/ru.yml +14 -45
- data/config/locales/sk-SK.yml +896 -0
- data/config/locales/sk.yml +869 -0
- data/config/locales/sl.yml +26 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +126 -0
- data/config/locales/sv.yml +285 -169
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +28 -61
- data/config/locales/uk.yml +14 -45
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +885 -0
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20181003074440_fix_user_groups_ids_in_proposals_endorsements.rb +4 -0
- data/db/migrate/20191206154128_add_endorsements_counter_cache_to_proposals.rb +7 -0
- data/db/migrate/20200120215928_move_proposal_endorsements_to_core_endorsements.rb +54 -0
- data/db/migrate/20200120230130_drop_proposal_endorsements.rb +8 -0
- data/db/migrate/20200203111239_add_proposal_valuation_assignments.rb +12 -0
- data/db/migrate/20200210135152_add_costs_to_proposals.rb +9 -0
- data/db/migrate/20200212120110_sync_proposals_state_with_amendments_state.rb +28 -0
- data/db/migrate/20200227175922_add_state_published_at_to_proposals.rb +7 -0
- data/db/migrate/20200306123652_publish_existing_proposals_state.rb +15 -0
- data/db/migrate/20200708091228_move_proposals_fields_to_i18n.rb +86 -0
- data/db/migrate/20200730131631_move_proposal_endorsed_event_notifications_to_resource_endorsed_event.rb +20 -0
- data/db/migrate/20200827154156_add_commentable_counter_cache_to_proposals.rb +12 -0
- data/db/migrate/20200915151348_fix_proposals_data_to_ensure_title_and_body_are_hashes.rb +37 -0
- data/db/migrate/20201002085508_fix_proposals_data.rb +37 -0
- data/lib/decidim/content_renderers/proposal_renderer.rb +3 -1
- data/lib/decidim/proposals.rb +1 -0
- data/lib/decidim/proposals/admin_engine.rb +7 -3
- data/lib/decidim/proposals/component.rb +55 -28
- data/lib/decidim/proposals/engine.rb +3 -7
- data/lib/decidim/proposals/markdown_to_proposals.rb +2 -2
- data/lib/decidim/proposals/proposal_serializer.rb +3 -3
- data/lib/decidim/proposals/test/capybara_proposals_picker.rb +49 -0
- data/lib/decidim/proposals/test/factories.rb +100 -28
- data/lib/decidim/proposals/valuatable.rb +21 -0
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +117 -55
- data/app/assets/javascripts/decidim/proposals/identity_selector_dialog.js.es6 +0 -56
- data/app/cells/decidim/proposals/endorsers_list/show.erb +0 -17
- data/app/cells/decidim/proposals/endorsers_list_cell.rb +0 -31
- data/app/commands/decidim/proposals/attachment_methods.rb +0 -43
- data/app/commands/decidim/proposals/endorse_proposal.rb +0 -59
- data/app/commands/decidim/proposals/unendorse_proposal.rb +0 -40
- data/app/controllers/decidim/proposals/proposal_endorsements_controller.rb +0 -60
- data/app/models/decidim/proposals/proposal_endorsement.rb +0 -37
- data/app/views/decidim/proposals/admin/proposal_answers/edit.html.erb +0 -22
- data/app/views/decidim/proposals/admin/proposal_notes/index.html.erb +0 -3
- data/app/views/decidim/proposals/admin/shared/_info_proposal.html.erb +0 -20
- data/app/views/decidim/proposals/proposal_endorsements/_identity.html.erb +0 -9
- data/app/views/decidim/proposals/proposal_endorsements/identities.html.erb +0 -12
- data/app/views/decidim/proposals/proposal_endorsements/update_buttons_and_counters.js.erb +0 -20
- data/app/views/decidim/proposals/proposal_widgets/show.html.erb +0 -4
- data/app/views/decidim/proposals/proposals/_endorsement_button.html.erb +0 -11
- data/app/views/decidim/proposals/proposals/_endorsement_identities_cabin.html.erb +0 -13
- data/app/views/decidim/proposals/versions/_version.html.erb +0 -20
@@ -1,8 +1,8 @@
|
|
1
1
|
<div class="columns large-3">
|
2
2
|
<div class="m-bottom">
|
3
3
|
<%= link_to :back do %>
|
4
|
-
<%= icon "chevron-left", class: "icon--small" %>
|
5
|
-
<%= wizard_aside_back_text %>
|
4
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
5
|
+
<%= wizard_aside_back_text("collaborative_draft") %>
|
6
6
|
<% end %>
|
7
7
|
</div>
|
8
8
|
<div class="section">
|
@@ -11,6 +11,8 @@
|
|
11
11
|
</p>
|
12
12
|
</div>
|
13
13
|
<div class="show-for-large">
|
14
|
+
<div><%= proposal_wizard_steps_title %></div>
|
15
|
+
<div><%= proposal_wizard_current_step_of(@step) %></div>
|
14
16
|
<%= proposal_wizard_stepper(@step) %>
|
15
17
|
</div>
|
16
18
|
</div>
|
@@ -1,6 +1,8 @@
|
|
1
|
+
<% add_decidim_page_title(proposal_wizard_step_title(action_name)) %>
|
2
|
+
|
1
3
|
<div class="row columns">
|
2
4
|
<%= link_to :back, class: "muted-link" do %>
|
3
|
-
<%= icon "chevron-left", class: "icon--small" %>
|
5
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
4
6
|
<%= t(".back") %>
|
5
7
|
<% end %>
|
6
8
|
<h2 class="section-heading"><%= t(".title") %></h2>
|
@@ -1,3 +1,5 @@
|
|
1
|
+
<% add_decidim_page_title(Decidim::Proposals::CollaborativeDraft.model_name.human(count: 2)) %>
|
2
|
+
|
1
3
|
<%= render partial: "decidim/shared/component_announcement" %>
|
2
4
|
|
3
5
|
<div class="row columns">
|
@@ -15,9 +17,9 @@
|
|
15
17
|
<%= render partial: "filters" %>
|
16
18
|
</div>
|
17
19
|
</div>
|
18
|
-
<div id="collaborative_drafts" class="columns mediumlarge-8 large-9">
|
20
|
+
<div id="collaborative_drafts" class="columns mediumlarge-8 large-9" aria-live="polite">
|
19
21
|
<%= render partial: "collaborative_drafts" %>
|
20
22
|
</div>
|
21
23
|
</div>
|
22
24
|
<%= javascript_include_tag "decidim/filters" %>
|
23
|
-
<%= javascript_include_tag "decidim/
|
25
|
+
<%= javascript_include_tag "decidim/results_listing" %>
|
@@ -1,3 +1,5 @@
|
|
1
|
+
<% add_decidim_page_title(proposal_wizard_step_title(action_name)) %>
|
2
|
+
|
1
3
|
<div class="row">
|
2
4
|
<%= render partial: "wizard_aside" %>
|
3
5
|
|
@@ -7,6 +9,8 @@
|
|
7
9
|
<div class="card">
|
8
10
|
<div class="card__content">
|
9
11
|
<%= decidim_form_for(@form, url: compare_collaborative_drafts_path, method: :get) do |form| %>
|
12
|
+
<%= form_required_explanation %>
|
13
|
+
|
10
14
|
<div class="field">
|
11
15
|
<%= form.text_field :title %>
|
12
16
|
</div>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
<% add_decidim_page_title(Decidim::Proposals::CollaborativeDraft.model_name.human(count: 2)) %>
|
1
2
|
<% add_decidim_meta_tags({
|
2
3
|
description: present(@collaborative_draft).body,
|
3
4
|
title: present(@collaborative_draft).title,
|
@@ -14,7 +15,7 @@
|
|
14
15
|
|
15
16
|
<div class="row column view-header">
|
16
17
|
<%= link_to collaborative_drafts_path do %>
|
17
|
-
<%= icon "chevron-left", class: "icon--small" %>
|
18
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
18
19
|
<%= t(".back") %>
|
19
20
|
<% end %>
|
20
21
|
|
@@ -26,15 +27,29 @@
|
|
26
27
|
</div>
|
27
28
|
|
28
29
|
<div class="row">
|
29
|
-
<div class="columns
|
30
|
+
<div class="columns mediumlarge-8 large-9">
|
31
|
+
<div class="section">
|
32
|
+
<%== cell("decidim/proposals/collaborative_draft_m", @collaborative_draft, full_badge: true).badge %>
|
33
|
+
|
34
|
+
<%= simple_format(present(@collaborative_draft).body(links: true, strip_tags: true), nil, sanitize: false) %>
|
35
|
+
|
36
|
+
<% if component_settings.geocoding_enabled? %>
|
37
|
+
<%= render partial: "decidim/shared/static_map", locals: { icon_name: "proposals", geolocalizable: @collaborative_draft } %>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<%= cell "decidim/tags", @collaborative_draft, context: { extra_classes: ["tags--collaborative-draft"] } %>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<div class="columns section view-side mediumlarge-4 large-3">
|
30
45
|
<% if allowed_to?(:publish, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
|
31
46
|
<div class="card text-center" id="collaborative_draft_publish">
|
32
47
|
<div class="card__content">
|
33
48
|
<%= cell "decidim/proposals/irreversible_action_modal", @collaborative_draft, action: :publish %>
|
34
|
-
<small>
|
49
|
+
<div class="text-small">
|
35
50
|
<%= t("publish_info", scope:"decidim.proposals.collaborative_drafts.show") %>
|
36
51
|
<%= cell "decidim/proposals/irreversible_action_modal", @collaborative_draft, action: :withdraw %>
|
37
|
-
</
|
52
|
+
</div>
|
38
53
|
</div>
|
39
54
|
</div>
|
40
55
|
<% end %>
|
@@ -45,29 +60,27 @@
|
|
45
60
|
<%= cell "decidim/proposals/collaborative_draft_link_to_proposal", @collaborative_draft %>
|
46
61
|
<% else %>
|
47
62
|
<div>
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
<%= t("of_versions", scope:"decidim.proposals.collaborative_drafts.show", number: "#{@collaborative_draft.versions_count}") %>
|
53
|
-
</small>
|
63
|
+
<%= resource_version_number(@collaborative_draft.versions_count, "text-large") %>
|
64
|
+
<div class="text-medium">
|
65
|
+
<%= resource_version_of(@collaborative_draft.versions_count) %>
|
66
|
+
</div>
|
54
67
|
</div>
|
55
68
|
|
56
69
|
<div>
|
57
70
|
<span class="text-medium">
|
58
|
-
<%=
|
71
|
+
<%= link_to_other_resource_versions(collaborative_draft_versions_path(@collaborative_draft)) %>
|
59
72
|
</span>
|
60
73
|
</div>
|
61
74
|
<% end %>
|
62
75
|
|
63
76
|
<% if allowed_to?(:edit, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
|
64
|
-
<%= link_to t("edit", scope:"decidim.proposals.collaborative_drafts.show"), edit_collaborative_draft_path(@collaborative_draft), class: "button
|
77
|
+
<%= link_to t("edit", scope:"decidim.proposals.collaborative_drafts.show"), edit_collaborative_draft_path(@collaborative_draft), class: "button hollow expanded button--sc mt-s", id: "collaborative_draft_edit" %>
|
65
78
|
<% end %>
|
66
79
|
|
67
80
|
<%= render "request_access_form" %>
|
68
81
|
|
69
82
|
<% if @collaborative_draft.requesters.include? current_user %>
|
70
|
-
<button type="button" class="button
|
83
|
+
<button type="button" class="button expanded button--sc mt-s">
|
71
84
|
<%= t("requested_access", scope:"decidim.proposals.collaborative_drafts.show") %>
|
72
85
|
</button>
|
73
86
|
<% end %>
|
@@ -77,21 +90,21 @@
|
|
77
90
|
<ul class="card-data">
|
78
91
|
<li class="card-data__item authors_status">
|
79
92
|
<%= with_tooltip t("decidim.proposals.models.collaborative_draft.fields.authors") do %>
|
80
|
-
<%= icon("people", class: "icon--small") + " " + "#{@collaborative_draft.versions.group_by(&:whodunnit).size}" %>
|
93
|
+
<%= icon("people", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.group_by(&:whodunnit).size}" %>
|
81
94
|
<% end %>
|
82
95
|
</li>
|
83
96
|
|
84
97
|
<li class="card-data__item versions_status">
|
85
98
|
<%= link_to collaborative_draft_versions_path(@collaborative_draft) do %>
|
86
99
|
<%= with_tooltip t("decidim.proposals.models.collaborative_draft.fields.contributions") do %>
|
87
|
-
<%= icon("pencil", class: "icon--small") + " " + "#{@collaborative_draft.versions.count}" %>
|
100
|
+
<%= icon("pencil", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.count}" %>
|
88
101
|
<% end %>
|
89
102
|
<% end %>
|
90
103
|
</li>
|
91
104
|
<li class="card-data__item">
|
92
105
|
<%= link_to "#comments" do %>
|
93
106
|
<%= with_tooltip t("decidim.proposals.models.collaborative_draft.fields.comments") do %>
|
94
|
-
<%= icon("comment-square", class: "icon--small") + " " + "#{@collaborative_draft.
|
107
|
+
<%= icon("comment-square", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.comments_count}" %>
|
95
108
|
<% end %>
|
96
109
|
<% end %>
|
97
110
|
</li>
|
@@ -105,20 +118,6 @@
|
|
105
118
|
|
106
119
|
<%= render partial: "decidim/shared/share_modal" %>
|
107
120
|
</div>
|
108
|
-
|
109
|
-
<div class="columns mediumlarge-8 mediumlarge-pull-4">
|
110
|
-
<div class="section">
|
111
|
-
<%== cell("decidim/proposals/collaborative_draft_m", @collaborative_draft, full_badge: true).badge %>
|
112
|
-
|
113
|
-
<%= simple_format(present(@collaborative_draft).body(links: true, strip_tags: true), nil, sanitize: false) %>
|
114
|
-
|
115
|
-
<% if component_settings.geocoding_enabled? %>
|
116
|
-
<%= render partial: "decidim/shared/static_map", locals: { icon_name: "proposals", geolocalizable: @collaborative_draft } %>
|
117
|
-
<% end %>
|
118
|
-
|
119
|
-
<%= cell "decidim/tags", @collaborative_draft, context: { extra_classes: ["tags--collaborative-draft"] } %>
|
120
|
-
</div>
|
121
|
-
</div>
|
122
121
|
</div>
|
123
122
|
|
124
123
|
<%= attachments_for @collaborative_draft %>
|
@@ -1,9 +1,11 @@
|
|
1
|
+
<%= form_required_explanation %>
|
2
|
+
|
1
3
|
<div class="field hashtags__container">
|
2
|
-
<%= form.text_field :title, class: "js-hashtags",
|
4
|
+
<%= form.text_field :title, class: "js-hashtags", value: form_presenter.title %>
|
3
5
|
</div>
|
4
6
|
|
5
7
|
<div class="field hashtags__container">
|
6
|
-
<%= form
|
8
|
+
<%= text_editor_for_proposal_body(form) %>
|
7
9
|
</div>
|
8
10
|
|
9
11
|
<% if @form.component_automatic_hashtags.any? %>
|
@@ -21,7 +23,7 @@
|
|
21
23
|
|
22
24
|
<% if @form.component_suggested_hashtags.any? %>
|
23
25
|
<div class="field">
|
24
|
-
<%= form.label :suggested_hashtags %>
|
26
|
+
<%= form.label :suggested_hashtags, nil, for: nil %>
|
25
27
|
<div class="checkboxes hashtags">
|
26
28
|
<%= form.collection_check_boxes :suggested_hashtags, @form.component_suggested_hashtags.map {|hashtag| [hashtag.downcase, "##{hashtag}"]}, :first, :last do |option|
|
27
29
|
option.label { option.check_box(checked: @form.suggested_hashtag_checked?(option.value)) + option.text }
|
@@ -30,25 +32,25 @@
|
|
30
32
|
</div>
|
31
33
|
<% end %>
|
32
34
|
|
33
|
-
<% if
|
35
|
+
<% if @form.geocoding_enabled? %>
|
34
36
|
<div class="field">
|
35
37
|
<%= form.check_box :has_address, checked: form_has_address? %>
|
36
38
|
</div>
|
37
39
|
|
38
40
|
<div class="field" id="address_input">
|
39
|
-
<%= form.
|
41
|
+
<%= form.geocoding_field :address %>
|
40
42
|
</div>
|
41
43
|
<% end %>
|
42
44
|
|
43
45
|
<% if @form.categories&.any? %>
|
44
46
|
<div class="field">
|
45
|
-
<%= form.categories_select :category_id, @form.categories,
|
47
|
+
<%= form.categories_select :category_id, @form.categories, include_blank: t("decidim.proposals.proposals.edit.select_a_category") %>
|
46
48
|
</div>
|
47
49
|
<% end %>
|
48
50
|
|
49
|
-
<% if
|
51
|
+
<% if current_component.has_subscopes? %>
|
50
52
|
<div class="field">
|
51
|
-
<%= scopes_picker_field form, :scope_id %>
|
53
|
+
<%= scopes_picker_field form, :scope_id, root: current_component.scope %>
|
52
54
|
</div>
|
53
55
|
<% end %>
|
54
56
|
|
@@ -59,23 +61,51 @@
|
|
59
61
|
<% end %>
|
60
62
|
|
61
63
|
<% if component_settings.attachments_allowed? && @proposal %>
|
64
|
+
<fieldset>
|
65
|
+
<legend><%= t("gallery_legend", scope: "decidim.proposals.proposals.edit") %></legend>
|
66
|
+
|
67
|
+
<% if @form.photos.any? %>
|
68
|
+
<% @form.photos.each do |photo| %>
|
69
|
+
<div class="callout gallery__item" data-closable>
|
70
|
+
<%= image_tag photo.thumbnail_url, class: "thumbnail", alt: photo.file.file.filename %>
|
71
|
+
<%= form.hidden_field :photos, multiple: true, value: photo.id, id: "photo-#{photo.id}" %>
|
72
|
+
<button class="close-button"
|
73
|
+
aria-label="<%= t("delete_image", scope: "decidim.proposals.proposals.edit") %>"
|
74
|
+
title="<%= t("delete_image", scope: "decidim.proposals.proposals.edit") %>"
|
75
|
+
type="button"
|
76
|
+
data-close>
|
77
|
+
<span aria-hidden="true">×</span>
|
78
|
+
</button>
|
79
|
+
</div>
|
80
|
+
<% end %>
|
81
|
+
<% end %>
|
82
|
+
|
83
|
+
<div class="row column">
|
84
|
+
<%= form.file_field :add_photos, multiple: false, label: t("add_images", scope: "decidim.proposals.proposals.edit") %>
|
85
|
+
</div>
|
86
|
+
</fieldset>
|
87
|
+
|
62
88
|
<fieldset>
|
63
89
|
<legend><%= t("attachment_legend", scope: "decidim.proposals.proposals.edit") %></legend>
|
64
|
-
<%= form.fields_for :attachment, @form.attachment do |nested_form| %>
|
65
|
-
<div class="field">
|
66
|
-
<%= nested_form.text_field :title %>
|
67
|
-
</div>
|
68
90
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
91
|
+
<% if @form.documents.any? %>
|
92
|
+
<% @form.documents.each do |document| %>
|
93
|
+
<div class="callout" data-closable>
|
94
|
+
<%= link_to translated_attribute(document.title), document.url %>
|
95
|
+
<small><%= document.file_type %> <%= number_to_human_size(document.file_size) %></small>
|
96
|
+
<%= form.hidden_field :documents, multiple: true, value: document.id, id: "document-#{document.id}" %>
|
97
|
+
<button class="close-button"
|
98
|
+
aria-label="<%= t("delete_document", scope: "decidim.proposals.proposals.edit") %>"
|
99
|
+
title="<%= t("delete_document", scope: "decidim.proposals.proposals.edit") %>"
|
100
|
+
type="button" data-close>
|
101
|
+
<span aria-hidden="true">×</span>
|
102
|
+
</button>
|
103
|
+
</div>
|
104
|
+
<% end %>
|
79
105
|
<% end %>
|
106
|
+
|
107
|
+
<div class="row column">
|
108
|
+
<%= form.file_field :add_documents, multiple: true, label: t("add_documents", scope: "decidim.proposals.proposals.edit") %>
|
109
|
+
</div>
|
80
110
|
</fieldset>
|
81
111
|
<% end %>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<% fully_endorsed= fully_endorsed?(@proposal, current_user) %>
|
2
|
-
<div class="row collapse buttons__row">
|
3
|
-
<% if endorsements_enabled? %>
|
4
|
-
<div class="column small-9 collapse">
|
5
|
-
<div class="button-group button-group--collapse button--nomargin small">
|
6
|
-
<%= render_endorsements_count_card_part(@proposal, fully_endorsed) %>
|
7
|
-
<%= render_endorsements_button_card_part(@proposal, fully_endorsed) %>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
<% end %>
|
11
|
-
<div class="column collapse <%= endorsements_enabled? ? "small-3" : "" %>">
|
12
|
-
<%= link_to "#comments", class: "button small compact hollow secondary button--nomargin expanded" do %>
|
13
|
-
<%= icon "comment-square", class: "icon--small", aria_label: t(".comments"), role: "img" %> <%= @proposal.comments.count %>
|
14
|
-
<% end %>
|
15
|
-
</div>
|
16
|
-
</div>
|
@@ -1,43 +1,45 @@
|
|
1
|
+
<%= render partial: "decidim/shared/filter_form_help", locals: { skip_to_id: "proposals" } %>
|
2
|
+
|
1
3
|
<%= filter_form_for filter do |form| %>
|
2
4
|
<div class="filters__section">
|
3
5
|
<div class="filters__search">
|
4
6
|
<div class="input-group">
|
5
|
-
<%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search") %>
|
7
|
+
<%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), data: { disable_dynamic_change: true } %>
|
6
8
|
<div class="input-group-button">
|
7
|
-
<button type="submit" class="button
|
8
|
-
<%= icon "magnifying-glass", aria_label: t(".search") %>
|
9
|
+
<button type="submit" class="button" aria-controls="proposals">
|
10
|
+
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
9
11
|
</button>
|
10
12
|
</div>
|
11
13
|
</div>
|
12
14
|
</div>
|
13
15
|
</div>
|
14
16
|
|
15
|
-
<% if
|
16
|
-
<%= form.
|
17
|
+
<% if component_settings.proposal_answering_enabled && current_settings.proposal_answering_enabled %>
|
18
|
+
<%= form.check_boxes_tree :state, filter_proposals_state_values, legend_title: t(".state"), "aria-controls": "proposals" %>
|
17
19
|
<% end %>
|
18
20
|
|
19
|
-
<% if
|
20
|
-
<%= form.
|
21
|
+
<% if current_component.has_subscopes? %>
|
22
|
+
<%= form.check_boxes_tree :scope_id, filter_scopes_values, legend_title: t(".scope"), "aria-controls": "proposals" %>
|
21
23
|
<% end %>
|
22
24
|
|
23
|
-
<% if
|
24
|
-
<%= form.
|
25
|
+
<% if current_component.categories.any? %>
|
26
|
+
<%= form.check_boxes_tree :category_id, filter_categories_values, legend_title: t(".category"), "aria-controls": "proposals" %>
|
25
27
|
<% end %>
|
26
28
|
|
27
|
-
<% if
|
28
|
-
<%= form.
|
29
|
+
<% if component_settings.official_proposals_enabled %>
|
30
|
+
<%= form.check_boxes_tree :origin, filter_origin_values, legend_title: t(".origin"), "aria-controls": "proposals" %>
|
29
31
|
<% end %>
|
30
32
|
|
31
33
|
<% if current_user %>
|
32
|
-
<%= form.collection_radio_buttons :activity, activity_filter_values, :first, :last, legend_title: t(".activity") %>
|
34
|
+
<%= form.collection_radio_buttons :activity, activity_filter_values, :first, :last, { legend_title: t(".activity") }, "aria-controls": "proposals" %>
|
33
35
|
<% end %>
|
34
36
|
|
35
|
-
<% if
|
36
|
-
<%=
|
37
|
+
<% if @proposals.only_emendations.any? %>
|
38
|
+
<%= form.collection_radio_buttons :type, filter_type_values, :first, :last, { legend_title: t(".amendment_type") }, "aria-controls": "proposals" %>
|
37
39
|
<% end %>
|
38
40
|
|
39
|
-
<% if
|
40
|
-
<%= form.
|
41
|
+
<% if linked_classes_for(Decidim::Proposals::Proposal).any? %>
|
42
|
+
<%= form.collection_radio_buttons :related_to, linked_classes_filter_values_for(Decidim::Proposals::Proposal), :first, :last, { legend_title: t(".related_to") }, "aria-controls": "proposals" %>
|
41
43
|
<% end %>
|
42
44
|
|
43
45
|
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
@@ -1,6 +1,3 @@
|
|
1
|
-
<% if proposal.
|
2
|
-
<span class="<%= proposal_state_badge_css_class(proposal.state) %> label proposal-status"><%= humanize_proposal_state proposal.state %></span>
|
3
|
-
<% end %>
|
4
|
-
<% if proposal.withdrawn? %>
|
1
|
+
<% if proposal.published_state? || proposal.withdrawn? %>
|
5
2
|
<span class="<%= proposal_state_badge_css_class(proposal.state) %> label proposal-status"><%= humanize_proposal_state proposal.state %></span>
|
6
3
|
<% end %>
|
@@ -1,11 +1 @@
|
|
1
|
-
|
2
|
-
<h2 class="heading2"><%= present(@proposal).title(links: true, html_escape: true) %></h2>
|
3
|
-
<% unless component_settings.participatory_texts_enabled? %>
|
4
|
-
<%= cell("decidim/coauthorships", @proposal) %>
|
5
|
-
<% end %>
|
6
|
-
</div>
|
7
|
-
<div class="row column">
|
8
|
-
<%= simple_format(present(@proposal).body(links: true, strip_tags: true), nil, sanitize: false) %>
|
9
|
-
</div>
|
10
|
-
<br>
|
11
|
-
<%= attachments_for(@proposal) %>
|
1
|
+
<%= card_for @proposal, from: @proposal, preview: true %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="column">
|
2
|
-
<
|
2
|
+
<div class="card card--proposal">
|
3
3
|
<div class="card__content">
|
4
4
|
<div class="card__header">
|
5
5
|
<%= link_to proposal, target: "_blank" do %>
|
@@ -18,5 +18,5 @@
|
|
18
18
|
<p><%= truncate(present(proposal).body(strip_tags: true), length: 100) %></p>
|
19
19
|
<%= cell "decidim/tags", proposal, context: { extra_classes: ["tags--proposal"] } %>
|
20
20
|
</div>
|
21
|
-
</
|
21
|
+
</div>
|
22
22
|
</div>
|
@@ -11,4 +11,18 @@
|
|
11
11
|
<div class="row small-up-1 medium-up-2 card-grid">
|
12
12
|
<%= render @proposals %>
|
13
13
|
</div>
|
14
|
+
|
15
|
+
<div class="row">
|
16
|
+
<div class="columns mediumlarge-8 large-9">
|
17
|
+
<% if @proposals.empty? %>
|
18
|
+
<div class="callout secondary">
|
19
|
+
<% if params[:filter].present? %>
|
20
|
+
<p><%= t(".empty_filters") %></p>
|
21
|
+
<% else %>
|
22
|
+
<p><%= t(".empty") %></p>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
</div>
|
14
28
|
<%= decidim_paginate @proposals %>
|