Sha256: 806b6b2e82e54582187500e120f9f8af51bb1a35ae37aee989c0f303cff6d34c

Contents?: true

Size: 1.94 KB

Versions: 29

Compression:

Stored size: 1.94 KB

Contents

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

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

<% if @state_changes.any? %>
  <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>
<% else %>
  <div class="alert alert-info no-objects-found">
    <%= Spree.t(:no_state_changes) %>
  </div>
<% end %>

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
spree_backend-3.4.6 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.7.0.rc1 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.6.6 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.6.5 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.6.4 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.6.3 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.6.2 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.6.1 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.6.0 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.5.0 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.3.6 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.6.0.rc1 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.5.0.rc2 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.5.0.rc1 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.4.5 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.3.5 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.4.4 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.4.3 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.3.4 app/views/spree/admin/state_changes/index.html.erb
spree_backend-3.4.2 app/views/spree/admin/state_changes/index.html.erb