=@p_friend.p_friend_customer.email


-friend_p_customer = @p_friend.reverse.p_customer


.right{:style => "width:180px;padding-right:20px;text-align:right"}
  -friend_p_customer.kaps_days.order("date DESC").where("date <= ?", Date.today).all.each do |kaps_day|
  
    %p= link_to l(kaps_day.date, :format => "%A %e %B %Y"), public_p_friend_path(:id => @p_friend.id, :kaps_day_id => kaps_day.id)
  




-if params[:kaps_day_id]
  -@kaps_day = friend_p_customer.kaps_days.find(params[:kaps_day_id])

-else
  -@kaps_day = friend_p_customer.kaps_days.where(:date => Date.today).first
  
-if @kaps_day
  %div{:style => "padding-right:20px;text-align:right;margin-right:210px;"}
    .qi_row
      =l(@kaps_day.date, :format => "%A %e %B %Y")
      .qi_pannel.qi_plain.padding{:style => "position:relative;"}
        #pourcentage_inner{:style => "position:absolute;top:0;left:0;right:0;"}
          =render(:partial => "public/kaps_days/pourcentage", :locals => {:kaps_day => @kaps_day})


        %table.table
          %tr
            %th 
        

            %th Points
  
     
       
            %th
  

          %tbody#kaps_rows
            =render @p_friend.reverse.allow_kapsmes(@kaps_day).order("id DESC")
          

.clear
