<commit_before><div class='toolbar order-links'>
  <%= button_link_to t("new_order"), new_admin_order_url, :icon => 'add' %>
</div>

<% render :partial => 'admin/shared/order_sub_menu' %>

<h1><%= t("listing_orders") %></h1>

<table class="index">
  <thead>
    <tr>
      <% hook :admin_orders_index_headers do %>
        <th><%= order @search, :by => :created_at,       :as => t("order_date") %></th>
        <th><%= order @search, :by => :number,           :as => t("order_number") %></th>
        <th><%= order @search, :by => :state,            :as => t("status") %></th>
        <th><%= order @search, :by => :checkout_email,   :as => t("customer") %></th>
        <th><%= order @search, :by => :total,            :as => t("total") %></th>
      <% end %>
      <th>
        <% hook :admin_orders_index_header_actions %>
      </th>
    </tr>
  </thead>
  <tbody>
  <% @orders.each do |order| %>
    <tr>
      <%- locals = {:order => order} -%>
      <% hook :admin_orders_index_rows, locals do %>
        <td><%= order.created_at.to_date%></td>
        <td><%= link_to order.number, object_url(order) %></td>
        <td><%= t(order.state.downcase) %></td>
        <td><%= order.email %></td>
        <td><%= number_to_currency order.total %></td>
      <% end %>
      <td>
        <% hook :admin_orders_index_row_actions, locals do %>
          <%= link_to_edit order %>
        <% end %>
      </td>
    </tr>
  <% end %>
  </tbody>
</table>
<%= will_paginate(:previous_label => "&#171; #{t('previous')}", :next_label => "#{t('next')} &#187;") %>


<% content_for :sidebar do %>
<div class="box">
  <h3><%= t(:search) %></h3>

  <% form_for @search do |f| %>
    <%- locals = {:f => f} -%>
    <% hook :admin_orders_index_search, locals do %>
      <label><%= t("date_range") %></label><br />
      <div class="yui-g date-range-filter">
        <div class="yui-u sub-field first">
          <%= f.unobtrusive_date_text_picker :created_at_after %><br />
          <label class="sub"><%= t("start") %></label>
        </div>
        <div class="yui-u sub-field">
          <%= f.unobtrusive_date_text_picker :created_at_before %><br /><commit_msg>Explicity define the @orders collection on which to paginate in the admin/orders/index view<commit_after><div class='toolbar order-links'>
  <%= button_link_to t("new_order"), new_admin_order_url, :icon => 'add' %>
</div>

<% render :partial => 'admin/shared/order_sub_menu' %>

<h1><%= t("listing_orders") %></h1>

<table class="index">
  <thead>
    <tr>
      <% hook :admin_orders_index_headers do %>
        <th><%= order @search, :by => :created_at,       :as => t("order_date") %></th>
        <th><%= order @search, :by => :number,           :as => t("order_number") %></th>
        <th><%= order @search, :by => :state,            :as => t("status") %></th>
        <th><%= order @search, :by => :checkout_email,   :as => t("customer") %></th>
        <th><%= order @search, :by => :total,            :as => t("total") %></th>
      <% end %>
      <th>
        <% hook :admin_orders_index_header_actions %>
      </th>
    </tr>
  </thead>
  <tbody>
  <% @orders.each do |order| %>
    <tr>
      <%- locals = {:order => order} -%>
      <% hook :admin_orders_index_rows, locals do %>
        <td><%= order.created_at.to_date%></td>
        <td><%= link_to order.number, object_url(order) %></td>
        <td><%= t(order.state.downcase) %></td>
        <td><%= order.email %></td>
        <td><%= number_to_currency order.total %></td>
      <% end %>
      <td>
        <% hook :admin_orders_index_row_actions, locals do %>
          <%= link_to_edit order %>
        <% end %>
      </td>
    </tr>
  <% end %>
  </tbody>
</table>
<%= will_paginate(@orders, :previous_label => "&#171; #{t('previous')}", :next_label => "#{t('next')} &#187;") %>


<% content_for :sidebar do %>
<div class="box">
  <h3><%= t(:search) %></h3>

  <% form_for @search do |f| %>
    <%- locals = {:f => f} -%>
    <% hook :admin_orders_index_search, locals do %>
      <label><%= t("date_range") %></label><br />
      <div class="yui-g date-range-filter">
        <div class="yui-u sub-field first">
          <%= f.unobtrusive_date_text_picker :created_at_after %><br />
          <label class="sub"><%= t("start") %></label>
        </div>
        <div class="yui-u sub-field">
          <%= f.unobtrusive_date_text_picker :created_at_before %><br />
{'fraction_non_alphanumeric': 0.2289156626506024, 'fraction_numerical': 0.004546487838145033, 'mean_word_length': 2.672787979966611, 'pattern_counts': {'":': 0, '<': 175, '<?xml version=': 0, '>': 207, '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': '3523914', 'n_tokens_mistral': 1689, 'n_tokens_neox': 1567, 'n_words': 335}