<%= t('plugin.ecommerce.orders') %>

<% @orders.each do |order| order = order.decorate %> <% end %>
<%= t('plugin.ecommerce.table.id') %> <%= t('plugin.ecommerce.table.customer') %> <%= t('plugin.ecommerce.table.status') %> <%= t('plugin.ecommerce.table.paid') %> <%= t('plugin.ecommerce.table.products') %> <%= t('plugin.ecommerce.table.amount') %> <%= t('plugin.ecommerce.table.received_time') %> <%= t('plugin.ecommerce.table.payment_method') %> <%= t('camaleon_cms.admin.table.actions') %>
<%= order.slug %> <% if order.user %> <%= order.user.fullname %> <% else %> (No user) <% end %> <%= raw order.the_status %> <%= order.paid? ? 'Yes' : 'No' %> <% order.product_items.each do |item| %> <%= item.qty %> x <%= item.cache_the_title %> (<%= item.cache_the_price %>)
<% end %>
<%= order.cache_the_total %> <%= order.received_at %> <%= order.payment_method.name rescue "" %> <%= link_to raw(''), {action: :show, id: order.slug}, class: "btn btn-info btn-xs", title: "#{t('camaleon_cms.admin.button.preview')}" %> <%= link_to raw(''), {action: :edit, id: order.slug}, class: "btn btn-default btn-xs", title: "#{t('camaleon_cms.admin.button.edit')}" %> <%= link_to raw(''), {action: :destroy, id: order.slug}, class: "btn btn-danger btn-xs", title: "#{t('camaleon_cms.admin.button.delete', default: 'Delete Order')}", method: :delete, 'data-confirm'=> t('plugin.ecommerce.table.confirm_delete', default: 'Are you sure to delete this order?') %>
<%= content_tag("div", raw(t('camaleon_cms.admin.message.data_found_list')), class: "alert alert-warning") if @orders.empty? %> <%= will_paginate @orders %>