<%= render :partial => 'admin/shared/froomerce_sub_menu' %>

<%= t('.heading') %>

<%= form_tag :action => :make_widget, :method => :post do %>
<% i = 0 %> <% @products.each do |product| %> <% i += 1 %> <% end %>

<%=sort_link @search,:id, t('.id') %> <%=sort_link @search,:sku, t(:sku) %> <%=sort_link @search,:name, t(:name) %> <%=sort_link @search,:master_price, t(:master_price) %> <%=sort_link @search,:count_on_hand, t('.count_on_hand') %>
<%= check_box_tag "[product_ids][]", product.id %> <%= product.id rescue '' %> <%= product.sku rescue '' %> <%= product.name rescue '' %> <%= number_to_currency product.price rescue '' %> <%= product.count_on_hand rescue '' %>
<% end %>
<%= paginate @products %> <% content_for :sidebar do %> <%= form_for @search, :url => 'export_widgets_to_facebook' do |f| %>

<%= t(:search) %>

<%- locals = {:f => f} %>

<%= f.label :name_contains, t(:name) %>
<%= f.text_field :name_contains, :size => 15 %>

<%= f.label :variants_including_master_sku_contains, t(:sku) %>
<%= f.text_field :variants_including_master_sku_contains, :size => 15 %>

<%= f.label :master_price_gte, t(:master_price) %>
<%= f.text_field :master_price_gte, :size => 8 %> <%= f.label :master_price_lte, "to" %> <%= f.text_field :master_price_lte, :size => 8 %>

<%= f.label :count_on_hand_gte, t('.count_on_hand') %>
<%= f.text_field :count_on_hand_gte, :size => 8 %> <%= f.label :count_on_hand_lte, "to" %> <%= f.text_field :count_on_hand_lte, :size => 8 %>

<% end %>
<% end %>