<commit_before><%- model_class = Person -%>
<div class="row page-header">
  <div class="span2">
    <h1><%=t '.title', :default => "People" %></h1>
  </div>
  <div class='span3'>
   <label for="tags">Tags</label>
      <%= form_tag '/people', method: :get %>
      <%= text_field_tag :tags,
                            params[:tags],
                            class: 'tokenfield input-small span4',
                            id:'tag-field',
                            data: { search_url: '/taggings/search?q=%QUERY',
                                    submit_id: 'tag-field',
                                    submit_on_tag: true,
                                    pre_populate: @tags
                                  }
                          %>
      <%= submit_tag "Search", :name => nil, :class => 'btn btn-primary' %>
  </div>
  <div class="span2">

  </div>
  <div class='span3'>
    <%= link_to "New Person", "https://brl.nyc", target: "_blank", class: 'btn btn-small' %>
  </div>
</div>

<div class="row">
  <div class="span12">
    <p class="pull-right"><%= Person.count %> people are members of the CUTGroup.</p>
  </div>
</div>
<div class="row">
  <div class="span12" style="text-align:center">
    <%= will_paginate @people, :renderer => BootstrapPagination::Rails %>
  </div>
</div>
<div class="row">
  <div class="span12">
    <table class="table table-striped">
      <thead>
        <tr>
          <th>Add/Remove from Pool</th>
          <th>Name</th>
          <th>Address</th>
          <th>Email address</th>
          <th>Phone number</th>
          <th><%= sortable 'verified','Verified?'%></th>
          <th><%= sortable 'low_income','Low Income?'%></th>
          <th><%= sortable 'created_at', 'Signup date' %></th>
          <th>Preferred Contact Method</th>
          <th><%= sortable 'tag_count_cache', 'Tag Count' %></th>
          <th>Gift Cards</th>
          <th>Sessions Attended</th>
          <th conspan="3">&nbsp;</th>
        </tr>
      </thead>
      <tbody>
        <% @people.each do |person| %>
          <tr id='person-<%= person.id %>'>
            <td><%= render partial: 'add_remove_cart',locals: {person: person} %></td>
            <td><%= link_to "#{person.first_name} #{person.last_name}", person_path(person) %></td>
            <td><%= address_fields_to_sentence(person) %></td>
            <td><%= best_in_place person, :email_address %></td>
            <td><%= best_in_place person, :phone_number %></td>
            <td><%= best_in_place person, :verified, as: :select, collection: @verified_types.map{|p| [p,p]} %></td>
            <td><%= person.low_income %></td>
            <td><%= person.created_at.to_s(:short) %></td>
            <td><%= best_in_place person, :preferred_contact_method,
                                          as: :select,
                                          collection: { 'SMS'=>'SMS',
                                                        'EMAIL'=>'EMAIL'} %>
            </td>
            <td>
            <%= person.tag_count %>
            </td>
            <td>
              <%= person.gift_cards.size %>
            </td>
            <td>
              <%= person.invitations.where(aasm_state:'attended').size %>
            </td>

            <td>
              <%= link_to t('.edit', :default => t('helpers.links.edit')),
                          edit_person_path(person), :class => 'btn btn-mini btn-block' %>
              <%= link_to t('.destroy', :default => t('helpers.links.destroy')),
                          person_path(person),
                          :method => :delete,
                          :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
                          :class => 'btn btn-mini btn-danger btn-block' %>
                <%= link_to 'Deactivate',
                          deactivate_people_path(person),
                          remote: true,
                          method: :post,
                          :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
                          :class => 'btn btn-mini btn-danger btn-block' %>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>

<div class="row">
  <div class="span12" style="text-align:center">
    <%= will_paginate @people, :renderer => BootstrapPagination::Rails %>
  </div>
