Adds logic to show 'see results' button only for finished budgets
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
<div class="float-right">
|
||||
<%= link_to t("admin.budget_investments.index.see_results"),
|
||||
budget_results_path(current_budget, heading_id: current_budget.headings.first),
|
||||
class: "button hollow medium", target: "_blank" %>
|
||||
</div>
|
||||
<% if @budget.has_winning_investments? %>
|
||||
<div class="float-right">
|
||||
<%= link_to t("admin.budget_investments.index.see_results"),
|
||||
budget_results_path(@budget, heading_id: @budget.headings.first),
|
||||
class: "button hollow medium", target: "_blank" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<h2 class="inline-block"><%= @budget.name %> - <%= t("admin.budget_investments.index.title") %></h2>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user