From a49b206b424110ed24340d29e28de72edc92d1d1 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 26 May 2017 14:55:27 +0200 Subject: [PATCH] adds help message to how change ballot --- app/views/budgets/investments/_header.html.erb | 6 ++++++ app/views/budgets/investments/_sidebar.html.erb | 12 ++++++++++-- config/locales/budgets.en.yml | 4 ++++ config/locales/budgets.es.yml | 4 ++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/app/views/budgets/investments/_header.html.erb b/app/views/budgets/investments/_header.html.erb index 2ed01d989..42e133d5a 100644 --- a/app/views/budgets/investments/_header.html.erb +++ b/app/views/budgets/investments/_header.html.erb @@ -42,6 +42,12 @@ @assigned_heading.name, budget_investments_path(@budget, heading_id: @assigned_heading.try(:id))) ) %> +
+ + <%= t("budgets.investments.header.change_ballot", + check_ballot: link_to(t("budgets.investments.header.check_ballot_link"), + budget_ballot_path(@budget))).html_safe %> + <% end %> diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb index 06d3b9d81..4ae9104d5 100644 --- a/app/views/budgets/investments/_sidebar.html.erb +++ b/app/views/budgets/investments/_sidebar.html.erb @@ -41,11 +41,19 @@

<% elsif @assigned_heading.present? %> -

<%= t("budgets.investments.index.sidebar.different_heading_assigned_html", +

+ <%= t("budgets.investments.index.sidebar.different_heading_assigned_html", heading_link: link_to( @assigned_heading.name, budget_investments_path(@budget, heading_id: @assigned_heading.try(:id))) - ) %>

+ ) %> +
+ + <%= t("budgets.investments.index.sidebar.change_ballot", + check_ballot: link_to(t("budgets.investments.index.sidebar.check_ballot_link"), + budget_ballot_path(@budget))).html_safe %> + +

<% else %>

<%= t("budgets.investments.index.sidebar.zero") %>

<% end %> diff --git a/config/locales/budgets.en.yml b/config/locales/budgets.en.yml index 570f9da35..19b52e976 100644 --- a/config/locales/budgets.en.yml +++ b/config/locales/budgets.en.yml @@ -64,6 +64,8 @@ en: voted_info: You can %{link} at any time until the close of this phase. No need to spend all the money available. 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" 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" @@ -106,6 +108,8 @@ en: header: check_ballot: Check 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" progress_bar: available: "Available: " show: diff --git a/config/locales/budgets.es.yml b/config/locales/budgets.es.yml index a8e7fa5fa..6475eea79 100644 --- a/config/locales/budgets.es.yml +++ b/config/locales/budgets.es.yml @@ -64,6 +64,8 @@ es: voted_info: Puedes %{link} en cualquier momento hasta el cierre de esta fase. No hace falta que gastes todo el dinero disponible. voted_info_link: cambiar tus votos different_heading_assigned_html: "Ya apoyaste propuestas 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" zero: "Todavía no has votado ninguna propuesta de inversión en este ámbito del presupuesto." verified_only: "Para crear una nueva propuesta de inversión %{verify}." verify_account: "verifica tu cuenta" @@ -106,6 +108,8 @@ es: header: check_ballot: Revisar mis votos different_heading_assigned_html: "Ya apoyaste propuestas 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" progress_bar: available: "Disponible: " show: