Merge pull request #1535 from consul/sidebar-msg

Proper message in sidebar depending on user's ballot status
This commit is contained in:
Alberto
2017-05-12 19:49:05 +02:00
committed by GitHub
3 changed files with 10 additions and 2 deletions

View File

@@ -40,6 +40,12 @@
amount_spent: @ballot.formatted_amount_spent(@heading)) %>
</em>
</p>
<% elsif @assigned_heading.present? %>
<p><%= 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)))
) %></p>
<% else %>
<p><strong><%= t("budgets.investments.index.sidebar.zero") %></strong></p>
<% end %>