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

<div class="expanded budget no-margin-top">
  <div class="row" data-equalizer data-equalizer-on="medium">
    <div class="small-12 medium-9 column padding" data-equalizer-watch>
      <%= back_link_to budgets_path %>

      <h1><%= @budget.name %></h1>

      <%= safe_html_with_links @budget.description %>
    </div>
    <div class="small-12 medium-3 column info padding" data-equalizer-watch>
      <p>
        <strong><%= t('budgets.show.phase') %></strong>
      </p>
      <h2><%= t("budgets.phase.#{@budget.phase}") %></h2>

      <% 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 %>
            <div class="callout warning margin-top">
              <%= t("budgets.investments.index.sidebar.verified_only",
                  verify: link_to(t("budgets.investments.index.sidebar.verify_account"), verification_path)).html_safe %>
            </div>
          <% end %>
        <% else %>
          <div class="callout primary margin-top">
            <%= t("budgets.investments.index.sidebar.not_logged_in",
                  sign_in: link_to(t("budgets.investments.index.sidebar.sign_in"), new_user_session_path),
                  sign_up: link_to(t("budgets.investments.index.sidebar.sign_up"), new_user_registration_path)).html_safe %>
          </div>
        <% end %>
      <% end %>
    </div>
  </div>
</div>

<div class="row margin">
  <div class="small-12 medium-9 column">
    <% if @current_filter == "unfeasible" %>
      <h3 class="margin-bottom"><%= t("budgets.show.unfeasible_title") %></h3>
    <% elsif @current_filter == "unselected" %>
      <h3 class="margin-bottom"><%= t("budgets.show.unselected_title") %></h3>
    <% end %>
    <table class="table-fixed">
      <thead>
        <th><%= t('budgets.show.group') %></th>
      </thead>
      <tbody>
        <% @budget.groups.each do |group| %>
          <tr>
            <td>
              <% if group.headings.count == 1 %>
                <%= 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 %>
              <br>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>

<% if @budget.balloting_or_later? %>
  <% unless @current_filter == "unfeasible" %>
    <div class="row">
      <div class="small-12 column">
        <small>
          <%= link_to t("budgets.show.unfeasible"),
                      budget_path(@budget, filter: "unfeasible") %>
        </small>
      </div>
    </div>
  <% end %>

  <% unless @current_filter == "unselected" %>
    <div class="row">
      <div class="small-12 column">
        <small>
          <%= link_to t("budgets.show.unselected"),
                      budget_path(@budget, filter: "unselected") %>
        </small>
      </div>
    </div>
  <% end %>
<% end %>
<commit_msg>links results from budget's show<commit_after><% content_for :canonical do %>
  <%= render "shared/canonical", href: budget_url(@budget, filter: @current_filter) %>
<% end %>

<div class="expanded budget no-margin-top">
  <div class="row" data-equalizer data-equalizer-on="medium">
    <div class="small-12 medium-9 column padding" data-equalizer-watch>
      <%= back_link_to budgets_path %>

      <h1><%= @budget.name %></h1>

      <%= safe_html_with_links @budget.description %>
    </div>
    <div class="small-12 medium-3 column info padding" data-equalizer-watch>
      <p>
        <strong><%= t('budgets.show.phase') %></strong>
      </p>
      <h2><%= t("budgets.phase.#{@budget.phase}") %></h2>

      <% 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 %>
            <div class="callout warning margin-top">
              <%= t("budgets.investments.index.sidebar.verified_only",
                  verify: link_to(t("budgets.investments.index.sidebar.verify_account"), verification_path)).html_safe %>
            </div>
          <% end %>
        <% else %>
          <div class="callout primary margin-top">
            <%= t("budgets.investments.index.sidebar.not_logged_in",
                  sign_in: link_to(t("budgets.investments.index.sidebar.sign_in"), new_user_session_path),
                  sign_up: link_to(t("budgets.investments.index.sidebar.sign_up"), new_user_registration_path)).html_safe %>
          </div>
        <% end %>
      <% end %>

      <% if @budget.finished? %>
        <div>
          <%= link_to "Results",
                      budget_results_path(@budget, heading_id: @budget.headings.first) %>
        </div>
      <% end %>
    </div>
  </div>
</div>

<div class="row margin">
  <div class="small-12 medium-9 column">
    <% if @current_filter == "unfeasible" %>
      <h3 class="margin-bottom"><%= t("budgets.show.unfeasible_title") %></h3>
    <% elsif @current_filter == "unselected" %>
      <h3 class="margin-bottom"><%= t("budgets.show.unselected_title") %></h3>
    <% end %>
    <table class="table-fixed">
      <thead>
        <th><%= t('budgets.show.group') %></th>
      </thead>
      <tbody>
        <% @budget.groups.each do |group| %>
          <tr>
            <td>
              <% if group.headings.count == 1 %>
                <%= 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 %>
              <br>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>

<% if @budget.balloting_or_later? %>
  <% unless @current_filter == "unfeasible" %>
    <div class="row">
      <div class="small-12 column">
        <small>
          <%= link_to t("budgets.show.unfeasible"),
                      budget_path(@budget, filter: "unfeasible") %>
        </small>
      </div>
    </div>
  <% end %>

  <% unless @current_filter == "unselected" %>
    <div class="row">
      <div class="small-12 column">
        <small>
          <%= link_to t("budgets.show.unselected"),
                      budget_path(@budget, filter: "unselected") %>
        </small>
      </div>
    </div>
  <% end %>
<% end %>

{'fraction_non_alphanumeric': 0.1682409308692676, 'fraction_numerical': 0.006023271731690623, 'mean_word_length': 1.9844771241830066, 'pattern_counts': {'":': 0, '<': 194, '<?xml version=': 0, '>': 194, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4128004', 'n_tokens_mistral': 2492, 'n_tokens_neox': 2277, 'n_words': 400}