<commit_before><% content_for :page_title do %>
  <%= "Affiliate Tag Report" %>
<% end %>

<% content_for :page_actions do %>
  <li><%= link_to_with_icon 'icon-arrow-left', Spree.t(:back_to_reports_list), spree.admin_reports_url, :class => 'button' %></li>
<% end %>

<% content_for :table_filter_title do %>
  <%= Spree.t(:date_range) %>
<% end %>

<% content_for :table_filter do %>
  <%= search_form_for @search, :url => spree.affiliate_tag_report_admin_reports_path  do |s| %>
    <div class="date-range-filter field align-center">
        <%= label_tag nil, Spree.t(:start), :class => 'inline' %>
        <%= s.text_field :created_at_gt, :class => 'datepicker datepicker-from' %>

        <span class="range-divider">
          <i class="icon-arrow-right"></i>
        </span>

        <%= s.text_field :created_at_lt, :class => 'datepicker datepicker-to' %>
        <%= label_tag nil, Spree.t(:end), :class => 'inline' %>
    </div>

    <div class="actions filter-actions">
      <%= button Spree.t(:search), 'icon-search'  %>
    </div>
  <% end %>
<% end %>

<table class="admin-report" data-hook="affiliate_total">
  <thead>
    <tr>
      <th>Code</th>
      <th>Number</th>
      <th>Payable Order Value</th>
      <th>Commission</th>
    </tr>
  </thead>
  <% if !@report.blank? %>
    <% @report.each do |key, value| %>
    <tbody>
      <td><%= key %></td>
      <td><%= value[:number] %></td>
      <td><%= value[:payable_order_value] %></td>
      <td><%= value[:commission] %></td>
    </tbody>
    <% end %>
  <% else %>
    No Codes Available
  <% end %>
</table>
<commit_msg>Link from Total reports to individual code report<commit_after><% content_for :page_title do %>
  <%= "Affiliate Tag Report" %>
<% end %>

<% content_for :page_actions do %>
  <li><%= link_to_with_icon 'icon-arrow-left', Spree.t(:back_to_reports_list), spree.admin_reports_url, :class => 'button' %></li>
<% end %>

<% content_for :table_filter_title do %>
  <%= Spree.t(:date_range) %>
<% end %>

<% content_for :table_filter do %>
  <%= search_form_for @search, :url => spree.affiliate_tag_report_admin_reports_path  do |s| %>
    <div class="date-range-filter field align-center">
        <%= label_tag nil, Spree.t(:start), :class => 'inline' %>
        <%= s.text_field :created_at_gt, :class => 'datepicker datepicker-from' %>

        <span class="range-divider">
          <i class="icon-arrow-right"></i>
        </span>

        <%= s.text_field :created_at_lt, :class => 'datepicker datepicker-to' %>
        <%= label_tag nil, Spree.t(:end), :class => 'inline' %>
    </div>

    <div class="actions filter-actions">
      <%= button Spree.t(:search), 'icon-search'  %>
    </div>
  <% end %>
<% end %>

<table class="admin-report" data-hook="affiliate_total">
  <thead>
    <tr>
      <th>Code</th>
      <th>Number</th>
      <th>Payable Order Value</th>
      <th>Commission</th>
    </tr>
  </thead>
  <% if !@report.blank? %>
    <% @report.each do |key, value| %>
    <tbody>
      <td><%= link_to key, tag_report_admin_affiliate_code_path(value[:affiliate_code], params) %></td>
      <td><%= value[:number] %></td>
      <td><%= value[:payable_order_value] %></td>
      <td><%= value[:commission] %></td>
    </tbody>
    <% end %>
  <% else %>
    No Codes Available
  <% end %>
</table>

{'fraction_non_alphanumeric': 0.20598911070780399, 'fraction_numerical': 0.0, 'mean_word_length': 3.191381495564005, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 137, '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': '5626687', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1191, 'n_words': 236}