.qi_header
  .right= link_to ic(:plus)+' Ajouter', new_admin_p_article_path(), :class => "btn btn-primary btn-ap-add", :remote => true
  %h1
    =PArticle.human rescue ""
    

      
.qi_search_row
  =form_tag "", :method => "get",  :onsubmit => "" do
    =hidden_field_tag :column, params[:column]
    =hidden_field_tag :direction, params[:direction]

    %table
      %tr
        %td=text_field_tag "search[p_product_ref_cc_code]", params[:search][:p_product_ref_cc_code],:class => "form-control", :placeholder => "Code"

        %td=text_field_tag "search[p_product_ref_cc_name]", params[:search][:p_product_ref_cc_name],:class => "form-control", :placeholder => "Article"

        %td=text_field_tag "search[p_article_serial_num]", params[:search][:p_article_serial_num],:class => "form-control", :placeholder => "N° de serie"

        %td.pl-2 Grade :
        %td=select_tag "search[p_grade_id]", options_for_select([["",""],["Aucune","null"]]+PGrade.pluck(:grade, :id), params[:search][:p_grade_id]), class: "custom-select"

        %td.pl-2 Couleur :
        %td
          =select_tag "search[p_product_color]", options_for_select([["",""],["Aucune","null"]]+PProductColor.pluck(:color, :id), params[:search][:p_product_color]),class: "custom-select"


    =render :partial => "qi/qi_ordered_table_search_footer", :locals => {:collection_object => @p_articles}


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



