.qi_header
  .right= link_to ic(:plus)+' Ajouter un produit', new_admin_p_product_path(), :class => "btn btn-primary btn-ap-add", :remote => false
  %h1
    Produits & Stocks
    %span
      Produits


.qi_search_row
  =form_tag "", :method => "get",  :onsubmit => "" do
    
    =hidden_field_tag :column, params[:column]
    =hidden_field_tag :direction, params[:direction]
    
    %table
      %tr
        %td
          Actif :
          =select_tag "search[enabled]", options_for_select([[""], "Oui", "Non"], params[:search][:enabled])
        
        
        %td=text_field_tag "search[code]", params[:search][:code],:class => "form-control", :placeholder => "Code"
        
        %td=text_field_tag "search[name]", params[:search][:name],:class => "form-control", :placeholder => "Nom"
       
    %table
      %tr
        %td
          Catégorie :
          =select_tag "search[p_product_cat_id]", options_for_select([["",""],["Aucune","null"]]+PProductCat.order(:name).all.map{|a| [a.name, a.id]}, params[:search][:p_product_cat_id])
        
        %td
          Marque :
          =select_tag "search[s_brand_id]", options_for_select([["",""]]+SBrand.order(:name).all.map{|a| [a.name, a.id]}, params[:search][:s_brand_id])
    
      
      
    =render :partial => "qi/qi_ordered_table_search_footer", :locals => {:collection_object => @p_products}


=render :partial => "qi/qi_ordered_table", :locals => {:qi_ordered_table_collection => @p_products}



