decidim-proposals 0.28.5 → 0.29.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -18
- data/app/cells/decidim/proposals/cost_report_cell.rb +0 -3
- data/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb +11 -11
- data/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb +1 -1
- data/app/cells/decidim/proposals/participatory_text_proposal/buttons.erb +1 -1
- data/app/cells/decidim/proposals/participatory_text_proposal_cell.rb +2 -3
- data/app/cells/decidim/proposals/proposal_cell.rb +2 -0
- data/app/cells/decidim/proposals/proposal_g/show.erb +23 -0
- data/app/cells/decidim/proposals/proposal_g_cell.rb +48 -0
- data/app/cells/decidim/proposals/proposal_l_cell.rb +18 -19
- data/app/cells/decidim/proposals/proposal_metadata_cell.rb +23 -15
- data/app/commands/decidim/proposals/admin/answer_proposal.rb +2 -1
- data/app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb +7 -5
- data/app/commands/decidim/proposals/admin/create_proposal.rb +4 -6
- data/app/commands/decidim/proposals/admin/create_proposal_state.rb +15 -0
- data/app/commands/decidim/proposals/admin/destroy_proposal_state.rb +10 -0
- data/app/commands/decidim/proposals/admin/import_proposals.rb +10 -2
- data/app/commands/decidim/proposals/admin/notify_proposal_answer.rb +4 -21
- data/app/commands/decidim/proposals/admin/unassign_proposals_from_valuator.rb +6 -4
- data/app/commands/decidim/proposals/admin/update_proposal_state.rb +13 -0
- data/app/commands/decidim/proposals/create_proposal.rb +21 -2
- data/app/commands/decidim/proposals/update_proposal.rb +2 -2
- data/app/commands/decidim/proposals/vote_proposal.rb +1 -1
- data/app/commands/decidim/proposals/withdraw_proposal.rb +3 -7
- data/app/controllers/concerns/decidim/proposals/admin/filterable.rb +10 -22
- data/app/controllers/decidim/proposals/admin/proposal_states_controller.rb +86 -0
- data/app/controllers/decidim/proposals/admin/proposals_controller.rb +4 -0
- data/app/controllers/decidim/proposals/admin/valuation_assignments_controller.rb +8 -11
- data/app/controllers/decidim/proposals/proposals_controller.rb +38 -39
- data/app/events/decidim/proposals/proposal_state_changed_event.rb +37 -0
- data/app/forms/decidim/proposals/admin/proposal_answer_form.rb +8 -4
- data/app/forms/decidim/proposals/admin/proposal_form.rb +1 -1
- data/app/forms/decidim/proposals/admin/proposal_state_form.rb +22 -0
- data/app/forms/decidim/proposals/admin/proposals_fork_form.rb +1 -1
- data/app/forms/decidim/proposals/admin/proposals_import_form.rb +1 -1
- data/app/forms/decidim/proposals/admin/valuation_assignment_form.rb +12 -14
- data/app/forms/decidim/proposals/proposal_form.rb +25 -4
- data/app/forms/decidim/proposals/reject_access_to_collaborative_draft_form.rb +1 -1
- data/app/forms/decidim/proposals/request_access_to_collaborative_draft_form.rb +1 -1
- data/app/helpers/decidim/proposals/admin/proposal_bulk_actions_helper.rb +7 -17
- data/app/helpers/decidim/proposals/admin/proposals_helper.rb +13 -89
- data/app/helpers/decidim/proposals/application_helper.rb +16 -10
- data/app/helpers/decidim/proposals/map_helper.rb +1 -1
- data/app/helpers/decidim/proposals/proposal_cells_helper.rb +6 -2
- data/app/helpers/decidim/proposals/proposal_votes_helper.rb +3 -3
- data/app/helpers/decidim/proposals/proposal_wizard_helper.rb +5 -8
- data/app/helpers/decidim/proposals/proposals_helper.rb +18 -24
- data/app/models/decidim/proposals/proposal.rb +83 -29
- data/app/models/decidim/proposals/proposal_state.rb +58 -0
- data/app/packs/documents/decidim/proposals/participatory_texts/participatory_text.md +1 -3
- data/app/packs/images/decidim/proposals/proposal-placeholder-card-g.svg +15 -0
- data/app/packs/src/decidim/proposals/add_proposal.js +2 -0
- data/app/packs/src/decidim/proposals/admin/proposals.js +43 -8
- data/app/packs/stylesheets/decidim/proposals/proposals.scss +39 -1
- data/app/permissions/decidim/proposals/admin/permissions.rb +16 -4
- data/app/permissions/decidim/proposals/permissions.rb +3 -4
- data/app/presenters/decidim/proposals/admin_log/proposal_state_presenter.rb +21 -0
- data/app/presenters/decidim/proposals/proposal_presenter.rb +12 -3
- data/app/queries/decidim/proposals/metrics/endorsements_metric_manage.rb +1 -1
- data/app/queries/decidim/proposals/metrics/proposal_followers_metric_measure.rb +1 -1
- data/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb +4 -4
- data/app/queries/decidim/proposals/metrics/proposals_metric_manage.rb +1 -1
- data/app/queries/decidim/proposals/metrics/votes_metric_manage.rb +1 -1
- data/app/services/decidim/proposals/diff_renderer.rb +1 -3
- data/app/services/decidim/proposals/proposal_builder.rb +1 -1
- data/app/views/decidim/proposals/admin/imports/_proposals_fields.html.erb +1 -1
- data/app/views/decidim/proposals/admin/participatory_texts/index.html.erb +3 -2
- data/app/views/decidim/proposals/admin/proposal_answers/_form.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposal_notes/_proposal_notes.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposal_states/_form.html.erb +67 -0
- data/app/views/decidim/proposals/admin/proposal_states/edit.html.erb +18 -0
- data/app/views/decidim/proposals/admin/proposal_states/index.html.erb +50 -0
- data/app/views/decidim/proposals/admin/proposal_states/new.html.erb +18 -0
- data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +6 -12
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +6 -6
- data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_assign_to_valuator.html.erb +11 -7
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_dropdown.html.erb +7 -5
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_merge.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_publish_answers.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_recategorize.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_scope-change.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_split.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_unassign_from_valuator.html.erb +11 -7
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_valuators_picker.html.erb +12 -0
- data/app/views/decidim/proposals/admin/proposals/index.html.erb +11 -7
- data/app/views/decidim/proposals/admin/proposals/publish_answers.js.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/show.html.erb +3 -2
- data/app/views/decidim/proposals/admin/proposals/update_attribute.js.erb +3 -3
- data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +12 -5
- data/app/views/decidim/proposals/proposals/_proposal.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_proposal_aside.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_proposals.html.erb +9 -3
- data/app/views/decidim/proposals/proposals/_vote_button.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_voting_rules.html.erb +3 -3
- data/app/views/decidim/proposals/proposals/_wizard_header.html.erb +0 -1
- data/app/views/decidim/proposals/proposals/index.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/index.js.erb +0 -12
- data/app/views/decidim/proposals/proposals/new.html.erb +2 -7
- data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb +4 -4
- data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb +8 -8
- data/app/views/decidim/proposals/proposals/preview.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/show.html.erb +3 -3
- data/config/locales/ar.yml +9 -115
- data/config/locales/bg.yml +117 -111
- data/config/locales/ca.yml +86 -83
- data/config/locales/cs.yml +65 -127
- data/config/locales/de.yml +128 -125
- data/config/locales/el.yml +8 -121
- data/config/locales/en.yml +110 -107
- data/config/locales/es-MX.yml +85 -82
- data/config/locales/es-PY.yml +88 -85
- data/config/locales/es.yml +83 -80
- data/config/locales/eu.yml +166 -170
- data/config/locales/fi-plain.yml +90 -87
- data/config/locales/fi.yml +139 -136
- data/config/locales/fr-CA.yml +92 -87
- data/config/locales/fr.yml +83 -78
- data/config/locales/ga-IE.yml +1 -27
- data/config/locales/gl.yml +11 -107
- data/config/locales/he-IL.yml +0 -17
- data/config/locales/hu.yml +18 -90
- data/config/locales/id-ID.yml +6 -106
- data/config/locales/is-IS.yml +8 -33
- data/config/locales/it.yml +14 -103
- data/config/locales/ja.yml +117 -112
- data/config/locales/lb.yml +1 -0
- data/config/locales/lt.yml +6 -123
- data/config/locales/lv.yml +4 -101
- data/config/locales/nl.yml +11 -102
- data/config/locales/no.yml +7 -108
- data/config/locales/pl.yml +110 -115
- data/config/locales/pt-BR.yml +10 -84
- data/config/locales/pt.yml +9 -109
- data/config/locales/ro-RO.yml +15 -117
- data/config/locales/ru.yml +9 -53
- data/config/locales/sk.yml +5 -109
- data/config/locales/sl.yml +4 -0
- data/config/locales/sv.yml +142 -337
- data/config/locales/tr-TR.yml +64 -108
- data/config/locales/uk.yml +11 -55
- data/config/locales/zh-CN.yml +5 -100
- data/config/locales/zh-TW.yml +8 -119
- data/db/migrate/20240110203500_add_withdrawn_at_field_to_proposals.rb +27 -0
- data/db/migrate/20240110203501_create_decidim_proposals_proposal_state.rb +14 -0
- data/db/migrate/20240110203502_add_state_id_to_decidim_proposals_proposals.rb +13 -0
- data/db/migrate/20240110203503_remove_state_from_decidim_proposals_proposals.rb +11 -0
- data/db/migrate/20240110203504_create_default_proposal_states.rb +31 -0
- data/db/migrate/20240209092404_change_color_fields_on_proposals_states.rb +54 -0
- data/decidim-proposals.gemspec +3 -3
- data/lib/decidim/api/proposal_type.rb +4 -13
- data/lib/decidim/api/proposals_type.rb +3 -1
- data/lib/decidim/proposals/admin_engine.rb +8 -0
- data/lib/decidim/proposals/admin_filter.rb +37 -0
- data/lib/decidim/proposals/component.rb +8 -5
- data/lib/decidim/proposals/engine.rb +1 -15
- data/lib/decidim/proposals/import/proposal_answer_creator.rb +6 -6
- data/lib/decidim/proposals/import/proposal_creator.rb +1 -1
- data/lib/decidim/proposals/markdown_to_proposals.rb +2 -8
- data/lib/decidim/proposals/proposal_serializer.rb +8 -9
- data/lib/decidim/proposals/seeds.rb +60 -51
- data/lib/decidim/proposals/test/factories.rb +69 -14
- data/lib/decidim/proposals/version.rb +1 -1
- data/lib/decidim/proposals.rb +84 -12
- data/lib/tasks/proposals/upgrade/{decdim_proposals_upgrade_tasks.rake → decidim_proposals_upgrade_tasks.rake} +0 -13
- metadata +51 -40
- data/app/events/decidim/proposals/accepted_proposal_event.rb +0 -17
- data/app/events/decidim/proposals/evaluating_proposal_event.rb +0 -11
- data/app/events/decidim/proposals/rejected_proposal_event.rb +0 -17
- data/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb +0 -44
- data/app/queries/decidim/proposals/similar_proposals.rb +0 -67
- data/app/services/decidim/proposals/collaborative_draft_diff_renderer.rb +0 -22
- data/app/views/decidim/proposals/proposals/_endorsements_card_row.html.erb +0 -0
- data/app/views/decidim/proposals/proposals/_proposal_badge.html.erb +0 -3
- data/app/views/decidim/proposals/proposals/compare.html.erb +0 -24
- data/app/views/decidim/proposals/proposals/complete.html.erb +0 -31
- data/config/locales/bn-BD.yml +0 -1
- data/config/locales/bs-BA.yml +0 -100
@@ -1,16 +1,16 @@
|
|
1
1
|
<div class="form__wrapper">
|
2
2
|
<div class="card pt-4">
|
3
3
|
<div class="card-section">
|
4
|
-
<div class="row column
|
4
|
+
<div class="row column pb-4">
|
5
5
|
<%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true, aria: { label: :title } %>
|
6
6
|
</div>
|
7
|
-
<div class="row column
|
7
|
+
<div class="row column">
|
8
8
|
<%= form.translated :editor, :body, hashtaggable: true, aria: { label: :body } %>
|
9
9
|
</div>
|
10
10
|
<% if @form.component_automatic_hashtags.any? %>
|
11
|
-
<div
|
11
|
+
<div>
|
12
12
|
<%= form.label :automatic_hashtags %>
|
13
|
-
<div class="
|
13
|
+
<div class="hashtags">
|
14
14
|
<% @form.component_automatic_hashtags.each do |hashtag| %>
|
15
15
|
<label>
|
16
16
|
<%= check_box_tag "", "", { checked: true }, { disabled: true } %>#<%= hashtag %>
|
@@ -20,9 +20,9 @@
|
|
20
20
|
</div>
|
21
21
|
<% end %>
|
22
22
|
<% if @form.component_suggested_hashtags.any? %>
|
23
|
-
<div
|
23
|
+
<div>
|
24
24
|
<%= form.label :suggested_hashtags %>
|
25
|
-
<div class="
|
25
|
+
<div class="hashtags">
|
26
26
|
<%= form.collection_check_boxes :suggested_hashtags, @form.component_suggested_hashtags.map { |hashtag| [hashtag.downcase, "##{hashtag}"] }, :first, :last do |option|
|
27
27
|
option.label { option.check_box(checked: @form.suggested_hashtag_checked?(option.value)) + option.text }
|
28
28
|
end %>
|
@@ -56,11 +56,11 @@
|
|
56
56
|
</td>
|
57
57
|
|
58
58
|
<td class="valuators-count">
|
59
|
-
<%= proposal.
|
59
|
+
<%= proposal.valuation_assignments_count %>
|
60
60
|
</td>
|
61
61
|
|
62
62
|
<td>
|
63
|
-
<strong class="label <%= proposal_state_css_class proposal %>">
|
63
|
+
<strong class="label <%= proposal_state_css_class proposal %>" style="<%= proposal_state_css_style proposal %>">
|
64
64
|
<%= t("decidim/amendment", scope: "activerecord.models", count: 1) if proposal.emendation? %>
|
65
65
|
<%= proposal_complete_state proposal %>
|
66
66
|
</strong>
|
@@ -1,15 +1,19 @@
|
|
1
|
-
<div id="js-assign-proposals-to-valuator-actions" class="
|
2
|
-
<%= form_tag(valuation_assignment_path, method: :post, id: "js-form-assign-proposals-to-valuator", class: "form form-defaults
|
3
|
-
<div class="
|
1
|
+
<div id="js-assign-proposals-to-valuator-actions" class="item_show__header__action-options js-bulk-action-form hide">
|
2
|
+
<%= form_tag(valuation_assignment_path, method: :post, id: "js-form-assign-proposals-to-valuator", class: "form form-defaults w-full") do %>
|
3
|
+
<div class="hide">
|
4
4
|
<% proposals.each do |proposal| %>
|
5
5
|
<%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %>
|
6
6
|
<% end %>
|
7
7
|
</div>
|
8
8
|
|
9
|
-
|
9
|
+
<label class="w-full font-semibold" for="assign_valuator_role_ids">
|
10
|
+
<%= t("decidim.proposals.admin.proposals.index.assign_to_valuator") %>
|
11
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/valuators_picker", locals: { participatory_space: current_participatory_space, select_id: "assign_valuator_role_ids" } %>
|
12
|
+
</label>
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
+
<div class="flex justify-end gap-x-4 mt-2">
|
15
|
+
<%= submit_tag(t("decidim.proposals.admin.proposals.index.assign_to_valuator_button"), id: "js-submit-assign-proposals-to-valuator", class: "button button__sm button__secondary small button--simple float-left") %>
|
16
|
+
<button class="button button__sm button__secondary js-cancel-bulk-action" type="button"><%= t("decidim.proposals.admin.proposals.index.cancel") %></button>
|
17
|
+
</div>
|
14
18
|
<% end %>
|
15
19
|
</div>
|
@@ -42,11 +42,13 @@
|
|
42
42
|
<%= t("decidim.proposals.admin.proposals.index.assign_to_valuator") %>
|
43
43
|
</button>
|
44
44
|
</li>
|
45
|
-
|
46
|
-
<
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
<% if allowed_to? :unassign_from_valuator, :proposals, valuator: current_user %>
|
46
|
+
<li>
|
47
|
+
<button type="button" data-action="unassign-proposals-from-valuator">
|
48
|
+
<%= t("decidim.proposals.admin.proposals.index.unassign_from_valuator") %>
|
49
|
+
</button>
|
50
|
+
</li>
|
51
|
+
<% end %>
|
50
52
|
<li>
|
51
53
|
<button type="button" data-action="publish-answers">
|
52
54
|
<%= t("decidim.proposals.admin.proposals.index.publish_answers") %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div id="js-merge-proposals-actions" class="js-bulk-action-form">
|
2
2
|
<%= form_tag(proposals_merge_path, method: :post, id: "js-form-merge-proposals", class: "form form-defaults flex items-center gap-x-2") do %>
|
3
|
-
<div class="
|
3
|
+
<div class="hide">
|
4
4
|
<% proposals.each do |proposal| %>
|
5
5
|
<%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %>
|
6
6
|
<% end %>
|
@@ -10,6 +10,6 @@
|
|
10
10
|
|
11
11
|
<%= submit_tag(t("decidim.proposals.admin.proposals.index.merge_button"), id: "js-submit-merge-proposals", class: "button button__sm button__secondary small button--simple float-left") %>
|
12
12
|
|
13
|
-
<button id="js-cancel-merge-proposals" class="button button__sm button__secondary
|
13
|
+
<button id="js-cancel-merge-proposals" class="button button__sm button__secondary js-cancel-bulk-action" type="button"><%= t("decidim.proposals.admin.proposals.index.cancel") %></button>
|
14
14
|
<% end %>
|
15
15
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div id="js-publish-answers-actions" class="hide js-bulk-action-form">
|
2
2
|
<%= form_tag(publish_answers_proposals_path, method: :post, remote: true, id: "js-form-publish-answers", class: "flex align-middle text-center gap-x-4 ml-auto") do %>
|
3
|
-
<div class="
|
3
|
+
<div class="hide">
|
4
4
|
<% proposals.each do |proposal| %>
|
5
5
|
<%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %>
|
6
6
|
<% end %>
|
@@ -9,6 +9,6 @@
|
|
9
9
|
|
10
10
|
<%= submit_tag(t("decidim.proposals.admin.proposals.index.publish"), id: "js-submit-publish-answers", class: "button button__sm button__secondary small button--simple float-left") %>
|
11
11
|
|
12
|
-
<button id="js-cancel-publish-answers" class="button button__sm button__secondary button__sm button__secondary
|
12
|
+
<button id="js-cancel-publish-answers" class="button button__sm button__secondary button__sm button__secondary js-cancel-bulk-action" type="button"><%= t("decidim.proposals.admin.proposals.index.cancel") %></button>
|
13
13
|
<% end %>
|
14
14
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div id="js-recategorize-proposals-actions" class="hide js-bulk-action-form">
|
2
2
|
<%= form_tag(update_category_proposals_path, method: :post, remote: true, id: "js-form-recategorize-proposals", class: "form form-defaults flex items-center gap-x-2") do %>
|
3
|
-
<div class="
|
3
|
+
<div class="hide">
|
4
4
|
<% proposals.each do |proposal| %>
|
5
5
|
<%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %>
|
6
6
|
<% end %>
|
@@ -10,6 +10,6 @@
|
|
10
10
|
|
11
11
|
<%= submit_tag(t("decidim.proposals.admin.proposals.index.update"), id: "js-submit-edit-category", class: "button button__sm button__secondary small button--simple float-left") %>
|
12
12
|
|
13
|
-
<button id="js-cancel-edit-category" class="button button__sm button__secondary
|
13
|
+
<button id="js-cancel-edit-category" class="button button__sm button__secondary js-cancel-bulk-action" type="button"><%= t("decidim.proposals.admin.proposals.index.cancel") %></button>
|
14
14
|
<% end %>
|
15
15
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div id="js-scope-change-proposals-actions" class="hide js-bulk-action-form">
|
2
2
|
<%= form_tag(update_scope_proposals_path, method: :post, remote: true, id: "js-form-scope-change-proposals", class: "form form-defaults flex items-center gap-x-2") do %>
|
3
|
-
<div class="
|
3
|
+
<div class="hide">
|
4
4
|
<% proposals.each do |proposal| %>
|
5
5
|
<%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %>
|
6
6
|
<% end %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
class: "button button__sm button__secondary small button--simple float-left"
|
15
15
|
) %>
|
16
16
|
|
17
|
-
<button id="js-cancel-scope-change-proposals" class="button button__sm button__secondary button__sm button__secondary
|
17
|
+
<button id="js-cancel-scope-change-proposals" class="button button__sm button__secondary button__sm button__secondary js-cancel-bulk-action" type="button">
|
18
18
|
<%= t("decidim.proposals.admin.proposals.index.cancel") %>
|
19
19
|
</button>
|
20
20
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div id="js-split-proposals-actions" class="hide js-bulk-action-form">
|
2
2
|
<%= form_tag(proposals_split_path, method: :post, id: "js-form-split-proposals", class: "form form-defaults flex items-center gap-x-2") do %>
|
3
|
-
<div class="
|
3
|
+
<div class="hide">
|
4
4
|
<% proposals.each do |proposal| %>
|
5
5
|
<%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %>
|
6
6
|
<% end %>
|
@@ -10,6 +10,6 @@
|
|
10
10
|
|
11
11
|
<%= submit_tag(t("decidim.proposals.admin.proposals.index.split_button"), id: "js-submit-split-proposals", class: "button button__sm button__secondary small button--simple float-left") %>
|
12
12
|
|
13
|
-
<button id="js-cancel-split-proposals" class="button button__sm button__secondary
|
13
|
+
<button id="js-cancel-split-proposals" class="button button__sm button__secondary js-cancel-bulk-action" type="button"><%= t("decidim.proposals.admin.proposals.index.cancel") %></button>
|
14
14
|
<% end %>
|
15
15
|
</div>
|
data/app/views/decidim/proposals/admin/proposals/bulk_actions/_unassign_from_valuator.html.erb
CHANGED
@@ -1,15 +1,19 @@
|
|
1
|
-
<div id="js-unassign-proposals-from-valuator-actions" class="
|
2
|
-
<%= form_tag(valuation_assignment_path, method: :delete, id: "js-form-unassign-proposals-from-valuator", class: "form form-defaults
|
3
|
-
<div class="
|
1
|
+
<div id="js-unassign-proposals-from-valuator-actions" class="item_show__header__action-options js-bulk-action-form hide">
|
2
|
+
<%= form_tag(valuation_assignment_path, method: :delete, id: "js-form-unassign-proposals-from-valuator", class: "form form-defaults w-full") do %>
|
3
|
+
<div class="hide">
|
4
4
|
<% proposals.each do |proposal| %>
|
5
5
|
<%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %>
|
6
6
|
<% end %>
|
7
7
|
</div>
|
8
8
|
|
9
|
-
|
9
|
+
<label class="w-full font-semibold" for="unassign_valuator_role_ids">
|
10
|
+
<%= t("decidim.proposals.admin.proposals.index.unassign_from_valuator") %>
|
11
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/valuators_picker", locals: { participatory_space: current_participatory_space, select_id: "unassign_valuator_role_ids" } %>
|
12
|
+
</label>
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
+
<div class="flex justify-end gap-x-4 mt-2">
|
15
|
+
<%= submit_tag(t("decidim.proposals.admin.proposals.index.unassign_from_valuator_button"), id: "js-submit-unassign-proposals-from-valuator", class: "button button__sm button__secondary small button--simple float-left") %>
|
16
|
+
<button class="button button__sm button__secondary js-cancel-bulk-action" type="button"><%= t("decidim.proposals.admin.proposals.index.cancel") %></button>
|
17
|
+
</div>
|
14
18
|
<% end %>
|
15
19
|
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= append_stylesheet_pack_tag "decidim_proposals", media: "all" %>
|
2
|
+
|
3
|
+
<select
|
4
|
+
id="<%= select_id %>"
|
5
|
+
name="valuator_role_ids[]"
|
6
|
+
placeholder="<%= t("decidim.proposals.admin.proposals.index.select_valuators") %>"
|
7
|
+
class="w-full mt-2 js-valuator-multiselect"
|
8
|
+
multiple>
|
9
|
+
<%= find_valuators_for_select(participatory_space, current_user).map do |option| %>
|
10
|
+
<option value="<%= option[1] %>"><%= option[0] %></option>
|
11
|
+
<% end %>
|
12
|
+
</select>
|
@@ -1,19 +1,23 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
2
|
<div class="card">
|
3
|
-
<div class="item_show__header">
|
3
|
+
<div class="item_show__header item_show__header--with-action-options">
|
4
4
|
<h1 class="item_show__header-title">
|
5
5
|
<div>
|
6
6
|
<%= t(".title") %>
|
7
|
-
<span id="js-selected-proposals-count" class="component-counter
|
7
|
+
<span id="js-selected-proposals-count" class="component-counter " title="<%= t("decidim.proposals.admin.proposals.index.selected") %>"></span>
|
8
8
|
</div>
|
9
9
|
<div class="flex items-center gap-x-4">
|
10
10
|
<%= render partial: "bulk-actions" %>
|
11
|
+
<%= link_to t(".statuses"), proposal_states_path, class: "button button__sm button__secondary" %>
|
11
12
|
<%= render partial: "decidim/admin/components/resource_action" %>
|
12
13
|
</div>
|
13
14
|
</h1>
|
15
|
+
|
16
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/assign_to_valuator" %>
|
17
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/unassign_from_valuator" %>
|
14
18
|
</div>
|
15
|
-
<%= admin_filter_selector(
|
16
|
-
<div class="table-scroll mt-
|
19
|
+
<%= admin_filter_selector(filter_prefix_key) %>
|
20
|
+
<div class="table-scroll mt-8">
|
17
21
|
<table class="table-list">
|
18
22
|
<thead>
|
19
23
|
<tr>
|
@@ -21,7 +25,7 @@
|
|
21
25
|
<%= check_box_tag "proposals_bulk", "all", false, class: "js-check-all" %>
|
22
26
|
</th>
|
23
27
|
<th class="!text-left">
|
24
|
-
<%= sort_link(query, :
|
28
|
+
<%= sort_link(query, :title, t("models.proposal.fields.title", scope: "decidim.proposals") ) %>
|
25
29
|
</th>
|
26
30
|
<th>
|
27
31
|
<%= sort_link(query, :published_at, t("models.proposal.fields.published_at", scope: "decidim.proposals") ) %>
|
@@ -54,10 +58,10 @@
|
|
54
58
|
</th>
|
55
59
|
|
56
60
|
<th>
|
57
|
-
<%= t("models.proposal.fields.state", scope: "decidim.proposals") %>
|
61
|
+
<%= sort_link(query, :state, [:state, :is_emendation], t("models.proposal.fields.state", scope: "decidim.proposals") ) %>
|
58
62
|
</th>
|
59
63
|
|
60
|
-
<th
|
64
|
+
<th><%= t("actions.title", scope: "decidim.proposals") %></th>
|
61
65
|
</tr>
|
62
66
|
</thead>
|
63
67
|
<tbody>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
$("<%= escape_javascript(render partial: %q(decidim/admin/shared/js-callout), locals: { css: %q(success), text: flash.now[:notice] }) %>").appendTo("
|
1
|
+
$("<%= escape_javascript(render partial: %q(decidim/admin/shared/js-callout), locals: { css: %q(success), text: flash.now[:notice] }) %>").appendTo("div[data-callout-wrapper]");
|
2
2
|
|
3
3
|
<% proposal_ids.each do |id| %>
|
4
4
|
$(".table-list [data-id='<%= id %>']")
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<% add_decidim_page_title(translated_attribute(proposal.title)) %>
|
2
2
|
<div class="component__show">
|
3
3
|
<div class="card">
|
4
|
+
<%= render partial: "decidim/admin/shared/adjacent_navigation", locals: { adjacent_paths: filtered_adjacent_paths(proposal, :proposal_path) } %>
|
4
5
|
<div class="component__show_header">
|
5
6
|
<h2 class="component__show_header-title">
|
6
7
|
<%= decidim_html_escape(present(proposal).title).html_safe %>
|
@@ -111,7 +112,7 @@
|
|
111
112
|
<% end %>
|
112
113
|
|
113
114
|
<div class="card-section">
|
114
|
-
<div class="row column" data-
|
115
|
+
<div class="row column" data-votes>
|
115
116
|
<span class="component__show-title"><%= t ".votes_count" %></span>
|
116
117
|
<div class="flex items-center gap-x-2 mt-2">
|
117
118
|
<%= icon "service-line", class: "fill-gray" %>
|
@@ -217,7 +218,7 @@
|
|
217
218
|
<% if allowed_to? :unassign_from_valuator, :proposals, valuator: assignment.valuator %>
|
218
219
|
<%= icon_link_to(
|
219
220
|
"delete-bin-line",
|
220
|
-
|
221
|
+
valuation_assignment_path(proposal_ids: [proposal.id], valuator_role_ids: [assignment.valuator_role.id]),
|
221
222
|
t(".remove_assignment"),
|
222
223
|
method: :delete,
|
223
224
|
data: { confirm: t(".remove_assignment_confirmation") },
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<% if flash.now[:error].present? %>
|
2
2
|
$("<%= form_selector %> <%= attribute_selector %>").addClass("is-invalid-input")
|
3
|
-
$("<%= escape_javascript(render partial: %q(decidim/admin/shared/js-callout), locals: { css: %q(alert), text: flash.now[:error] }) %>").appendTo("
|
3
|
+
$("<%= escape_javascript(render partial: %q(decidim/admin/shared/js-callout), locals: { css: %q(alert), text: flash.now[:error] }) %>").appendTo("div[data-callout-wrapper]");
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<% if flash.now[:alert].present? %>
|
7
7
|
$("<%= form_selector %> <%= attribute_selector %>").removeClass("is-invalid-input")
|
8
|
-
$("<%= escape_javascript(render partial: %q(decidim/admin/shared/js-callout), locals: { css: %q(warning), text: flash.now[:alert] }) %>").appendTo("
|
8
|
+
$("<%= escape_javascript(render partial: %q(decidim/admin/shared/js-callout), locals: { css: %q(warning), text: flash.now[:alert] }) %>").appendTo("div[data-callout-wrapper]");
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
<% if flash.now[:notice].present? %>
|
12
|
-
$("<%= escape_javascript(render partial: %q(decidim/admin/shared/js-callout), locals: { css: %q(success), text: flash.now[:notice] }) %>").appendTo("
|
12
|
+
$("<%= escape_javascript(render partial: %q(decidim/admin/shared/js-callout), locals: { css: %q(success), text: flash.now[:notice] }) %>").appendTo("div[data-callout-wrapper]");
|
13
13
|
|
14
14
|
<% proposal_ids.each do |id| %>
|
15
15
|
$(".table-list [data-id='<%= id %>']")
|
@@ -1,8 +1,9 @@
|
|
1
|
+
<% new_proposal ||= false %>
|
1
2
|
<%= form.text_field :title, class: "js-hashtags", value: form_presenter.title %>
|
2
3
|
|
3
4
|
<%= text_editor_for_proposal_body(form) %>
|
4
5
|
|
5
|
-
<% if @form.component_automatic_hashtags.any? %>
|
6
|
+
<% if !new_proposal && @form.component_automatic_hashtags.any? %>
|
6
7
|
<%= field_set_tag form.label(:automatic_hashtags, nil, for: nil) do %>
|
7
8
|
<% @form.component_automatic_hashtags.each do |hashtag| %>
|
8
9
|
<%= form.check_box "", checked: true, disabled: true, label: "##{hashtag}", label_options: { class: "form__wrapper-checkbox-label" } %>
|
@@ -10,7 +11,7 @@
|
|
10
11
|
<% end %>
|
11
12
|
<% end %>
|
12
13
|
|
13
|
-
<% if @form.component_suggested_hashtags.any? %>
|
14
|
+
<% if !new_proposal && @form.component_suggested_hashtags.any? %>
|
14
15
|
<%= field_set_tag form.label(:suggested_hashtags, nil, for: nil) do %>
|
15
16
|
<%= form.collection_check_boxes :suggested_hashtags, @form.component_suggested_hashtags.map { |hashtag| [hashtag.downcase, "##{hashtag}"] }, :first, :last, { legend_title: "hey ho" } do |option|
|
16
17
|
option.label(class: "form__wrapper-checkbox-label") { option.check_box(checked: @form.suggested_hashtag_checked?(option.value)) + option.text }
|
@@ -19,13 +20,19 @@
|
|
19
20
|
<% end %>
|
20
21
|
|
21
22
|
<% if @form.geocoding_enabled? %>
|
22
|
-
<%= form.geocoding_field
|
23
|
+
<%= form.geocoding_field(
|
24
|
+
:address,
|
25
|
+
placeholder: t("decidim.proposals.proposals.placeholder.address"),
|
26
|
+
data: {
|
27
|
+
screen_reader_announcement: t("decidim.proposals.proposals.edit_form_fields.marker_added")
|
28
|
+
}
|
29
|
+
) %>
|
23
30
|
|
24
31
|
<div id="address_map" class="proposal__container">
|
25
32
|
<p class="help-text">
|
26
33
|
<%= t("instructions", scope: "decidim.proposals.proposals.dynamic_map_instructions") %> <%= t("description", scope: "decidim.proposals.proposals.dynamic_map_instructions") %>
|
27
34
|
</p>
|
28
|
-
<%= dynamic_map_for proposal_preview_data_for_map(@proposal) %>
|
35
|
+
<%= dynamic_map_for proposal_preview_data_for_map(@proposal) unless new_proposal %>
|
29
36
|
</div>
|
30
37
|
<% end %>
|
31
38
|
|
@@ -37,7 +44,7 @@
|
|
37
44
|
<%= scopes_select_field form, :scope_id, root: current_component.scope %>
|
38
45
|
<% end %>
|
39
46
|
|
40
|
-
<% if component_settings.attachments_allowed? && @proposal %>
|
47
|
+
<% if component_settings.attachments_allowed? && (new_proposal || @proposal) %>
|
41
48
|
<%= form.attachment :documents,
|
42
49
|
multiple: true,
|
43
50
|
label: t("decidim.proposals.proposals.edit.add_documents"),
|
@@ -1 +1 @@
|
|
1
|
-
<%= card_for proposal, from: proposal %>
|
1
|
+
<%= card_for proposal, from: proposal, size: card_size %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% if current_settings.votes_enabled? && (show_endorsements_card? || current_user) %>
|
2
2
|
<section class="layout-aside__section">
|
3
|
-
<div class="proposal__aside-vote">
|
3
|
+
<div class="proposal__aside-vote layout-aside__ctas-buttons" data-sticky-buttons>
|
4
4
|
<%= render partial: "vote_button", locals: { proposal: @proposal, from_proposals_list: false } unless @proposal.withdrawn? %>
|
5
5
|
<%= render partial: "votes_count", locals: { proposal: @proposal, from_proposals_list: false } %>
|
6
6
|
</div>
|
@@ -7,12 +7,18 @@
|
|
7
7
|
<% if @proposals.empty? %>
|
8
8
|
<%= cell("decidim/announcement", params[:filter].present? ? t(".empty_filters") : t(".empty")) %>
|
9
9
|
<% else %>
|
10
|
-
<
|
10
|
+
<div class="flex items-center justify-between">
|
11
|
+
<h2 class="h5 md:h3 decorator"><%= t("count", scope: "decidim.proposals.proposals.index", count: @proposals.total_count) %></h2>
|
12
|
+
<div class="view-layout__links flex view_mode__links">
|
13
|
+
<%= toggle_view_mode_link(@view_mode, "list", t("list_mode", scope: "decidim.proposals.proposals.index")) %>
|
14
|
+
<%= toggle_view_mode_link(@view_mode, "grid", t("grid_mode", scope: "decidim.proposals.proposals.index")) %>
|
15
|
+
</div>
|
16
|
+
</div>
|
11
17
|
|
12
18
|
<%= order_selector available_orders, i18n_scope: "decidim.proposals.proposals.orders" %>
|
13
19
|
|
14
|
-
<div class="
|
15
|
-
<%= render @proposals %>
|
20
|
+
<div class="<%= proposals_container_class(@view_mode) %>">
|
21
|
+
<%= render partial: "proposal", collection: @proposals, as: :proposal, locals: { card_size: card_size_for_view_mode(@view_mode) } %>
|
16
22
|
</div>
|
17
23
|
|
18
24
|
<%= decidim_paginate @proposals %>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
<span class="sr-only"><%= decidim_html_escape(present(proposal).title) %></span>
|
36
36
|
<% end %>
|
37
37
|
<% else %>
|
38
|
-
<% if proposal.maximum_votes_reached? && !proposal.
|
38
|
+
<% if proposal.maximum_votes_reached? && !proposal.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %>
|
39
39
|
<%= content_tag :button, t("decidim.proposals.proposals.vote_button.maximum_votes_reached"), class: button_classes, disabled: true %>
|
40
40
|
<% else %>
|
41
41
|
<% if vote_limit_enabled? && remaining_votes_count_for(current_user) == 0 %>
|
@@ -14,8 +14,8 @@
|
|
14
14
|
<li><%= t(".threshold_per_proposal.description", limit: threshold_per_proposal) %></li>
|
15
15
|
<% end %>
|
16
16
|
|
17
|
-
<% if
|
18
|
-
<li><%= t(".
|
17
|
+
<% if can_accumulate_votes_beyond_threshold? %>
|
18
|
+
<li><%= t(".can_accumulate_votes_beyond_threshold.description", limit: threshold_per_proposal) %></li>
|
19
19
|
<% end %>
|
20
20
|
|
21
21
|
<% if minimum_votes_per_user_enabled? %>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<% if votes_given >= minimum_votes_per_user %>
|
25
25
|
<%= t(".minimum_votes_per_user.given_enough_votes") %>
|
26
26
|
<% else %>
|
27
|
-
<%= t(".minimum_votes_per_user.
|
27
|
+
<%= t(".minimum_votes_per_user.votes_remaining", remaining_votes: minimum_votes_per_user - votes_given) %>
|
28
28
|
<% end %>
|
29
29
|
</li>
|
30
30
|
<% end %>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
|
32
32
|
<% if Decidim::Map.available?(:geocoding, :dynamic) && component_settings.geocoding_enabled? %>
|
33
33
|
<div class="proposal-list__map">
|
34
|
-
<%= dynamic_map_for proposals_data_for_map(@
|
34
|
+
<%= dynamic_map_for proposals_data_for_map(@all_geocoded_proposals) do %>
|
35
35
|
<template id="marker-popup">
|
36
36
|
<div class="space-y-6">
|
37
37
|
<a href="${link}" class="card__list">
|
@@ -3,15 +3,3 @@ var $orderFilterInput = $('.order_filter');
|
|
3
3
|
|
4
4
|
$proposals.html('<%= j(render partial: "proposals").strip.html_safe %>');
|
5
5
|
$orderFilterInput.val('<%= order %>');
|
6
|
-
|
7
|
-
<% if Decidim::Map.available?(:geocoding, :dynamic) && component_settings.geocoding_enabled? %>
|
8
|
-
var $map = $("#map");
|
9
|
-
var controller = $map.data("map-controller");
|
10
|
-
if (controller) {
|
11
|
-
var markerData = JSON.parse('<%= escape_javascript proposals_data_for_map(@proposals).to_json.html_safe %>');
|
12
|
-
controller.clearMarkers();
|
13
|
-
if (markerData.length > 0 ) {
|
14
|
-
controller.addMarkers(markerData);
|
15
|
-
}
|
16
|
-
}
|
17
|
-
<% end %>
|
@@ -8,15 +8,11 @@
|
|
8
8
|
<%= render partial: "wizard_header" %>
|
9
9
|
|
10
10
|
<%= decidim_form_for(@form) do |form| %>
|
11
|
+
|
11
12
|
<%= form_required_explanation %>
|
12
13
|
|
13
14
|
<div class="form__wrapper">
|
14
|
-
<%=
|
15
|
-
<%= text_editor_for_proposal_body(form) %>
|
16
|
-
|
17
|
-
<% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
|
18
|
-
<%= user_group_select_field form, :user_group_id %>
|
19
|
-
<% end %>
|
15
|
+
<%= render partial: "edit_form_fields", locals: { form: , new_proposal: true } %>
|
20
16
|
</div>
|
21
17
|
|
22
18
|
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
@@ -31,5 +27,4 @@
|
|
31
27
|
</button>
|
32
28
|
</div>
|
33
29
|
<% end %>
|
34
|
-
|
35
30
|
<% end %>
|
data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
<% else %>
|
9
9
|
<%= action_authorized_button_to :vote, proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list:), resource: proposal, class: "column button light button--sc", data: { disable: true, "redirect-url": proposal_path(proposal) } do %>
|
10
10
|
<%= t("decidim.proposals.proposals.vote_button.vote") %>
|
11
|
-
<span
|
11
|
+
<span><%= decidim_html_escape(present(proposal).title) %></span>
|
12
12
|
<% end %>
|
13
13
|
<% end %>
|
14
14
|
<% else %>
|
@@ -30,10 +30,10 @@
|
|
30
30
|
) do %>
|
31
31
|
<%= icon("check-line", class: "icon--small", role: "img", "aria-hidden": true) %>
|
32
32
|
<%= t("decidim.proposals.proposals.vote_button.already_voted") %>
|
33
|
-
<span
|
33
|
+
<span><%= decidim_html_escape(present(proposal).title) %></span>
|
34
34
|
<% end %>
|
35
35
|
<% else %>
|
36
|
-
<% if proposal.maximum_votes_reached? && !proposal.
|
36
|
+
<% if proposal.maximum_votes_reached? && !proposal.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %>
|
37
37
|
<%= content_tag :span, t("decidim.proposals.proposals.vote_button.maximum_votes_reached"), class: "column button light button--sc disabled", disabled: true %>
|
38
38
|
<% else %>
|
39
39
|
<% if vote_limit_enabled? && remaining_votes_count_for(current_user) == 0 %>
|
@@ -43,7 +43,7 @@
|
|
43
43
|
<% else %>
|
44
44
|
<%= action_authorized_button_to :vote, proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list:), resource: proposal, remote: true, data: { disable: true, "redirect-url": proposal_path(proposal) }, class: "column button light button--sc" do %>
|
45
45
|
<%= t("decidim.proposals.proposals.vote_button.vote") %>
|
46
|
-
<span
|
46
|
+
<span><%= decidim_html_escape(present(proposal).title) %></span>
|
47
47
|
<% end %>
|
48
48
|
<% end %>
|
49
49
|
<% end %>
|
data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb
CHANGED
@@ -3,35 +3,35 @@
|
|
3
3
|
<% else %>
|
4
4
|
<% if !current_user %>
|
5
5
|
<% if current_settings.votes_blocked? %>
|
6
|
-
<button type="button" name="button" class="column
|
6
|
+
<button type="button" name="button" class="column button button--sc disabled" disabled id="proposal-<%= proposal.id %>-votes-count">
|
7
7
|
<%= proposal.proposal_votes_count || 0 %>
|
8
8
|
</button>
|
9
9
|
<% else %>
|
10
|
-
<button type="button" name="button" class="column
|
10
|
+
<button type="button" name="button" class="column button button--sc" id="proposal-<%= proposal.id %>-votes-count">
|
11
11
|
<%= proposal.proposal_votes_count || 0 %>
|
12
12
|
</button>
|
13
13
|
<% end %>
|
14
14
|
<% else %>
|
15
15
|
<% if @voted_proposals ? @voted_proposals.include?(proposal.id) : proposal.voted_by?(current_user) %>
|
16
|
-
<button type="button" name="button" class="column
|
16
|
+
<button type="button" name="button" class="column button success button--sc" id="proposal-<%= proposal.id %>-votes-count">
|
17
17
|
<%= proposal.proposal_votes_count || 0 %>
|
18
18
|
</button>
|
19
19
|
<% else %>
|
20
|
-
<% if proposal.maximum_votes_reached? && !proposal.
|
21
|
-
<button type="button" name="button" class="column
|
20
|
+
<% if proposal.maximum_votes_reached? && !proposal.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %>
|
21
|
+
<button type="button" name="button" class="column button button--sc disabled" disabled id="proposal-<%= proposal.id %>-votes-count">
|
22
22
|
<%= proposal.proposal_votes_count || 0 %>
|
23
23
|
</button>
|
24
24
|
<% else %>
|
25
25
|
<% if vote_limit_enabled? && remaining_votes_count_for(current_user) == 0 %>
|
26
|
-
<button type="button" name="button" class="column
|
26
|
+
<button type="button" name="button" class="column button button--sc" disabled id="proposal-<%= proposal.id %>-votes-count">
|
27
27
|
<%= proposal.proposal_votes_count || 0 %>
|
28
28
|
</button>
|
29
29
|
<% elsif current_settings.votes_blocked? || !current_component.participatory_space.can_participate?(current_user) %>
|
30
|
-
<button type="button" name="button" class="column
|
30
|
+
<button type="button" name="button" class="column button button--sc disabled" disabled id="proposal-<%= proposal.id %>-votes-count">
|
31
31
|
<%= proposal.proposal_votes_count || 0 %>
|
32
32
|
</button>
|
33
33
|
<% else %>
|
34
|
-
<button type="button" name="button" class="column
|
34
|
+
<button type="button" name="button" class="column button button--sc" id="proposal-<%= proposal.id %>-votes-count">
|
35
35
|
<%= proposal.proposal_votes_count || 0 %>
|
36
36
|
</button>
|
37
37
|
<% end %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<%= render partial: "wizard_header", locals: { callout_help_text_class: "warning" } %>
|
9
9
|
|
10
|
-
<div class="proposal__container my-10
|
10
|
+
<div class="proposal__container my-10">
|
11
11
|
<h2 class="h3 text-secondary"><%= present(@proposal).title(links: true, html_escape: true) %></h2>
|
12
12
|
|
13
13
|
<% unless component_settings.participatory_texts_enabled? %>
|