diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 554c8e9ac..7e5b0dac5 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -1167,6 +1167,11 @@ text-decoration: none; } + .confirmed { + font-size: rem-calc(24); + font-weight: bold; + } + .info { background: #6a2a72; diff --git a/app/views/budgets/ballot/_ballot.html.erb b/app/views/budgets/ballot/_ballot.html.erb index 5dd8bed23..e99de7510 100644 --- a/app/views/budgets/ballot/_ballot.html.erb +++ b/app/views/budgets/ballot/_ballot.html.erb @@ -9,11 +9,10 @@ <%= t("budgets.ballots.show.voted_html", count: @ballot.investments.count) %> +

+ <%= t("budgets.ballots.show.voted_info_html") %>

- - <%= t("budgets.ballots.show.voted_info_html") %> - -

+

<%= t("budgets.ballots.show.voted_info_2") %>

diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb index 866d4a9e7..4f18054f4 100644 --- a/app/views/budgets/investments/_sidebar.html.erb +++ b/app/views/budgets/investments/_sidebar.html.erb @@ -71,4 +71,8 @@ <% end %> <% end %> + + <%= link_to t("budgets.investments.header.check_ballot"), + budget_ballot_path(@budget), + class: "button hollow expanded" %> <% end %> diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml index 107b6d747..3fd88cd48 100644 --- a/config/locales/en/budgets.yml +++ b/config/locales/en/budgets.yml @@ -10,7 +10,8 @@ en: voted_html: one: "You have voted one investment." other: "You have voted %{count} investments." - voted_info_html: "You can change your vote at any time until the close of this phase.
No need to spend all the money available." + voted_info_html: "Your ballot is confirmed!" + voted_info_2: "But you can change your vote at any time until this phase is closed." zero: You have not voted any investment project. reasons_for_not_balloting: not_logged_in: You must %{signin} or %{signup} to continue. @@ -90,7 +91,7 @@ en: voted_info_link: change your vote different_heading_assigned_html: "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 my ballot" + check_ballot_link: "check and confirm my ballot" zero: You have not voted any investment project in this group. verified_only: "To create a new budget investment %{verify}." verify_account: "verify your account" @@ -142,10 +143,10 @@ en: zero: No supports give_support: Support header: - check_ballot: Check my ballot + check_ballot: Check and confirm my ballot different_heading_assigned_html: "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 my ballot" + check_ballot_link: "check and confirm my ballot" price: "This heading has a budget of" progress_bar: assigned: "You have assigned: " diff --git a/config/locales/es/budgets.yml b/config/locales/es/budgets.yml index 123b77f21..c827b2349 100644 --- a/config/locales/es/budgets.yml +++ b/config/locales/es/budgets.yml @@ -10,7 +10,8 @@ es: voted_html: one: "Has votado un proyecto." other: "Has votado %{count} proyectos." - voted_info_html: "Puedes cambiar tus votos en cualquier momento hasta el cierre de esta fase.
No hace falta que gastes todo el dinero disponible." + voted_info_html: "¡Tus votos están confirmados!" + voted_info_2: "Pero puedes cambiarlos en cualquier momento hasta el cierre de esta fase." zero: Todavía no has votado ningún proyecto de gasto. reasons_for_not_balloting: not_logged_in: Necesitas %{signin} o %{signup} para continuar. @@ -90,7 +91,7 @@ es: voted_info_link: cambiar tus votos different_heading_assigned_html: "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 mis votos" + check_ballot_link: "revisar y confirmar mis votos" zero: Todavía no has votado ningún proyecto de gasto en este ámbito del presupuesto. verified_only: "Para crear un nuevo proyecto de gasto %{verify}." verify_account: "verifica tu cuenta" @@ -142,10 +143,10 @@ es: other: "%{count} apoyos" give_support: Apoyar header: - check_ballot: Revisar mis votos + check_ballot: Revisar y confirmar mis votos different_heading_assigned_html: "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 mis votos" + check_ballot_link: "revisar y confirmar mis votos" price: "Esta partida tiene un presupuesto de" progress_bar: assigned: "Has asignado: " diff --git a/spec/features/budgets/ballots_spec.rb b/spec/features/budgets/ballots_spec.rb index 4398ab07f..639c4e75a 100644 --- a/spec/features/budgets/ballots_spec.rb +++ b/spec/features/budgets/ballots_spec.rb @@ -117,6 +117,7 @@ feature "Ballots" do within("#sidebar") do expect(page).to have_content investment1.title expect(page).to have_content "€10,000" + expect(page).to have_link("Check and confirm my ballot") end add_to_ballot(investment2) @@ -127,6 +128,7 @@ feature "Ballots" do within("#sidebar") do expect(page).to have_content investment2.title expect(page).to have_content "€20,000" + expect(page).to have_link("Check and confirm my ballot") end end @@ -146,6 +148,7 @@ feature "Ballots" do 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") end within("#budget_investment_#{investment.id}") do @@ -158,6 +161,7 @@ feature "Ballots" do 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") end end @@ -454,7 +458,9 @@ feature "Ballots" do visit budget_investments_path(budget, heading_id: new_york.id) add_to_ballot(investment) - click_link "Check my ballot" + within(".budget-heading") do + click_link "Check and confirm my ballot" + end expect(page).to have_content("You have voted one investment") diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb index 26cb0350a..4b04a5864 100644 --- a/spec/features/budgets/investments_spec.rb +++ b/spec/features/budgets/investments_spec.rb @@ -930,10 +930,12 @@ feature "Budget Investments" do visit budget_investments_path(budget, heading_id: heading.id) - expect(page).not_to have_link("Check my ballot") + expect(page).not_to have_link("Check and confirm 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") end end @@ -1564,7 +1566,8 @@ feature "Budget Investments" do visit budget_ballot_path(budget) - expect(page).to have_content "You can change your vote at any time until the close of this phase" + expect(page).to have_content "But you can change your vote at any time "\ + "until this phase is closed." within("#budget_group_#{global_group.id}") do expect(page).to have_content sp1.title @@ -1627,10 +1630,12 @@ feature "Budget Investments" do visit budget_investments_path(budget, heading_id: heading.id) - expect(page).to have_link("Check my ballot") + expect(page).to have_link("Check and confirm 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") end end