">
@@ -14,7 +14,7 @@
budget_ballot_line_path(id: investment.id,
budget_id: investment.budget_id,
investments_ids: investment_ids),
- class: "delete small expanded",
+ class: "button button-remove-support expanded",
method: :delete,
remote: true %>
<% end %>
@@ -31,7 +31,7 @@
budget_ballot_lines_path(investment_id: investment.id,
budget_id: investment.budget_id,
investments_ids: investment_ids),
- class: "button button-support small expanded",
+ class: "button button-support expanded",
title: t("budgets.investments.investment.support_title"),
method: :post,
remote: true %>
diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb
index f33abf8b733a..09196d0b262f 100644
--- a/app/views/budgets/investments/_sidebar.html.erb
+++ b/app/views/budgets/investments/_sidebar.html.erb
@@ -36,6 +36,10 @@
+
+
+
+
<% if @ballot.investments.by_heading(@heading.id).count > 0 %>
@@ -57,6 +61,12 @@
<%= t("budgets.investments.index.sidebar.zero") %>
<% end %>
+
+ <%= sanitize(t("budgets.investments.index.sidebar.voted_info",
+ link: link_to(t("budgets.investments.index.sidebar.voted_info_link"), budget_ballot_path(@budget)),
+ phase_end_date: l(@budget.current_phase.ends_at.to_date, format: :long))) %>
+
+
<% if @heading %>
<% @ballot.investments.by_heading(@heading.id).each do |investment| %>
diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml
index 19b5f47a9a98..d3038220bb56 100644
--- a/config/locales/en/budgets.yml
+++ b/config/locales/en/budgets.yml
@@ -121,9 +121,11 @@ en:
knapsack: "You can %{link} at any time until the close of this phase. No need to spend all the money available."
approval: "You can %{link} at any time until the close of this phase."
change_vote_link: "change your vote"
+ voted_info: "%{link} at any time until the %{phase_end_date}. No need to spend all the money available."
+ voted_info_link: "Change your votes"
different_heading_assigned: "You have active votes in another heading: %{heading_link}"
change_ballot: "If your change your mind you can remove your votes in %{check_ballot} and start again."
- check_ballot_link: "check and confirm my ballot"
+ check_ballot_link: "submit my ballot"
zero: You have not voted any investment project in this group.
verified_only: "To create a new budget investment %{verify}."
create: "Create a budget investment"
@@ -183,18 +185,18 @@ en:
zero: No supports
give_support: Support
header:
- check_ballot: Check and confirm my ballot
+ check_ballot: "Submit my ballot"
different_heading_assigned: "You have active votes in another heading: %{heading_link}"
change_ballot: "If your change your mind you can remove your votes in %{check_ballot} and start again."
- check_ballot_link: "check and confirm my ballot"
- price: "This heading has a budget of"
+ check_ballot_link: "submit my ballot"
+ price: "Total budget"
progress_bar:
- assigned: "You have assigned: "
- available: "Available budget: "
votes:
zero: "You have selected 0 projects out of %{limit}"
one: "You have selected 1 project out of %{limit}"
other: "You have selected %{count} projects out of %{limit}"
+ assigned: "Used"
+ available: "Still available to you"
show:
phase: Actual phase
see_results: See results
diff --git a/config/locales/es/budgets.yml b/config/locales/es/budgets.yml
index 0c292e8296e6..a99c910f6ca9 100644
--- a/config/locales/es/budgets.yml
+++ b/config/locales/es/budgets.yml
@@ -121,6 +121,8 @@ es:
knapsack: "Puedes %{link} en cualquier momento hasta el cierre de esta fase. No hace falta que gastes todo el dinero disponible."
approval: "Puedes %{link} en cualquier momento hasta el cierre de esta fase."
change_vote_link: "cambiar tus votos"
+ voted_info: "%{link} en cualquier momento hasta el %{phase_end_date}. No hace falta que gastes todo el dinero disponible."
+ voted_info_link: "Cambia tus votos"
different_heading_assigned: "Ya apoyaste proyectos de otra sección del presupuesto: %{heading_link}"
change_ballot: "Si cambias de opinión puedes borrar tus votos en %{check_ballot} y volver a empezar."
check_ballot_link: "revisar y confirmar mis votos"
@@ -187,14 +189,14 @@ es:
different_heading_assigned: "Ya apoyaste proyectos de otra sección del presupuesto: %{heading_link}"
change_ballot: "Si cambias de opinión puedes borrar tus votos en %{check_ballot} y volver a empezar."
check_ballot_link: "revisar y confirmar mis votos"
- price: "Esta partida tiene un presupuesto de"
+ price: "Presupuesto total"
progress_bar:
- assigned: "Has asignado: "
- available: "Presupuesto disponible: "
votes:
zero: "Has seleccionado 0 proyectos de %{limit}"
one: "Has seleccionado 1 proyecto de %{limit}"
other: "Has seleccionado %{count} proyectos de %{limit}"
+ assigned: "Usado"
+ available: "Todavía disponible"
show:
phase: Fase actual
see_results: Ver resultados
diff --git a/spec/system/budgets/ballots_spec.rb b/spec/system/budgets/ballots_spec.rb
index a8a638eb381d..a47347298f95 100644
--- a/spec/system/budgets/ballots_spec.rb
+++ b/spec/system/budgets/ballots_spec.rb
@@ -136,24 +136,24 @@
add_to_ballot("Bring back King Kong")
- expect(page).to have_css("#amount-spent", text: "€10,000")
- expect(page).to have_css("#amount-available", text: "€990,000")
+ expect(page).to have_css("#amount_spent", text: "€10,000")
+ expect(page).to have_css("#amount_available", text: "€990,000")
within("#sidebar") do
expect(page).to have_content "Bring back King Kong"
expect(page).to have_content "€10,000"
- expect(page).to have_link("Check and confirm my ballot")
+ expect(page).to have_link("Submit my ballot")
end
add_to_ballot("Paint cabs black")
- expect(page).to have_css("#amount-spent", text: "€30,000")
- expect(page).to have_css("#amount-available", text: "€970,000")
+ expect(page).to have_css("#amount_spent", text: "€30,000")
+ expect(page).to have_css("#amount_available", text: "€970,000")
within("#sidebar") do
expect(page).to have_content "Paint cabs black"
expect(page).to have_content "€20,000"
- expect(page).to have_link("Check and confirm my ballot")
+ expect(page).to have_link("Submit my ballot")
end
end
@@ -165,26 +165,26 @@
click_link "New York €1,000,000"
expect(page).to have_content investment.title
- expect(page).to have_css("#amount-spent", text: "€10,000")
- expect(page).to have_css("#amount-available", text: "€990,000")
+ expect(page).to have_css("#amount_spent", text: "€10,000")
+ expect(page).to have_css("#amount_available", text: "€990,000")
within("#sidebar") do
expect(page).to have_content investment.title
expect(page).to have_content "€10,000"
- expect(page).to have_link("Check and confirm my ballot")
+ expect(page).to have_link("Submit my ballot")
end
within("#budget_investment_#{investment.id}") do
find(".remove a").click
end
- expect(page).to have_css("#amount-spent", text: "€0")
- expect(page).to have_css("#amount-available", text: "€1,000,000")
+ expect(page).to have_css("#amount_spent", text: "€0")
+ expect(page).to have_css("#amount_available", text: "€1,000,000")
within("#sidebar") do
expect(page).not_to have_content investment.title
expect(page).not_to have_content "€10,000"
- expect(page).to have_link("Check and confirm my ballot")
+ expect(page).to have_link("Submit my ballot")
end
end
@@ -234,8 +234,8 @@
add_to_ballot("Cheap")
- expect(page).to have_css("#amount-spent", text: "€10,000")
- expect(page).to have_css("#amount-available", text: "€9,990,000")
+ expect(page).to have_css("#amount_spent", text: "€10,000")
+ expect(page).to have_css("#amount_available", text: "€9,990,000")
within("#sidebar") do
expect(page).to have_content "Cheap"
@@ -246,13 +246,13 @@
click_link "See all investments"
click_link "District 1 €1,000,000"
- expect(page).to have_css("#amount-spent", text: "€0")
- expect(page).to have_css("#amount-spent", text: "€1,000,000")
+ expect(page).to have_css("#amount_spent", text: "€0")
+ expect(page).to have_css("#amount_available", text: "€1,000,000")
add_to_ballot("Average")
- expect(page).to have_css("#amount-spent", text: "€20,000")
- expect(page).to have_css("#amount-available", text: "€980,000")
+ expect(page).to have_css("#amount_spent", text: "€20,000")
+ expect(page).to have_css("#amount_available", text: "€980,000")
within("#sidebar") do
expect(page).to have_content "Average"
@@ -266,8 +266,8 @@
click_link "See all investments"
click_link "All city €10,000,000"
- expect(page).to have_css("#amount-spent", text: "€10,000")
- expect(page).to have_css("#amount-available", text: "€9,990,000")
+ expect(page).to have_css("#amount_spent", text: "€10,000")
+ expect(page).to have_css("#amount_available", text: "€9,990,000")
within("#sidebar") do
expect(page).to have_content "Cheap"
@@ -293,7 +293,7 @@
add_to_ballot("Park expansion")
within("#progress_bar") do
- expect(page).to have_css("#amount-spent", text: "€10,000")
+ expect(page).to have_css("#amount_spent", text: "€10,000")
end
end
end
@@ -406,7 +406,7 @@
expect(page).to have_content("You have voted one investment")
within("#budget_investment_#{investment.id}") do
- find(".icon-x").click
+ find(".fas.fa-times").click
end
expect(page).to have_current_path(budget_ballot_path(budget))
@@ -421,8 +421,8 @@
login_as(user)
visit budget_investments_path(budget, heading_id: new_york.id)
- expect(page).to have_css("#amount-spent", text: "€30,000")
- expect(page).to have_css("#amount-available", text: "€970,000")
+ expect(page).to have_css("#amount_spent", text: "€30,000")
+ expect(page).to have_css("#amount_available", text: "€970,000")
within("#sidebar") do
expect(page).to have_content investment1.title
@@ -433,11 +433,11 @@
end
within("#sidebar #budget_investment_#{investment1.id}_sidebar") do
- find(".icon-x").click
+ find(".fas.fa-times").click
end
- expect(page).to have_css("#amount-spent", text: "€20,000")
- expect(page).to have_css("#amount-available", text: "€980,000")
+ expect(page).to have_css("#amount_spent", text: "€20,000")
+ expect(page).to have_css("#amount_available", text: "€980,000")
within("#sidebar") do
expect(page).not_to have_content investment1.title
@@ -456,13 +456,13 @@
add_to_ballot("Sully monument")
within(".budget-heading") do
- click_link "Check and confirm my ballot"
+ click_link "Submit my ballot"
end
expect(page).to have_content("You have voted one investment")
within(".ballot-list li", text: "Sully monument") do
- find(".icon-x").click
+ find(".fas.fa-times").click
end
expect(page).to have_content("You have voted 0 investments")
@@ -640,7 +640,7 @@
end
within("#budget_investment_#{bi1.id}_sidebar") do
- find(".icon-x").click
+ find(".fas.fa-times").click
end
expect(page).not_to have_css "#budget_investment_#{bi1.id}_sidebar"
diff --git a/spec/system/budgets/investments_spec.rb b/spec/system/budgets/investments_spec.rb
index b87e568e6967..7e6d4ae74b28 100644
--- a/spec/system/budgets/investments_spec.rb
+++ b/spec/system/budgets/investments_spec.rb
@@ -1046,12 +1046,12 @@ def investments_order
visit budget_investments_path(budget, heading_id: heading.id)
- expect(page).not_to have_link("Check and confirm my ballot")
+ expect(page).not_to have_link("Submit my ballot")
expect(page).not_to have_css("#progress_bar")
within("#sidebar") do
expect(page).not_to have_content("My ballot")
- expect(page).not_to have_link("Check and confirm my ballot")
+ expect(page).not_to have_link("Submit my ballot")
end
end
@@ -1687,12 +1687,12 @@ def investments_order
visit budget_investments_path(budget, heading_id: heading.id)
- expect(page).to have_link("Check and confirm my ballot")
+ expect(page).to have_link("Submit my ballot")
expect(page).to have_css("#progress_bar")
within("#sidebar") do
expect(page).to have_content("My ballot")
- expect(page).to have_link("Check and confirm my ballot")
+ expect(page).to have_link("Submit my ballot")
end
end