decidim-budgets 0.27.9 → 0.28.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/stylesheets/decidim/budgets/budget/_budget-vote-button.scss +5 -5
- data/app/cells/decidim/budgets/base_cell.rb +1 -1
- data/app/cells/decidim/budgets/budget_cell.rb +6 -1
- data/app/cells/decidim/budgets/budget_information_modal/show.erb +14 -26
- data/app/cells/decidim/budgets/budget_list_item/projects_count.erb +6 -0
- data/app/cells/decidim/budgets/budget_list_item/show.erb +35 -30
- data/app/cells/decidim/budgets/budget_list_item/vote_action.erb +13 -0
- data/app/cells/decidim/budgets/budget_list_item_cell.rb +24 -1
- data/app/cells/decidim/budgets/budget_metadata_cell.rb +29 -0
- data/app/cells/decidim/budgets/budget_s_cell.rb +15 -0
- data/app/cells/decidim/budgets/budgets_header/show.erb +2 -6
- data/app/cells/decidim/budgets/budgets_list/card_list.erb +8 -13
- data/app/cells/decidim/budgets/budgets_list/main_list.erb +5 -0
- data/app/cells/decidim/budgets/budgets_list/show.erb +12 -16
- data/app/cells/decidim/budgets/budgets_list/voted.erb +8 -44
- data/app/cells/decidim/budgets/budgets_list_cell.rb +34 -0
- data/app/cells/decidim/budgets/limit_announcement/show.erb +3 -0
- data/app/cells/decidim/budgets/limit_announcement_cell.rb +2 -2
- data/app/cells/decidim/budgets/order_activity_cell.rb +1 -4
- data/app/cells/decidim/budgets/project_cell.rb +6 -1
- data/app/cells/decidim/budgets/project_l/extra_data.erb +6 -0
- data/app/cells/decidim/budgets/project_l/metadata.erb +4 -0
- data/app/cells/decidim/budgets/project_l_cell.rb +38 -0
- data/app/cells/decidim/budgets/project_metadata_cell.rb +78 -0
- data/app/cells/decidim/budgets/project_s_cell.rb +21 -0
- data/app/cells/decidim/budgets/project_tags/show.erb +1 -0
- data/app/cells/decidim/budgets/project_vote_button/show.erb +21 -15
- data/app/cells/decidim/budgets/project_vote_button_cell.rb +69 -1
- data/app/cells/decidim/budgets/project_voted_hint_cell.rb +1 -1
- data/app/cells/decidim/budgets/project_votes_count_cell.rb +9 -8
- data/app/commands/decidim/budgets/admin/create_project.rb +0 -1
- data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +1 -1
- data/app/commands/decidim/budgets/admin/update_project.rb +1 -2
- data/app/commands/decidim/budgets/admin/update_project_scope.rb +1 -1
- data/app/commands/decidim/budgets/admin/update_project_selection.rb +1 -1
- data/app/commands/decidim/budgets/admin/update_projects_budget.rb +57 -0
- data/app/controllers/concerns/decidim/budgets/admin/filterable.rb +1 -1
- data/app/controllers/concerns/decidim/budgets/needs_current_order.rb +2 -2
- data/app/controllers/decidim/budgets/admin/budgets_controller.rb +5 -5
- data/app/controllers/decidim/budgets/admin/projects_controller.rb +52 -10
- data/app/controllers/decidim/budgets/admin/proposals_imports_controller.rb +1 -1
- data/app/controllers/decidim/budgets/application_controller.rb +0 -4
- data/app/controllers/decidim/budgets/budgets_controller.rb +9 -0
- data/app/controllers/decidim/budgets/line_items_controller.rb +10 -16
- data/app/controllers/decidim/budgets/orders_controller.rb +7 -2
- data/app/controllers/decidim/budgets/projects_controller.rb +51 -4
- data/app/forms/decidim/budgets/admin/project_form.rb +1 -1
- data/app/helpers/decidim/budgets/application_helper.rb +4 -0
- data/app/helpers/decidim/budgets/projects_helper.rb +89 -33
- data/app/jobs/decidim/budgets/send_vote_reminder_job.rb +1 -1
- data/app/mailers/decidim/budgets/order_summary_mailer.rb +1 -1
- data/app/mailers/decidim/budgets/vote_reminder_mailer.rb +1 -1
- data/app/models/decidim/budgets/budget.rb +1 -0
- data/app/models/decidim/budgets/project.rb +17 -7
- data/app/packs/entrypoints/decidim_budgets.js +2 -0
- data/app/packs/src/decidim/budgets/exit_handler.js +11 -8
- data/app/packs/src/decidim/budgets/progressFixed.js +25 -11
- data/app/packs/src/decidim/budgets/projects.js +15 -10
- data/app/packs/stylesheets/budgets.scss +273 -0
- data/app/presenters/decidim/budgets/admin_log/budget_presenter.rb +2 -2
- data/app/presenters/decidim/budgets/admin_log/project_presenter.rb +2 -2
- data/app/services/decidim/budgets/order_reminder_generator.rb +4 -4
- data/app/views/decidim/budgets/admin/budgets/_form.html.erb +17 -12
- data/app/views/decidim/budgets/admin/budgets/edit.html.erb +16 -6
- data/app/views/decidim/budgets/admin/budgets/index.html.erb +58 -64
- data/app/views/decidim/budgets/admin/budgets/new.html.erb +16 -6
- data/app/views/decidim/budgets/admin/projects/_bulk-actions.html.erb +19 -10
- data/app/views/decidim/budgets/admin/projects/_form.html.erb +31 -35
- data/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +15 -13
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_budget-change.html.erb +22 -0
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_change-selected.html.erb +3 -3
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_dropdown.html.erb +8 -2
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb +3 -3
- data/app/views/decidim/budgets/admin/projects/bulk_actions/_scope-change.html.erb +5 -8
- data/app/views/decidim/budgets/admin/projects/edit.html.erb +16 -6
- data/app/views/decidim/budgets/admin/projects/index.html.erb +26 -31
- data/app/views/decidim/budgets/admin/projects/new.html.erb +16 -6
- data/app/views/decidim/budgets/admin/projects/update_attribute.js.erb +8 -4
- data/app/views/decidim/budgets/admin/proposals_imports/new.html.erb +40 -28
- data/app/views/decidim/budgets/budgets/index.html.erb +21 -3
- data/app/views/decidim/budgets/budgets/index.js.erb +6 -0
- data/app/views/decidim/budgets/line_items/update_budget.js.erb +21 -11
- data/app/views/decidim/budgets/projects/_addition_selector.html.erb +16 -0
- data/app/views/decidim/budgets/projects/_budget_confirm.html.erb +42 -31
- data/app/views/decidim/budgets/projects/_budget_excess.html.erb +12 -12
- data/app/views/decidim/budgets/projects/_budget_summary.html.erb +2 -75
- data/app/views/decidim/budgets/projects/_exit_modal.html.erb +15 -18
- data/app/views/decidim/budgets/projects/_linked_projects.html.erb +3 -12
- data/app/views/decidim/budgets/projects/_order.html.erb +1 -0
- data/app/views/decidim/budgets/projects/_order_progress_progressbar_marks_right.html.erb +10 -0
- data/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb +113 -0
- data/app/views/decidim/budgets/projects/_order_total_budget.html.erb +6 -7
- data/app/views/decidim/budgets/projects/_project.html.erb +2 -1
- data/app/views/decidim/budgets/projects/_project_budget_button.html.erb +11 -19
- data/app/views/decidim/budgets/projects/_projects.html.erb +8 -6
- data/app/views/decidim/budgets/projects/_projects_count.html.erb +5 -0
- data/app/views/decidim/budgets/projects/_projects_list.html.erb +3 -0
- data/app/views/decidim/budgets/projects/index.html.erb +58 -55
- data/app/views/decidim/budgets/projects/index.js.erb +5 -4
- data/app/views/decidim/budgets/projects/show.html.erb +78 -51
- data/config/assets.rb +0 -1
- data/config/locales/ar.yml +0 -50
- data/config/locales/bg.yml +0 -381
- data/config/locales/ca.yml +75 -84
- data/config/locales/cs.yml +73 -82
- data/config/locales/de.yml +76 -85
- data/config/locales/el.yml +34 -72
- data/config/locales/en.yml +79 -88
- data/config/locales/es-MX.yml +73 -82
- data/config/locales/es-PY.yml +73 -82
- data/config/locales/es.yml +75 -84
- data/config/locales/eu.yml +74 -86
- data/config/locales/fi-plain.yml +75 -84
- data/config/locales/fi.yml +79 -88
- data/config/locales/fr-CA.yml +74 -86
- data/config/locales/fr.yml +78 -90
- data/config/locales/ga-IE.yml +0 -12
- data/config/locales/gl.yml +0 -58
- data/config/locales/hu.yml +58 -81
- data/config/locales/id-ID.yml +0 -38
- data/config/locales/is-IS.yml +0 -22
- data/config/locales/it.yml +0 -84
- data/config/locales/ja.yml +69 -81
- data/config/locales/ko.yml +0 -54
- data/config/locales/lb.yml +0 -85
- data/config/locales/lt.yml +59 -82
- data/config/locales/lv.yml +0 -44
- data/config/locales/nl.yml +0 -96
- data/config/locales/no.yml +0 -84
- data/config/locales/pl.yml +0 -167
- data/config/locales/pt-BR.yml +9 -141
- data/config/locales/pt.yml +0 -85
- data/config/locales/ro-RO.yml +0 -95
- data/config/locales/ru.yml +0 -41
- data/config/locales/sk.yml +0 -44
- data/config/locales/sq-AL.yml +0 -52
- data/config/locales/sr-CS.yml +0 -4
- data/config/locales/sv.yml +42 -150
- data/config/locales/tr-TR.yml +2 -82
- data/config/locales/uk.yml +0 -41
- data/config/locales/zh-CN.yml +0 -65
- data/config/locales/zh-TW.yml +13 -59
- data/lib/decidim/budgets/admin_engine.rb +3 -2
- data/lib/decidim/budgets/component.rb +4 -90
- data/lib/decidim/budgets/engine.rb +30 -10
- data/lib/decidim/budgets/project_serializer.rb +3 -3
- data/lib/decidim/budgets/seeds.rb +69 -0
- data/lib/decidim/budgets/test/factories.rb +23 -37
- data/lib/decidim/budgets/version.rb +1 -1
- data/lib/decidim/budgets/workflows/base.rb +1 -1
- metadata +46 -42
- data/app/cells/decidim/budgets/budget_m/data.erb +0 -12
- data/app/cells/decidim/budgets/budget_m/footer.erb +0 -5
- data/app/cells/decidim/budgets/budget_m_cell.rb +0 -16
- data/app/cells/decidim/budgets/project_list_item/project_data.erb +0 -19
- data/app/cells/decidim/budgets/project_list_item/project_image.erb +0 -5
- data/app/cells/decidim/budgets/project_list_item/project_text.erb +0 -23
- data/app/cells/decidim/budgets/project_list_item/show.erb +0 -5
- data/app/cells/decidim/budgets/project_list_item_cell.rb +0 -70
- data/app/cells/decidim/budgets/project_m/data.erb +0 -12
- data/app/cells/decidim/budgets/project_m/footer.erb +0 -5
- data/app/cells/decidim/budgets/project_m_cell.rb +0 -22
- data/app/packs/stylesheets/decidim/budgets/_budgets.scss +0 -3
- data/app/packs/stylesheets/decidim/budgets/budget/_budget-list.scss +0 -198
- data/app/packs/stylesheets/decidim/budgets/budget/_budget-meter.scss +0 -83
- data/app/packs/stylesheets/decidim/budgets/budget/_progress.scss +0 -19
- data/app/views/decidim/budgets/admin/projects/proposals_picker.html.erb +0 -1
- data/app/views/decidim/budgets/projects/_filters.html.erb +0 -30
- data/app/views/decidim/budgets/projects/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/budgets/projects/_order_progress.html.erb +0 -32
- data/app/views/decidim/budgets/projects/_order_selected_projects.html.erb +0 -27
- data/config/locales/he-IL.yml +0 -1
- data/decidim-budgets.gemspec +0 -34
- data/lib/decidim/budgets/seeds/city.jpeg +0 -0
@@ -1,32 +1,43 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
<%= decidim_modal id: "budget-confirm", class:"verification-modal" do %>
|
2
|
+
<div data-dialog-container>
|
3
|
+
<%= icon "check-double-line" %>
|
4
|
+
<h3 class="h3" id="dialog-title-budget-confirm" data-dialog-title>
|
5
|
+
<%= t("title", scope: "decidim.budgets.projects.budget_confirm") %>
|
6
|
+
</h3>
|
7
|
+
<div class="my-8" id="budget-confirm-current-order">
|
8
|
+
<% if current_order.present? %>
|
9
|
+
<h4 class="h4 mb-4"><%= translated_attribute(budget.title) %></h4>
|
10
|
+
<p class="mb-4"><%= t(".description") %></p>
|
11
|
+
<div class="card card--secondary">
|
12
|
+
<% current_order.projects.each do |project| %>
|
13
|
+
<div class="card__list card__list__project-voted">
|
14
|
+
<div class="card__list__content">
|
15
|
+
<div class="card__list-text">
|
16
|
+
<%= link_to translated_attribute(project.title), resource_locator([budget, project]).path, class: "card__list-title" %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="budget__card__list-project">
|
20
|
+
<span class="budget-list__data__number budget-list__number-show-for-medium">
|
21
|
+
<%= budget_to_currency project.budget_amount %>
|
22
|
+
</span>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
8
28
|
</div>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<div class="columns medium-8 medium-offset-2">
|
25
|
-
<%= button_to t(".confirm"), checkout_budget_order_path(budget), class: "button expanded", data: { disable: true } %>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
<div class="text-center">
|
29
|
-
<button class="link" data-close><%= t(".cancel") %></button>
|
30
|
-
</div>
|
31
|
-
<% end %>
|
32
|
-
</div>
|
29
|
+
</div>
|
30
|
+
<div data-dialog-actions>
|
31
|
+
|
32
|
+
<button class="button button__sm md:button__lg button__transparent-secondary" data-dialog-close="budget-confirm">
|
33
|
+
<%= t("cancel", scope: "decidim.budgets.projects.budget_confirm") %>
|
34
|
+
</button>
|
35
|
+
|
36
|
+
<%= button_to checkout_budget_order_path(budget), class: "button button__sm md:button__lg button__secondary", data: { disable: true } do %>
|
37
|
+
<span>
|
38
|
+
<%= t("confirm", scope: "decidim.budgets.projects.budget_confirm") %>
|
39
|
+
</span>
|
40
|
+
<%= icon "arrow-right-line", class: "fill-current" %>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
43
|
+
<% end %>
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
<div
|
3
|
-
|
4
|
-
<
|
5
|
-
|
6
|
-
</
|
1
|
+
<%= decidim_modal id: "budget-excess" do %>
|
2
|
+
<div data-dialog-container>
|
3
|
+
<%= icon "error-warning-line" %>
|
4
|
+
<h3 class="h3" id="dialog-title-budget-excess" data-dialog-title>
|
5
|
+
<%= current_order.projects_rule? ? t(".projects_excess.title") : t(".budget_excess.title") %>
|
6
|
+
</h3>
|
7
|
+
<p id="dialog-desc-budget-excess"><%= current_order.projects_rule? ? t(".projects_excess.description") : t(".budget_excess.description") %></p>
|
7
8
|
</div>
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
</div>
|
9
|
+
<div data-dialog-actions>
|
10
|
+
<button data-dialog-close="budget-excess" class="button button__sm md:button__lg button__secondary">
|
11
|
+
<%= t("ok", scope: "decidim.budgets.projects.budget_excess") %>
|
12
|
+
</button>
|
13
13
|
</div>
|
14
|
-
|
14
|
+
<% end %>
|
@@ -1,76 +1,3 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
<div class="row">
|
4
|
-
<div class="columns medium-8 large-9">
|
5
|
-
<h2 class="heading3">
|
6
|
-
<%= t(".rules.title") %>
|
7
|
-
</h2>
|
8
|
-
<ul>
|
9
|
-
<%= raw current_rule_explanation %>
|
10
|
-
</ul>
|
11
|
-
</div>
|
12
|
-
</div>
|
13
|
-
</div>
|
1
|
+
<div id="order-progress<%= "-responsive" if responsive %>" class="budget-summary <%= responsive ? "block md:hidden" : "hidden md:block" %>" data-progress-reference data-safe-url="<%= budget_url(budget) %>">
|
2
|
+
<%= render partial: "order_progress_summary_content", locals: { responsive: , include_heading: } %>
|
14
3
|
</div>
|
15
|
-
<div class="card budget-summary" data-progress-reference data-safe-url="<%= budget_url(budget) %>">
|
16
|
-
<div class="card__content">
|
17
|
-
<% if include_heading %>
|
18
|
-
<% if current_order_checked_out? %>
|
19
|
-
<h2 class="heading3">
|
20
|
-
<%= t(".checked_out.title") %>
|
21
|
-
<% unless current_workflow.single? %>
|
22
|
-
<small><%= translated_attribute(budget.title) %></small>
|
23
|
-
<% end %>
|
24
|
-
</h2>
|
25
|
-
<p>
|
26
|
-
<%= raw t(".checked_out.description", cancel_link: link_to(t(".cancel_order"), budget_order_path(return_to: "budget"), method: :delete, class: "cancel-order", data: { confirm: t(".are_you_sure") })) %>
|
27
|
-
</p>
|
28
|
-
<% else %>
|
29
|
-
<h2 class="heading3">
|
30
|
-
<% if current_workflow.single? %>
|
31
|
-
<%= t(".title") %>
|
32
|
-
<% else %>
|
33
|
-
<%= translated_attribute(budget.title) %>
|
34
|
-
<% end %>
|
35
|
-
</h2>
|
36
|
-
<p>
|
37
|
-
<%= raw current_rule_description %>
|
38
|
-
</p>
|
39
|
-
<% end %>
|
40
|
-
<% end %>
|
41
|
-
|
42
|
-
<% if current_order.projects_rule? %>
|
43
|
-
<div class="budget-summary__total" data-total-allocation="<%= current_order.available_allocation %>">
|
44
|
-
<span class="mini-title"><%= t(".total_projects") %>
|
45
|
-
<strong class="mini-title__strong mini-title__strong--highlight">
|
46
|
-
<%= current_order.maximum_projects %>
|
47
|
-
</strong>
|
48
|
-
</span>
|
49
|
-
</div>
|
50
|
-
<% else %>
|
51
|
-
<div class="budget-summary__total" data-total-allocation="<%= current_order.available_allocation %>" data-total-budget="<%= budget.total_budget %>">
|
52
|
-
<span class="mini-title"><%= t(".total_budget") %>
|
53
|
-
<strong class="mini-title__strong mini-title__strong--highlight">
|
54
|
-
<%= budget_to_currency(budget.total_budget) %>
|
55
|
-
</strong>
|
56
|
-
</span>
|
57
|
-
</div>
|
58
|
-
<% end %>
|
59
|
-
|
60
|
-
<%= render partial: "order_progress" %>
|
61
|
-
|
62
|
-
<div>
|
63
|
-
<span class="mini-title">
|
64
|
-
<%= t(".assigned") %>
|
65
|
-
<%= render partial: "order_total_budget" %>
|
66
|
-
</span>
|
67
|
-
</div>
|
68
|
-
|
69
|
-
<%= cell("decidim/budgets/budget_information_modal", budget) %>
|
70
|
-
</div>
|
71
|
-
|
72
|
-
<%= render partial: "order_selected_projects" %>
|
73
|
-
</div>
|
74
|
-
|
75
|
-
<%= render partial: "budget_excess" %>
|
76
|
-
<%= render partial: "budget_confirm" %>
|
@@ -1,22 +1,19 @@
|
|
1
1
|
<% if current_user && current_component.current_settings.votes == "enabled" && !current_workflow.voted?(budget) %>
|
2
|
-
|
3
|
-
<div
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
</
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
<%= decidim_modal id: "exit-notification" do %>
|
3
|
+
<div data-dialog-container>
|
4
|
+
<%= icon "information-line" %>
|
5
|
+
<h3 class="h3" id="dialog-title-exit-notification" tabindex="-1" data-dialog-title>
|
6
|
+
<%= t("title", scope: "decidim.budgets.projects.exit_modal") %>
|
7
|
+
</h3>
|
8
|
+
<p id="dialog-desc-budget-modal">
|
9
|
+
<%= t("message", scope: "decidim.budgets.projects.exit_modal") %>
|
10
|
+
</p>
|
11
11
|
</div>
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
</button>
|
18
|
-
<%= link_to t(".exit"), budget_projects_path, id: "exit-notification-link", class: "button primary hollow expanded" %>
|
19
|
-
</div>
|
12
|
+
<div data-dialog-actions>
|
13
|
+
<button data-dialog-close="exit-notification" class="button button__sm md:button__lg button__secondary">
|
14
|
+
<p><%= t("cancel", scope: "decidim.budgets.projects.exit_modal") %></p>
|
15
|
+
</button>
|
16
|
+
<%= link_to t("exit", scope: "decidim.budgets.projects.exit_modal"), budget_projects_path, id: "exit-notification-link", class: "button button__sm md:button__lg button__secondary" %>
|
20
17
|
</div>
|
21
|
-
|
18
|
+
<% end %>
|
22
19
|
<% end %>
|
@@ -1,12 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
|
5
|
-
<%= link_to resource_locator([project.budget, project]).path, class: "card--list__text card__link card__link--block" do %>
|
6
|
-
<h5 class="card--list__heading">
|
7
|
-
<%= translated_attribute(project.title) %>
|
8
|
-
</h5>
|
9
|
-
<% end %>
|
10
|
-
</div>
|
11
|
-
<% end %>
|
12
|
-
</div>
|
1
|
+
<% resources.each do |project| %>
|
2
|
+
<%= cell "decidim/budgets/project_l", project, url_extra_params: { included_in: resource.to_gid } %>
|
3
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= order_selector available_orders, i18n_scope: "decidim.budgets.projects.orders" %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<span class="budget-summary__progressbar-legend budget-summary__progressbar-marks_right" data-total-allocation="<%= current_order.available_allocation %>">
|
2
|
+
<%= t("budget", scope: "decidim.budgets.projects.order_progress") %>
|
3
|
+
<strong class="budget-summary__progressbar-legend-strong">
|
4
|
+
<% if current_order.projects_rule? %>
|
5
|
+
<%= current_order.maximum_projects %>
|
6
|
+
<% else %>
|
7
|
+
<%= budget_to_currency(budget.total_budget) %>
|
8
|
+
<% end %>
|
9
|
+
</strong>
|
10
|
+
</span>
|
@@ -0,0 +1,113 @@
|
|
1
|
+
<div data-order-progress-responsive="<%= responsive.inspect %>" class="budget-summary__content">
|
2
|
+
<div class="budget-summary__progressbox" data-current-allocation="<%= current_order ? current_order.total : 0 %>">
|
3
|
+
<% if include_heading %>
|
4
|
+
<% if current_order_checked_out? %>
|
5
|
+
<%= t("title", scope: "decidim.budgets.projects.budget_summary.checked_out") %>
|
6
|
+
<div class="budget-summary__content__header">
|
7
|
+
<span class="budget-summary__content__header--title">
|
8
|
+
<%= t("name", scope: "decidim.components.budgets") %>
|
9
|
+
</span>
|
10
|
+
/
|
11
|
+
<%= translated_attribute(budget.title) %>
|
12
|
+
<p class="budget-summary__content__header--description">
|
13
|
+
<%= t("description", scope: "decidim.budgets.projects.budget_summary.checked_out") %>
|
14
|
+
</p>
|
15
|
+
</div>
|
16
|
+
<% else %>
|
17
|
+
<p class="budget-summary__progressbox--checked_out">
|
18
|
+
<%= current_rule_description %>
|
19
|
+
</p>
|
20
|
+
<% end %>
|
21
|
+
<% end %>
|
22
|
+
<div class="budget-summary__progressbar">
|
23
|
+
<div class="progress budget-progress" role="progressbar" aria-label="<%= t("budget", scope: "decidim.budgets.projects.order_progress") %>" aria-valuenow="<%= current_order_budget_percent %>" aria-valuetext="<%= current_order_budget_percent %> %" aria-valuemin="0" aria-valuemax="100">
|
24
|
+
<div class="progress-meter budget-summary__progressbar--minimum" style="width: <%= current_order_budget_percent_minimum %>%">
|
25
|
+
<span class="progress-meter--minimum-mark"></span>
|
26
|
+
</div>
|
27
|
+
<div class="progress-meter budget-summary__progressbar--meter" style="width: <%= current_order_budget_percent %>%"> </div>
|
28
|
+
</div>
|
29
|
+
<div class="budget-summary__progressbar-marks">
|
30
|
+
<span class="budget-summary__progressbar-legend" style="width: <%= current_order_budget_percent_minimum %>%;">
|
31
|
+
<%= t("assigned", scope: "decidim.budgets.projects.order_progress") %>
|
32
|
+
<strong id="order-total-budget<%= "-responsive" if responsive %>" class="budget-summary__progressbar-legend-strong">
|
33
|
+
<%= render partial: "decidim/budgets/projects/order_total_budget" %>
|
34
|
+
</strong>
|
35
|
+
</span>
|
36
|
+
<% if current_order.minimum_budget > 0 %>
|
37
|
+
<span class="budget-summary__progressbar-legend budget-summary__progressbar-marks_center">
|
38
|
+
<%= t("minimum", scope: "decidim.budgets.projects.order_progress") %>
|
39
|
+
<strong class="budget-summary__progressbar-legend-strong">
|
40
|
+
<%= budget_to_currency(current_order.minimum_budget) %>
|
41
|
+
</strong>
|
42
|
+
</span>
|
43
|
+
<% end %>
|
44
|
+
<%= render partial: "decidim/budgets/projects/order_progress_progressbar_marks_right" %>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<div class="budget-summary__progressbox-buttons">
|
49
|
+
<% if !current_order_checked_out? && voting_open? %>
|
50
|
+
<button class="button button__secondary button__lg w-full" data-dialog-open="budget-confirm" <%= budget_confirm_disabled_attr %>>
|
51
|
+
<%= t("vote", scope: "decidim.budgets.projects.budget_summary") %>
|
52
|
+
<%= icon "check-line" %>
|
53
|
+
</button>
|
54
|
+
<% end %>
|
55
|
+
<% if include_heading && current_order_checked_out? %>
|
56
|
+
<%= link_to budget_order_path(return_to: "budget"), method: :delete, class: "button button__lg button__secondary cancel-order w-full", data: { confirm: t("are_you_sure", scope: "decidim.budgets.projects.budget_confirm") } do %>
|
57
|
+
<span><%= t("cancel_order", scope: "decidim.budgets.projects.budget_summary") %></span>
|
58
|
+
<%= icon "delete-bin-line" %>
|
59
|
+
<% end %>
|
60
|
+
<% end %>
|
61
|
+
</div>
|
62
|
+
<div class="budget-summary__button-modal">
|
63
|
+
<button type="button" data-dialog-open="budget-modal-info" aria-haspopup="dialog" tabindex="0" class="button button__text button__xs">
|
64
|
+
<%= t("more_information", scope: "decidim.budgets.budget_information_modal") %>
|
65
|
+
</button>
|
66
|
+
</div>
|
67
|
+
<div class="w-screen max-w-screen progressbox-fixed-wrapper" data-progressbox-fixed>
|
68
|
+
<div class="gap-0 layout-item py-4 items-center budget-summary__progressbar">
|
69
|
+
<div class="budget-summary__progressbox layout-item__main">
|
70
|
+
<div class="progress budget-progress relative" role="progressbar" aria-valuenow="<%= current_order_budget_percent %>" aria-valuetext="<%= current_order_budget_percent %>%" aria-valuemin="0" aria-valuemax="100">
|
71
|
+
<div class="progress-meter budget-summary__progressbar--minimum" style="width: <%= current_order_budget_percent_minimum %>%">
|
72
|
+
<span class="progress-meter--minimum-mark"></span>
|
73
|
+
</div>
|
74
|
+
<div class="progress-meter budget-summary__progressbar--meter" style="width: <%= current_order_budget_percent %>%">
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
<div class="budget-summary__progressbar-marks">
|
78
|
+
<span class="budget-summary__progressbar-legend" style="width: <%= current_order_budget_percent_minimum %>%;">
|
79
|
+
<%= t("assigned", scope: "decidim.budgets.projects.order_progress") %>
|
80
|
+
<strong id="order-total-budget-sticky<%= "-responsive" if responsive %>" class="budget-summary__progressbar-legend-strong">
|
81
|
+
<%= render partial: "decidim/budgets/projects/order_total_budget" %>
|
82
|
+
</strong>
|
83
|
+
</span>
|
84
|
+
<% if current_order.minimum_budget > 0 %>
|
85
|
+
<span class="budget-summary__progressbar-legend budget-summary__progressbar-marks_center">
|
86
|
+
<%= t("minimum", scope: "decidim.budgets.projects.order_progress") %>
|
87
|
+
<strong class="budget-summary__progressbar-legend-strong">
|
88
|
+
<%= budget_to_currency(current_order.minimum_budget) %>
|
89
|
+
</strong>
|
90
|
+
</span>
|
91
|
+
<% end %>
|
92
|
+
<%= render partial: "decidim/budgets/projects/order_progress_progressbar_marks_right" %>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
<div class="layout-item__aside budget-summary__progressbox-buttons">
|
96
|
+
<% if !current_order_checked_out? && voting_open? %>
|
97
|
+
<button class="button button__secondary button__lg mt-2 md:mt-0 w-full" data-dialog-open="budget-confirm" <%= budget_confirm_disabled_attr %>>
|
98
|
+
<span>
|
99
|
+
<%= t("vote", scope: "decidim.budgets.projects.budget_summary") %>
|
100
|
+
</span>
|
101
|
+
<%= icon "check-line" %>
|
102
|
+
</button>
|
103
|
+
<% end %>
|
104
|
+
<% if include_heading && current_order_checked_out? %>
|
105
|
+
<%= link_to budget_order_path(return_to: "budget"), method: :delete, class: "button button__lg button__secondary cancel-order w-full mt-2 md:mt-0", data: { confirm: t("are_you_sure", scope: "decidim.budgets.projects.budget_confirm") } do %>
|
106
|
+
<span><%= t("cancel_order", scope: "decidim.budgets.projects.budget_summary") %></span>
|
107
|
+
<%= icon "delete-bin-line" %>
|
108
|
+
<% end %>
|
109
|
+
<% end %>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
</div>
|
@@ -1,7 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
</strong>
|
1
|
+
<% if current_order.projects_rule? %>
|
2
|
+
<%= current_order.projects.count %> /
|
3
|
+
<%= current_order.maximum_projects %>
|
4
|
+
<% else %>
|
5
|
+
<%= budget_to_currency current_order&.total_budget.to_f %>
|
6
|
+
<% end %>
|
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
<% show_only_added ||= params.dig(:filter, :addition_type) == "added" %>
|
2
|
+
<%= card_for project, render_extra_data: true, link_whole_card: false, wrapper_class: "project-item", show_only_added: %>
|
@@ -1,19 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
aria-label="<%= t(".#{voted_for?(project) ? ".added" : ".add"}_descriptive", resource_name: translated_attribute(project.title)) %>">
|
13
|
-
<span>
|
14
|
-
<%= t(voted_for?(project) ? ".added" : ".add") %>
|
15
|
-
</span>
|
16
|
-
|
17
|
-
<%= cell("decidim/budgets/project_vote_button", project) %>
|
18
|
-
</div>
|
19
|
-
<% end %>
|
1
|
+
<div id="project-<%= project.id %>-budget-button">
|
2
|
+
<% if current_user.blank? %>
|
3
|
+
<button class="button button__lg w-full button__secondary"
|
4
|
+
data-dialog-open="loginModal"
|
5
|
+
aria-label="<%= t(".added_descriptive", resource_name: translated_attribute(project.title)) %>">
|
6
|
+
<%= t("add", scope: "decidim.budgets.projects.project_budget_button") %>
|
7
|
+
</button>
|
8
|
+
<% else %>
|
9
|
+
<%= cell("decidim/budgets/project_vote_button", project, project_item: true) %>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
@@ -1,13 +1,15 @@
|
|
1
|
-
<div class="
|
2
|
-
<div
|
3
|
-
<%=
|
1
|
+
<div class="budget__list--header">
|
2
|
+
<div>
|
3
|
+
<%= render partial: "addition_selector" %>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<div class="collection-sort-controls">
|
7
|
+
<%= render partial: "order" %>
|
4
8
|
</div>
|
5
9
|
</div>
|
6
10
|
|
7
11
|
<div class="budget-list">
|
8
|
-
|
9
|
-
<%= render partial: "project", locals: { project: project } %>
|
10
|
-
<% end %>
|
12
|
+
<%= render partial: "projects_list", locals: { project: } %>
|
11
13
|
</div>
|
12
14
|
|
13
15
|
<%= decidim_paginate projects %>
|
@@ -1,63 +1,66 @@
|
|
1
|
-
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
<% add_decidim_page_title t("decidim.budgets.projects.projects_for", name: translated_attribute(budget.title)) %>
|
2
|
+
<%= append_javascript_pack_tag "decidim_budgets" %>
|
3
|
+
<%= append_stylesheet_pack_tag "decidim_budgets" %>
|
4
|
+
|
5
|
+
<%= render partial: "budget_summary", locals: { include_heading: true, project_item: false, responsive: true } %>
|
6
|
+
<%= cell("decidim/budgets/budget_information_modal", budget) %>
|
7
|
+
|
8
|
+
<% content_for :aside do %>
|
9
|
+
<h1 class="h3 decorator"><%= t("decidim.budgets.projects.projects_for", name: translated_attribute(budget.title)) %></h1>
|
10
|
+
|
11
|
+
<%= render layout: "decidim/shared/filters", locals: { filter_sections: , search_variable: :search_text_cont, skip_to_id: "projects" } do %>
|
12
|
+
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render layout: "layouts/decidim/shared/layout_two_col" do %>
|
17
|
+
<% if projects.any? %>
|
18
|
+
<%= render partial: "exit_modal" %>
|
19
|
+
<%= render partial: "budget_excess" %>
|
20
|
+
<%= render partial: "budget_confirm" %>
|
21
|
+
|
22
|
+
<% unless voting_finished? %>
|
23
|
+
<div class="budget-summary__container">
|
24
|
+
<%= render partial: "budget_summary", locals: { include_heading: true, project_item: false, responsive: false } %>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<% if Decidim::Map.available?(:geocoding, :dynamic) && component_settings.geocoding_enabled? %>
|
29
|
+
<div class="budget-list__map">
|
30
|
+
<%= dynamic_map_for projects_data_for_map(all_geocoded_projects) do %>
|
31
|
+
<template id="marker-popup">
|
32
|
+
<div class="space-y-6">
|
33
|
+
<a href="${link}" class="card__list">
|
34
|
+
<div class="card__list-content">
|
35
|
+
<h3 class="h4 card__list-title">${title}</h3>
|
36
|
+
<div class="card__list-metadata">
|
37
|
+
{{each JSON.parse(items)}}
|
38
|
+
<span>{{html icon}}{{html text}}</span>
|
39
|
+
{{/each}}
|
20
40
|
</div>
|
21
41
|
</div>
|
22
|
-
</
|
23
|
-
<div class="map-info__button">
|
24
|
-
<a href="${link}" class="button button--sc">
|
25
|
-
<%= t(".view_project") %>
|
26
|
-
</a>
|
27
|
-
</div>
|
42
|
+
</a>
|
28
43
|
</div>
|
29
|
-
</
|
30
|
-
|
31
|
-
|
44
|
+
</template>
|
45
|
+
<% end %>
|
46
|
+
</div>
|
32
47
|
<% end %>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
48
|
+
|
49
|
+
<%= cell("decidim/budgets/limit_announcement", budget) %>
|
50
|
+
|
51
|
+
<% unless voting_finished? %>
|
52
|
+
<section class="layout-main__section">
|
53
|
+
<span class="text-xl font-semibold">
|
54
|
+
<%= t("select_projects", scope: "decidim.budgets.projects") %>
|
55
|
+
</span>
|
56
|
+
</section>
|
39
57
|
<% end %>
|
40
|
-
|
41
|
-
|
42
|
-
<div class="row columns">
|
43
|
-
<h2 class="section-heading">
|
44
|
-
<%= render partial: "count" %>
|
45
|
-
</h2>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<div class="row">
|
49
|
-
<div class="columns mediumlarge-4 large-3">
|
50
|
-
<%= render partial: "filters_small_view" %>
|
51
|
-
<div class="card card--secondary show-for-mediumlarge">
|
52
|
-
<%= render partial: "filters" %>
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
<div id="projects" class="columns mediumlarge-8 large-9" aria-live="polite">
|
58
|
+
|
59
|
+
<section id="projects" class="layout-main__section layout-main__heading">
|
56
60
|
<%= render partial: "projects" %>
|
57
|
-
</
|
58
|
-
|
59
|
-
|
61
|
+
</section>
|
62
|
+
<% else %>
|
63
|
+
<%= cell("decidim/announcement", t("empty", scope: "decidim.budgets.projects")) %>
|
64
|
+
<% end %>
|
60
65
|
|
61
|
-
<% content_for :js_content do %>
|
62
|
-
<%= javascript_pack_tag "decidim_budgets" %>
|
63
66
|
<% end %>
|
@@ -1,10 +1,11 @@
|
|
1
|
-
var $projects = $('#projects');
|
1
|
+
var $projects = $('#projects .budget-list');
|
2
|
+
var $order = $('.budget__list--header .collection-sort-controls');
|
2
3
|
var $projectsCount = $('#projects-count');
|
3
4
|
var $orderFilterInput = $('.order_filter');
|
4
5
|
|
5
|
-
$projects.html('<%= j(render partial: "
|
6
|
+
$projects.html('<%= j(render partial: "projects_list").strip.html_safe %>');
|
7
|
+
$order.html('<%= j(render partial: "order").strip.html_safe %>');
|
6
8
|
$projectsCount.html('<%= j(render partial: "count").strip.html_safe %>');
|
7
9
|
$orderFilterInput.val('<%= order %>');
|
8
10
|
|
9
|
-
|
10
|
-
$dropdownMenu.foundation();
|
11
|
+
document.dispatchEvent(new CustomEvent("ajax:loaded", { detail: $projects[0] }));
|