% content_for :page_title do %> <%= plural_resource_name(Spree::Order) %> <% end %> <% content_for :page_actions do %> <%= button_link_to Spree.t(:new_order), new_admin_order_url, :class => "btn-success", :icon => 'add', :id => 'admin_new_order' %> <% end if can? :create, Spree::Order %> <% content_for :table_filter do %>
<%= sort_link @search, :completed_at, I18n.t(:completed_at, :scope => 'activerecord.attributes.spree/order') %> | <% else %><%= sort_link @search, :created_at, I18n.t(:created_at, :scope => 'activerecord.attributes.spree/order') %> | <% end %><%= sort_link @search, :number, I18n.t(:number, :scope => 'activerecord.attributes.spree/order') %> | <%= sort_link @search, :considered_risky, I18n.t(:considered_risky, :scope => 'activerecord.attributes.spree/order') %> | <%= sort_link @search, :state, I18n.t(:state, :scope => 'activerecord.attributes.spree/order') %> | <%= sort_link @search, :payment_state, I18n.t(:payment_state, :scope => 'activerecord.attributes.spree/order') %> | <% if Spree::Order.checkout_step_names.include?(:delivery) %><%= sort_link @search, :shipment_state, I18n.t(:shipment_state, :scope => 'activerecord.attributes.spree/order') %> | <% end %><%= sort_link @search, :email, I18n.t(:email, :scope => 'activerecord.attributes.spree/order') %> | <%= sort_link @search, :total, I18n.t(:total, :scope => 'activerecord.attributes.spree/order') %> | |
---|---|---|---|---|---|---|---|---|---|
<%= l (@show_only_completed ? order.completed_at : order.created_at).try(&:to_date) %> | <%= link_to order.number, edit_admin_order_path(order) %> | <%= order.considered_risky ? Spree.t("risky") : Spree.t("safe") %> | <%= Spree.t("order_state.#{order.state.downcase}") %> | <% if order.payment_state %> <%= link_to Spree.t("payment_states.#{order.payment_state}"), admin_order_payments_path(order) %> <% end %> | <% if Spree::Order.checkout_step_names.include?(:delivery) %><% if order.shipment_state %> <%= Spree.t("shipment_states.#{order.shipment_state}") %> <% end %> | <% end %><% if order.user %> <%= link_to order.email, edit_admin_user_path(order.user) %> <% else %> <%= mail_to order.email %> <% end %> <% if order.user || order.email %> <% end %> | <%= order.display_total.to_html %> | <%= link_to_edit_url edit_admin_order_path(order), :title => "admin_edit_#{dom_id(order)}", :no_text => true %> |