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

<%= form_tag(url_for(action: :index), class: 'pull-right', method: 'get') do %> <% end %> <% @orders.each do |order| order = order.decorate %> <% end %>
<%= cama_t('plugins.ecommerce.table.id') %> <%= cama_t('plugins.ecommerce.table.customer') %> <%= cama_t('plugins.ecommerce.table.status') %> <%= cama_t('plugins.ecommerce.table.paid') %> <%= cama_t('plugins.ecommerce.table.products') %> <%= cama_t('plugins.ecommerce.table.amount') %> <%= cama_t('plugins.ecommerce.table.created_at') %> <%= cama_t('plugins.ecommerce.table.payment_method') %> <%= cama_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.created_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('plugins.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 %>