</div>
<commit_msg>moving the person count elsewhere<commit_after><%- model_class = Person -%>
<div class="row page-header">
  <div class="span2">
    <h1><%=t '.title', :default => "People" %></h1>
    <h5 class="pull-left"><%= Person.count %></h5>
  </div>
  <div class='span3'>
   <label for="tags">Tags</label>
      <%= form_tag '/people', method: :get %>
      <%= text_field_tag :tags,
                            params[:tags],
                            class: 'tokenfield input-small span4',
                            id:'tag-field',
                            data: { search_url: '/taggings/search?q=%QUERY',
                                    submit_id: 'tag-field',
                                    submit_on_tag: true,
                                    pre_populate: @tags
                                  }
                          %>
      <%= submit_tag "Search", :name => nil, :class => 'btn btn-primary' %>
  </div>
  <div class="span2">

  </div>
  <div class='span3'>
    <%= link_to "New Person", "https://brl.nyc", target: "_blank", class: 'btn btn-small' %>
  </div>
</div>

<div class="row">
  <div class="span12" style="text-align:center">
    <%= will_paginate @people, :renderer => BootstrapPagination::Rails %>
  </div>
</div>
<div class="row">
  <div class="span12">
    <table class="table table-striped">
      <thead>
        <tr>
          <th>Add/Remove from Pool</th>
          <th>Name</th>
          <th>Address</th>
          <th>Email address</th>
          <th>Phone number</th>
          <th><%= sortable 'verified','Verified?'%></th>
          <th><%= sortable 'low_income','Low Income?'%></th>
          <th><%= sortable 'created_at', 'Signup date' %></th>
          <th>Preferred Contact Method</th>
          <th><%= sortable 'tag_count_cache', 'Tag Count' %></th>
          <th>Gift Cards</th>
          <th>Sessions Attended</th>
          <th conspan="3">&nbsp;</th>
        </tr>
      </thead>
      <tbody>
        <% @people.each do |person| %>
          <tr id='person-<%= person.id %>'>
            <td><%= render partial: 'add_remove_cart',locals: {person: person} %></td>
            <td><%= link_to "#{person.first_name} #{person.last_name}", person_path(person) %></td>
            <td><%= address_fields_to_sentence(person) %></td>
            <td><%= best_in_place person, :email_address %></td>
            <td><%= best_in_place person, :phone_number %></td>
            <td><%= best_in_place person, :verified, as: :select, collection: @verified_types.map{|p| [p,p]} %></td>
            <td><%= person.low_income %></td>
            <td><%= person.created_at.to_s(:short) %></td>
            <td><%= best_in_place person, :preferred_contact_method,
                                          as: :select,
                                          collection: { 'SMS'=>'SMS',
                                                        'EMAIL'=>'EMAIL'} %>
            </td>
            <td>
            <%= person.tag_count %>
            </td>
            <td>
              <%= person.gift_cards.size %>
            </td>
            <td>
              <%= person.invitations.where(aasm_state:'attended').size %>
            </td>

            <td>
              <%= link_to t('.edit', :default => t('helpers.links.edit')),
                          edit_person_path(person), :class => 'btn btn-mini btn-block' %>
              <%= link_to t('.destroy', :default => t('helpers.links.destroy')),
                          person_path(person),
                          :method => :delete,
                          :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
                          :class => 'btn btn-mini btn-danger btn-block' %>
                <%= link_to 'Deactivate',
                          deactivate_people_path(person),
                          remote: true,
                          method: :post,
                          :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
                          :class => 'btn btn-mini btn-danger btn-block' %>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>

<div class="row">
  <div class="span12" style="text-align:center">
    <%= will_paginate @people, :renderer => BootstrapPagination::Rails %>
  </div>
</div>

{'fraction_non_alphanumeric': 0.18106949458483754, 'fraction_numerical': 0.0036101083032490976, 'mean_word_length': 1.604289071680376, 'pattern_counts': {'":': 0, '<': 249, '<?xml version=': 0, '>': 291, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2951940', 'n_tokens_mistral': 2777, 'n_tokens_neox': 2651, 'n_words': 543}