<% admin_breadcrumb(link_to plural_resource_name(Spree::LegacyUser), spree.admin_users_path) %> <% admin_breadcrumb(link_to @user.email, edit_admin_user_url(@user)) %> <% admin_breadcrumb(Spree.t('admin.user.items_purchased')) %> <%= render 'spree/admin/users/sidebar' %> <%= render 'spree/admin/users/tabs', current: :items %> <%= render partial: 'spree/admin/users/user_page_actions' %>
<%= Spree.t(:"admin.user.items_purchased") %> <%= paginate @orders, theme: "solidus_admin" %> <% if @orders.any? %> <%# TODO add search interface %> <% @orders.each do |order| %> <% order.line_items.each do |item| %> <% end %> <% end %>
<%= sort_link @search, :completed_at, Spree::Order.human_attribute_name(:completed_at), {}, {title: 'orders_completed_at_title'} %> <%= Spree::LineItem.human_attribute_name(:description) %> <%= Spree::LineItem.human_attribute_name(:price) %> <%= Spree::LineItem.human_attribute_name(:quantity) %> <%= Spree::Order.human_attribute_name(:total) %> <%= sort_link @search, :state, Spree::Order.human_attribute_name(:state), {}, {title: 'orders_state_title'} %> <%= sort_link @search, :number, Spree.t(:order_num, scope: 'admin.user'), {}, {title: 'orders_number_title'} %>
<%= l(order.completed_at.to_date) if order.completed_at %> <%= render 'spree/admin/shared/image', image: item.variant.display_image, size: :mini %> <%= item.product.name %>
<%= "(" + variant_options(item.variant) + ")" unless item.variant.option_values.empty? %> <% if item.variant.sku.present? %> <%= Spree.t(:sku) %>: <%= item.variant.sku %> <% end %>
<%= item.single_money.to_html %> <%= item.quantity %> <%= item.money.to_html %> <%= Spree.t(order.state, scope: :order_state) %> <% if can?([:admin, :edit], order) %> <%= link_to order.number, edit_admin_order_url(order) %> <% else %> <%= order.number %> <% end %>
<% else %>
<%= render 'spree/admin/shared/no_objects_found', resource: Spree::Order, new_resource_url: spree.new_admin_order_path %>
<% end %> <%= paginate @orders, theme: "solidus_admin" %>