.container
  %h1
    Bonjour
    =current_admin.login
  
  %p
    Date et heure sur le serveur au chargement de cette page :
    =l Time.now


-if params[:refresh_date]
  -PCustomer.where("imp_email is not NULL").all.each do |pc|
    -pc.created_at = pc.imp_creation
    =pc.save
    %br
  
.qi_kpi
  .kpi
    .number
      =PCustomer.where(:test_user => false, :enabled => true).where("created_at >= ?", Date.today.beginning_of_day).count
    
    .label
      Inscriptions
    .desc
      aujourd'hui
    
  
  .kpi
    .number
      =PCustomer.where(:test_user => false, :enabled => true).where("created_at >= ? and created_at < ?",(Date.today.beginning_of_day-1.day),  Date.today.beginning_of_day).count
      
    .label
      Inscriptions 
    .desc
      hier
    
  
  
  .kpi
    .number
      =PCustomer.where(:test_user => false, :enabled => true).where("created_at >= ?", (Date.today - 7.day).beginning_of_day).count
    
    .label
      Inscriptions 
    .desc
      depuis une semaine
  
  .kpi
    .number
      =PCustomer.where(:test_user => false, :enabled => true).where("created_at >= ?", (Date.today).beginning_of_year.beginning_of_day).count
    
    .label
      Inscriptions 
    .desc
      cette année
    
  
  .kpi
    .number
      =PCustomer.where(:test_user => false, :enabled => true).count
    
    .label
      Utilisateurs
    .desc
  
  .clear

=#.qi_row
=#  .qi_pannel.qi_plain.padding



:scss
  .qi_kpi{
      vertical-align:top;
      padding:0 20px;
    .kpi{
      float:left;
      margin:5px;
      color:white;
      background:#6C5B7B;
      padding:10px 20px;
     
      .label{
        display:block;
        font-weight:bold;
        text-align:left;
        color:white;
        font-size:20px;
        padding:0;
        text-align:left;
      }
      
      .desc{
        font-size:15px;
        text-align:left;
        min-height:30px;
      }
      
      .number{
        font-weight:20px;
        
        font-weight:bold;
        font-size:30px;
      }
      
    }
    
  }
  