<commit_before><%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :state_changes } %>

<% content_for :page_title do %>
  / <%= plural_resource_name(Spree::StateChange) %>
<% end %>

<% if @state_changes.any? %>
<div class="table-responsive">
  <table class="table" id="listing_order_state_changes" data-hook>
    <thead>
      <tr data-hook="admin_orders_state_changes_headers">
        <th><%= Spree::StateChange.human_attribute_name(:type) %></th>
        <th><%= Spree::StateChange.human_attribute_name(:state_from) %></th>
        <th><%= Spree::StateChange.human_attribute_name(:state_to) %></th>
        <th><%= Spree::StateChange.human_attribute_name(:user) %></th>
        <th><%= Spree::StateChange.human_attribute_name(:timestamp) %></th>
      </tr>
    </thead>

    <tbody>
      <% @state_changes.each do |state_change| %>
        <tr>
          <td><%= Spree.t("state_machine_states.#{state_change.name}") %></td>
          <td><%= state_change.previous_state ? Spree.t(state_change.previous_state, scope: "#{ state_change.name }_state") : Spree.t(:previous_state_missing) %></td>
          <td><%= Spree.t(state_change.next_state, scope: "#{ state_change.name }_state") %></td>
          <td>
            <% if state_change.user %>
              <% user_login = state_change.user.try(:login) || state_change.user.try(:email) %>
              <%= link_to user_login, spree.admin_user_path(state_change.user) %>
            <% end %>
          </td>
          <td>
            <%= pretty_time(state_change.created_at) %>
            <% if state_change.created_at != state_change.updated_at %>
              <small><%= Spree::StateChange.human_attribute_name(:updated) %>: <%= pretty_time(state_change.updated_at) %></small>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
<% else %><commit_msg>Update index.html.erb<commit_after><%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :state_changes } %>

<% content_for :page_title do %>
  / <%= plural_resource_name(Spree::StateChange) %>
<% end %>

<% if @state_changes.any? %>
<div class="table-responsive">
  <table class="table" id="listing_order_state_changes" data-hook>
    <thead>
      <tr data-hook="admin_orders_state_changes_headers">
        <th><%= Spree::StateChange.human_attribute_name(:type) %></th>
        <th><%= Spree::StateChange.human_attribute_name(:state_from) %></th>
        <th><%= Spree::StateChange.human_attribute_name(:state_to) %></th>
        <th><%= Spree::StateChange.human_attribute_name(:user) %></th>
        <th><%= Spree::StateChange.human_attribute_name(:timestamp) %></th>
      </tr>
    </thead>

    <tbody>
      <% @state_changes.each do |state_change| %>
        <% scope = state_change.name == 'order'  ? "#{ state_change.name }_state" : "#{ state_change.name }_states" -%>
        <tr>
          <td><%= Spree.t("state_machine_states.#{state_change.name}") %></td>
          <td><%= state_change.previous_state ? Spree.t(state_change.previous_state, scope: scope) : Spree.t(:previous_state_missing) %></td>
          <td><%= Spree.t(state_change.next_state, scope: scope) %></td>
          <td>
            <% if state_change.user %>
              <% user_login = state_change.user.try(:login) || state_change.user.try(:email) %>
              <%= link_to user_login, spree.admin_user_path(state_change.user) %>
            <% end %>
          </td>
          <td>
            <%= pretty_time(state_change.created_at) %>
            <% if state_change.created_at != state_change.updated_at %>
              <small><%= Spree::StateChange.human_attribute_name(:updated) %>: <%= pretty_time(state_change.updated_at) %></small>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
<% else %>
{'fraction_non_alphanumeric': 0.18567708333333333, 'fraction_numerical': 0.0, 'mean_word_length': 3.05168776371308, 'pattern_counts': {'":': 0, '<': 122, '<?xml version=': 0, '>': 122, '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': '6538398', 'n_tokens_mistral': 1353, 'n_tokens_neox': 1258, 'n_words': 186}