diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb index 2776a823f..06d3b9d81 100644 --- a/app/views/budgets/investments/_sidebar.html.erb +++ b/app/views/budgets/investments/_sidebar.html.erb @@ -40,6 +40,12 @@ amount_spent: @ballot.formatted_amount_spent(@heading)) %>
+ <% elsif @assigned_heading.present? %> +<%= 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))) + ) %>
<% else %><%= t("budgets.investments.index.sidebar.zero") %>
<% end %> diff --git a/config/locales/budgets.en.yml b/config/locales/budgets.en.yml index 41f6fbe8f..e7ee15b5a 100644 --- a/config/locales/budgets.en.yml +++ b/config/locales/budgets.en.yml @@ -63,7 +63,8 @@ en: other: "You voted %{count} proposals with a cost of %{amount_spent}" 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 - zero: You have not voted any investment project. + different_heading_assigned_html: "You have active votes in another heading: %{heading_link}" + 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" create: "Create budget investment" diff --git a/config/locales/budgets.es.yml b/config/locales/budgets.es.yml index e5fc416e9..1d848d04a 100644 --- a/config/locales/budgets.es.yml +++ b/config/locales/budgets.es.yml @@ -63,7 +63,8 @@ es: other: "Has votado %{count} propuestas por un valor de %{amount_spent}" 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 - zero: "Todavía no has votado ninguna propuesta de inversión." + different_heading_assigned_html: "Ya apoyaste propuestas de otra sección del presupuesto: %{heading_link}" + 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" create: "Crear propuesta de inversión"