<% content_for :canonical do %> <%= render "shared/canonical", href: budget_url(@budget, filter: @current_filter) %> <% end %>
<%= back_link_to budgets_path %>

<%= @budget.name %>

<%= auto_link_already_sanitized_html wysiwyg(@budget.description) %>

<%= t("budgets.show.phase") %>

<%= t("budgets.phase.#{@budget.phase}") %>

<% if @budget.accepting? %> <% if current_user %> <% if current_user.level_two_or_three_verified? %> <%= link_to t("budgets.investments.index.sidebar.create"), new_budget_investment_path(@budget), class: "button margin-top expanded" %> <% else %>
<%= sanitize(t("budgets.investments.index.sidebar.verified_only", verify: link_to_verify_account)) %>
<% end %> <% else %>
<%= sanitize(t("budgets.investments.index.sidebar.not_logged_in", sign_in: link_to_signin, sign_up: link_to_signup)) %>
<% end %> <% end %> <% if can?(:read_results, @budget) %> <%= link_to t("budgets.show.see_results"), budget_results_path(@budget), class: "button margin-top expanded" %> <% end %>
<% if @current_filter == "unfeasible" %>

<%= t("budgets.show.unfeasible_title") %>

<% elsif @current_filter == "unselected" %>

<%= t("budgets.show.unselected_title") %>

<% end %> <% @budget.groups.each do |group| %> <% end %>
<%= t("budgets.show.group") %>
<% if group.single_heading_group? %> <%= link_to group.name, budget_investments_path(@budget, heading_id: group.headings.first.id, filter: @current_filter), data: { no_turbolink: true } %> <% else %> <%= link_to group.name, budget_group_path(@budget, group, filter: @current_filter) %> <% end %>
<% if @budget.balloting_or_later? %> <% unless @current_filter == "unfeasible" %>
<%= link_to t("budgets.show.unfeasible"), budget_path(@budget, filter: "unfeasible") %>
<% end %> <% unless @current_filter == "unselected" %>
<%= link_to t("budgets.show.unselected"), budget_path(@budget, filter: "unselected") %>
<% end %> <% end %>