<commit_before><div class="expanded budget no-margin-top padding">
  <div class="row">
    <%= back_link_to @ballot_referer %>

    <h1 class="text-center"><%= t("budgets.ballots.show.title") %></h1>

    <div class="small-12 medium-8 column small-centered text-center">
      <h2>
        <%= t("budgets.ballots.show.voted_html",
            count: @ballot.investments.count) %>
      </h2>
      <p>
        <small>
          <%= t("budgets.ballots.show.voted_info_html") %>
        </small>
      </p>
    </div>
  </div>
</div>

<div class="row ballot">
  <div class="margin-top">
    <% @ballot.groups.each do |group| %>
      <div id="<%= dom_id(group) %>"
          class="small-12 medium-6 column">
        <h3 class="subtitle">
          <%= group.name %> - <%= group.headings.first.name %>
        </h3>
        <% if @ballot.has_lines_in_group?(group) %>
          <h4 class="amount-spent text-right">
            <%= t("budgets.ballots.show.amount_spent") %>
            <span>
              <%= @ballot.formatted_amount_spent(@ballot.heading_for_group(group)) %>
            </span>
          </h4>
        <% else %>
          <p>
            <%= t("budgets.ballots.show.zero") %><br>
          </p>
        <% end %>

        <ul class="ballot-list">
          <%= render partial: 'budgets/ballot/investment',
                     collection: @ballot.investments.by_group(group.id) %>
        </ul>

        <h4>
          <%= t("budgets.ballots.show.remaining",
                amount: @ballot.formatted_amount_available(@ballot.heading_for_group(group))).html_safe %>
        </h4>
      </div>
    <% end %>
  </div>
</div>
<commit_msg>orders groups in ballot view<commit_after><div class="expanded budget no-margin-top padding">
  <div class="row">
    <%= back_link_to @ballot_referer %>

    <h1 class="text-center"><%= t("budgets.ballots.show.title") %></h1>

    <div class="small-12 medium-8 column small-centered text-center">
      <h2>
        <%= t("budgets.ballots.show.voted_html",
            count: @ballot.investments.count) %>
      </h2>
      <p>
        <small>
          <%= t("budgets.ballots.show.voted_info_html") %>
        </small>
      </p>
    </div>
  </div>
</div>

<div class="row ballot">
  <div class="margin-top">
    <% @ballot.groups.order(name: :asc).each do |group| %>
      <div id="<%= dom_id(group) %>"
          class="small-12 medium-6 column">
        <h3 class="subtitle">
          <%= group.name %> - <%= group.headings.first.name %>
        </h3>
        <% if @ballot.has_lines_in_group?(group) %>
          <h4 class="amount-spent text-right">
            <%= t("budgets.ballots.show.amount_spent") %>
            <span>
              <%= @ballot.formatted_amount_spent(@ballot.heading_for_group(group)) %>
            </span>
          </h4>
        <% else %>
          <p>
            <%= t("budgets.ballots.show.zero") %><br>
          </p>
        <% end %>

        <ul class="ballot-list">
          <%= render partial: 'budgets/ballot/investment',
                     collection: @ballot.investments.by_group(group.id) %>
        </ul>

        <h4>
          <%= t("budgets.ballots.show.remaining",
                amount: @ballot.formatted_amount_available(@ballot.heading_for_group(group))).html_safe %>
        </h4>
      </div>
    <% end %>
  </div>
</div>

{'fraction_non_alphanumeric': 0.18587249326548938, 'fraction_numerical': 0.009577970667464832, 'mean_word_length': 2.0081008100810083, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, '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': '2388554', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1139, 'n_words': 173}