decidim-proposals 0.20.1 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/decidim/proposals/admin/proposals.es6 +24 -11
- 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/proposal_m_cell.rb +9 -1
- data/app/cells/decidim/proposals/proposal_tags/show.erb +12 -10
- data/app/cells/decidim/proposals/proposal_tags_cell.rb +5 -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 +5 -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/unassign_proposals_from_valuator.rb +62 -0
- data/app/commands/decidim/proposals/admin/update_proposal_scope.rb +75 -0
- data/app/controllers/concerns/decidim/proposals/admin/filterable.rb +82 -0
- 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 +105 -29
- data/app/controllers/decidim/proposals/admin/valuation_assignments_controller.rb +58 -0
- data/app/controllers/decidim/proposals/collaborative_drafts_controller.rb +19 -3
- data/app/controllers/decidim/proposals/proposals_controller.rb +42 -7
- data/app/controllers/decidim/proposals/versions_controller.rb +4 -1
- data/app/events/decidim/proposals/admin/update_proposal_scope_event.rb +11 -0
- data/app/forms/decidim/proposals/admin/proposal_answer_form.rb +27 -2
- data/app/forms/decidim/proposals/admin/valuation_assignment_form.rb +37 -0
- data/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb +8 -0
- 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 +122 -0
- data/app/helpers/decidim/proposals/application_helper.rb +36 -25
- data/app/helpers/decidim/proposals/collaborative_draft_helper.rb +9 -9
- data/app/helpers/decidim/proposals/proposal_cells_helper.rb +1 -1
- data/app/helpers/decidim/proposals/proposals_helper.rb +18 -0
- data/app/models/decidim/proposals/proposal.rb +163 -16
- data/app/models/decidim/proposals/valuation_assignment.rb +24 -0
- data/app/permissions/decidim/proposals/admin/permissions.rb +77 -11
- 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/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/proposal_presenter.rb +26 -1
- data/app/services/decidim/proposals/collaborative_draft_search.rb +18 -10
- data/app/services/decidim/proposals/proposal_search.rb +33 -40
- data/app/types/decidim/proposals/proposal_input_filter.rb +29 -0
- data/app/types/decidim/proposals/proposal_input_sort.rb +28 -0
- data/app/types/decidim/proposals/proposal_type.rb +35 -4
- data/app/types/decidim/proposals/proposals_type.rb +14 -17
- 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 +1 -1
- data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +8 -2
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +25 -17
- 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 +16 -7
- 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/_filters.html.erb +3 -3
- data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_filters.html.erb +12 -12
- data/app/views/decidim/proposals/proposals/_proposal_badge.html.erb +1 -4
- data/app/views/decidim/proposals/proposals/_proposal_preview.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_vote_button.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/index.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/new.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/show.html.erb +17 -23
- data/config/locales/ar.yml +69 -17
- data/config/locales/ca.yml +113 -18
- data/config/locales/cs.yml +123 -31
- data/config/locales/de.yml +38 -18
- data/config/locales/el.yml +1 -0
- data/config/locales/en.yml +112 -17
- data/config/locales/es-MX.yml +112 -17
- data/config/locales/es-PY.yml +112 -17
- data/config/locales/es.yml +113 -18
- data/config/locales/eu.yml +38 -18
- data/config/locales/fi-plain.yml +113 -18
- data/config/locales/fi.yml +113 -18
- data/config/locales/fr.yml +38 -18
- data/config/locales/gl.yml +38 -18
- data/config/locales/hu.yml +112 -17
- data/config/locales/id-ID.yml +38 -18
- data/config/locales/is-IS.yml +25 -15
- data/config/locales/it.yml +38 -18
- data/config/locales/nl.yml +43 -18
- data/config/locales/no.yml +66 -18
- data/config/locales/pl.yml +38 -18
- data/config/locales/pt-BR.yml +39 -19
- data/config/locales/pt.yml +39 -19
- data/config/locales/ru.yml +25 -17
- data/config/locales/sv.yml +39 -18
- data/config/locales/tr-TR.yml +38 -18
- data/config/locales/uk.yml +25 -17
- 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/lib/decidim/proposals.rb +1 -0
- data/lib/decidim/proposals/admin_engine.rb +7 -3
- data/lib/decidim/proposals/component.rb +39 -19
- data/lib/decidim/proposals/engine.rb +1 -1
- data/lib/decidim/proposals/test/factories.rb +55 -0
- data/lib/decidim/proposals/valuatable.rb +21 -0
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +53 -36
- 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_widgets/show.html.erb +0 -4
@@ -1,22 +0,0 @@
|
|
1
|
-
<%= render "decidim/proposals/admin/shared/info_proposal" %>
|
2
|
-
<%= decidim_form_for(@form, url: proposal_proposal_answer_path(proposal, @form), html: { class: "form edit_proposal_answer" }) do |f| %>
|
3
|
-
<div class="card">
|
4
|
-
<div class="card-divider">
|
5
|
-
<h2 class="card-title"><%= t ".title", title: present(proposal).title %></h2>
|
6
|
-
</div>
|
7
|
-
|
8
|
-
<div class="card-section">
|
9
|
-
<div class="row column">
|
10
|
-
<%= f.collection_radio_buttons :state, [["accepted", t(".accepted")], ["rejected", t(".rejected")], ["evaluating", t(".evaluating")]], :first, :last, prompt: true %>
|
11
|
-
</div>
|
12
|
-
|
13
|
-
<div class="row column">
|
14
|
-
<%= f.translated :editor, :answer, autofocus: true, rows: 15 %>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="button--double form-general-submit">
|
20
|
-
<%= f.submit t(".answer_proposal") %>
|
21
|
-
</div>
|
22
|
-
<% end %>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<div class="card">
|
2
|
-
<div class="card-divider">
|
3
|
-
<h2 class="card-title">
|
4
|
-
<%= link_to "#{t ".proposals"} > ", proposals_path %>
|
5
|
-
<%= decidim_html_escape(present(proposal).title).html_safe %>
|
6
|
-
</h2>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div class="card-section">
|
10
|
-
<div class="row column">
|
11
|
-
<strong><%= t ".body" %>:</strong> <%= simple_format(present(proposal).body(strip_tags: true)) %>
|
12
|
-
</div>
|
13
|
-
<div class="row column">
|
14
|
-
<strong><%= t ".created_at" %>:</strong> <%= l proposal.created_at, format: :decidim_short %>
|
15
|
-
</div>
|
16
|
-
<div class="row column">
|
17
|
-
<strong><%= t ".proposal_votes_count" %>:</strong> <%= proposal.proposal_votes_count %>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
</div>
|