<% if has_banners? %> <%= render "shared/banner" %> <% end %> <% provide :title do %><%= t("budgets.index.title") %><% end %> <% content_for :canonical do %> <%= render "shared/canonical", href: budgets_url %> <% end %> <% if current_budget.present? %>

<%= current_budget.name %>

<%= auto_link_already_sanitized_html wysiwyg(current_budget.description) %>

<%= link_to t("budgets.index.section_header.help"), "#section_help" %>

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

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

<%= link_to t("budgets.index.section_header.all_phases"), "#all_phases" %> <% if current_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(current_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, current_budget) %> <%= link_to t("budgets.show.see_results"), budget_results_path(current_budget, heading_id: current_budget.headings.first), class: "button margin-top expanded" %> <% end %>
<% current_budget.groups.each do |group| %>

<%= group.name %>

    <% group.headings.sort_by_name.each do |heading| %>
  • <% unless current_budget.informing? || current_budget.finished? %> <%= link_to budget_investments_path(current_budget.id, heading_id: heading.id) do %> <%= heading_name_and_price_html(heading, current_budget) %> <% end %> <% else %>
    <%= heading_name_and_price_html(heading, current_budget) %>
    <% end %>
  • <% end %>
<% end %>
<% unless current_budget.informing? %>

<%= t("budgets.index.map") %>

<%= render_map(nil, "budgets", false, nil, @budgets_coordinates) %>
    <% show_links = show_links_to_budget_investments(current_budget) %> <% if show_links %>
  • <%= link_to budget_path(current_budget) do %> <%= t("budgets.index.investment_proyects") %> <% end %>
  • <% end %>
  • <%= link_to budget_path(current_budget, filter: "unfeasible") do %> <%= t("budgets.index.unfeasible_investment_proyects") %> <% end %>
  • <% if show_links %>
  • <%= link_to budget_path(current_budget, filter: "unselected") do %> <%= t("budgets.index.not_selected_investment_proyects") %> <% end %>
  • <% end %>
<% end %>

<%= t("budgets.index.all_phases") %>

<%= render "phases", budget: current_budget %>
<% if @finished_budgets.present? %> <%= render "finished", budgets: @finished_budgets %> <% end %>
<% else %>

<%= t("budgets.index.title") %>

<%= t("budgets.index.empty_budgets") %>
<% end %>

<%= t("budgets.index.section_footer.title") %>

<%= t("budgets.index.section_footer.description") %>