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

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

<table class="index">
  <thead>
    <tr>
      <th><%= order @search, :by => :created_at,       :as => t("order_date") %></th>
      <th><%= order @search, :by => :id,               :as => t("subscription_number") %></th>
      <th><%= order @search, :by => :state,            :as => t("status") %></th>
      <th><%= order @search, :by => :user_email,       :as => t("customer") %></th>
      <th><%= order @search, :by => :start_date,       :as => t("start_date") %></th>
      <th><%= order @search, :by => :end_date,         :as => t("end_date") %></th>
      <th><%= order @search, :by => :total,            :as => t("total") %></th>
    </tr>
  </thead>
  <tbody>
  <% @subscriptions.each do |subscription| %>
    <tr>
      <td><%= subscription.created_at.to_date %></td>
      <td><%= link_to subscription.id, edit_object_url(subscription) %></td>
      <td><%= t(subscription.state.downcase) %></td>
      <td><%= subscription.user.email %></td>
      <td><%= subscription.start_date.nil? ? "-" : subscription.start_date.to_date  %></td>
      <td><%= subscription.end_date.nil? ? "-" : subscription.end_date.to_date  %></td>
      <td><%= number_to_currency subscription.variant.price %></td>
    </tr>
  <% end %>
  </tbody>
</table>
<%= will_paginate(:prev => "&#171; #{t('previous')}", :next => "#{t('next')} &#187;") %>
        
<% content_for :sidebar do %>      
<div class="box">
  <h3><%= t(:search) %></h3>

  <% form_for @search do |f| %>
    <label><%= t("order_date") %></label><br />
    <div class="yui-g date-range-filter">
      <div class="yui-u sub-field first">
        <%= f.unobtrusive_date_picker :created_at_after %><br /><commit_msg>Removing old searching and sorting code. That stuff needs to be migrated someday.<commit_after>
<% render :partial => 'admin/shared/order_sub_menu' %>

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

<table class="index">
  <thead>
    <tr>
      <th><%= t("order_date") %></th>
      <th><%= t("subscription_number") %></th>
      <th><%= t("status") %></th>
      <th><%= t("customer") %></th>
      <th><%= t("start_date") %></th>
      <th><%= t("end_date") %></th>
      <th><%= t("total") %></th>
    </tr>
  </thead>
  <tbody>
  <% @subscriptions.each do |subscription| %>
    <tr>
      <td><%= subscription.created_at.to_date %></td>
      <td><%= link_to subscription.id, edit_object_url(subscription) %></td>
      <td><%= t(subscription.state.downcase) %></td>
      <td><%= subscription.user.email %></td>
      <td><%= subscription.start_date.nil? ? "-" : subscription.start_date.to_date  %></td>
      <td><%= subscription.end_date.nil? ? "-" : subscription.end_date.to_date  %></td>
      <td><%= number_to_currency subscription.variant.price %></td>
    </tr>
  <% end %>
  </tbody>
</table>
<%= will_paginate(:prev => "&#171; #{t('previous')}", :next => "#{t('next')} &#187;") %>
        
<% content_for :sidebar do %>      
<div class="box">
  <h3><%= t(:search) %></h3>

  <% form_for @search do |f| %>
    <label><%= t("order_date") %></label><br />
    <div class="yui-g date-range-filter">
      <div class="yui-u sub-field first">
        <%= f.unobtrusive_date_picker :created_at_after %><br />
{'fraction_non_alphanumeric': 0.25227410551849605, 'fraction_numerical': 0.006064281382656155, 'mean_word_length': 3.16540404040404, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 169, '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': '2225058', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1207, 'n_words': 247}