.qi_header
  

  
  -if current_admin.has_permission?("customers-c")
    .right= link_to ic(:plus)+' Ajouter un utilisateur', new_admin_p_customer_path(), :class => "btn btn-primary btn-ap-add", :remote => false

  
  %h1
    
    Utilisateurs
 
        


.qi_search_row
  =form_tag "", :method => "get",  :onsubmit => "" do
    -params[:search] =params[:search] || {}
    %table
      %tr
        =hidden_field_tag :offre,  params[:offre]
        
        %td=text_field_tag :code, params[:code],:class => "form-control", :placeholder => "Code client"
        
        %td=text_field_tag :name, params[:name],:class => "form-control", :placeholder => "Nom"
        
        %td=text_field_tag :email, params[:email],:class => "form-control", :placeholder => "Email"
        
        
        %td=text_field_tag :city, params[:city],:class => "form-control", :placeholder => "Ville"
        
        
        %td=text_field_tag :tel, params[:tel],:class => "form-control", :placeholder => "Tel"
       
     
        %td
          .input-group
            =text_field_tag :start, params[:start],:class => "form-control datepicker", :placeholder => "Début"
            %span.input-group-addon.btn{:onclick => "$(this).prev('input').val('');"}
              =ic(:times)
        
         
  
        %td
          .input-group
            =text_field_tag :stop, params[:stop],:class => "form-control datepicker", :placeholder => "Fin"
            %span.input-group-addon.btn{:onclick => "$(this).prev('input').val('');"}
              =ic(:times)
      
        
        -if false
          %td=text_field_tag :document_number, params[:document_number],:class => "form-control", :placeholder => "N° document"
    
    
    
    %table
      %tr
        %td
          Actif :
          =select_tag "search[enabled]", options_for_select([[""], "Oui", "Non"], params[:search][:enabled])
          
        %td
          Utilisateur test ?
          =select_tag "search[test_user]", options_for_select([[""], "Oui", "Non"], params[:search][:test_user])

        %td
          NPAI ?
          =select_tag "search[npai]", options_for_select([[""], "Oui", "Non"], params[:search][:npai])
          
        %td
          Stickers envoyés ?
          =select_tag "search[sticker]", options_for_select([[""], "Oui", "Non"], params[:search][:sticker])

        
        
        
        
    =#text_field_tag :search, params[:search],:class => "form-control", :placeholder => "Rechercher"
    -if false
      %table
        %tr
          %td.search_label
            Encours : 
          %td.search_op
            de
          %td.search_number_input
            =number_field_tag :encours_min, params[:encours_min],:class => "form-control", :placeholder => "Enc. min", :step => 0.01
          %td.search_op
            à
          %td.search_number_input
            =number_field_tag :encours_max, params[:encours_max],:class => "form-control", :placeholder => "Enc. max", :step => 0.01
        
          %td.search_op
        
          %td.search_label
            Chiffre d'affaire : 
          %td.search_op
            de
          %td.search_number_input
            =number_field_tag :ca_min, params[:ca_min],:class => "form-control", :placeholder => "CA min", :step => 0.01
          %td.search_op
            à
          %td.search_number_input
            =number_field_tag :ca_max, params[:ca_max],:class => "form-control", :placeholder => "CA max", :step => 0.01
        
          %td
        
    :scss
      .search_label{
        width:110px;
        text-align:right;
        padding-right:5px;
      }
      .search_op{
        width:25px;
        text-align:center;
        color:rgba(0,0,0,0.5);
      }
      
      .search_number_input{
        width:100px;
      }
      
          
          
          
      
    
    =render :partial => "qi/qi_ordered_table_search_footer", :locals => {:collection_object => @p_customers, :csv => true}
  



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


-if false
  .qi_row
    .qi_pannel.qi_plain.padding
      =render :partial => "search_etat_form"