<%= title t(:order, scope: "activerecord.models.mechanize_store").pluralize %>
<%= search_form_for @search, :html => { :method => :get } do |f| %>
<%= f.select :order_status_id_eq, options_for_select(@order_statuses.collect{|c| [c.name, c.id]}, params[:q][:order_status_id_eq].to_i), { :include_blank => t(:order_status, scope: "activerecord.models.mechanize_store") }, { class: "form-control" } %>
<%= f.select :payment_payment_status_id_eq, options_for_select(@payment_statuses.collect{|c| [c.name, c.id]}, params[:q][:payment_payment_status_id_eq].to_i), { :include_blank => t(:payment_status, scope: "activerecord.models.mechanize_store") }, { class: "form-control" } %>
<%= f.text_field :created_at_gteq, alt: 'date', placeholder: t(:date_begin), value: params[:q][:created_at_gteq], as: :string, class: "datepicker form-control" %>
<%= f.text_field :created_at_lteq, alt: 'date', placeholder: t(:date_end), value: params[:q][:created_at_lteq], as: :string, class: "datepicker form-control" %>
<%= f.submit t(:search), class: "btn btn-primary" %> <% end -%>
<% @orders.each do |order| %> <% end %>
<%= sort_link(@search, :id, t(:id, scope: "activerecord.attributes") ) %> <%= sort_link(@search, :order_status_id, t(:order_status_id, scope: "activerecord.attributes.mechanize_store.order") ) %> <%= sort_link(@search, :order_payment_payment_status_name, t(:payment_status_id, scope: "activerecord.attributes.mechanize_store.payment") ) %> <%= sort_link(@search, :generated_at, t(:generated_at, scope: "activerecord.attributes.mechanize_store.order") ) %> <%= sort_link(@search, :delivery_date, t(:delivery_date, scope: "activerecord.attributes.mechanize_store.order") ) %> <%= sort_link(@search, :created_at, t(:created_at, scope: "activerecord.attributes.mechanize_store.order") ) %> <%= t(:options, scope: "activerecord.attributes.order") %>
<%= order.id %> <%= order.order_status.name %> <%= order.payment.payment_status.name %> <%= l(order.generated_at) unless order.generated_at.nil? %> <%= l(order.delivery_date) unless order.generated_at.nil? %> <%= l(order.created_at) unless order.created_at.nil? %> <%= link_to admin_order_path(order) do %> <% end %>
<% content_for :footer do %> <%= will_paginate @orders, class: "pagination pull-right" %>
<% end %>