41 lines
1.2 KiB
Plaintext
Executable File
41 lines
1.2 KiB
Plaintext
Executable File
.center
|
|
%h1 Détail d'un affilié
|
|
%div{:style => "float:left;"}=render :partial => "public/customers/filleul", :object => @customer, :locals => {:inline_b => true}
|
|
%p
|
|
%br
|
|
%br
|
|
Date d'inscription :
|
|
=l @customer.created_at
|
|
%p
|
|
=link_to @customer.annonces.valid_to_show.count.to_s + " annonce(s)", public_customer_path(@customer)
|
|
%p
|
|
Nombre de coffrets achetés :
|
|
=@customer.orders.where(:paid => true).count
|
|
%p
|
|
Nombre d'affiliés :
|
|
=@customer.children.count
|
|
.clear
|
|
%hr
|
|
%h4 Lien entre cet affilié et vous :
|
|
|
|
-ancests = []
|
|
-parent = @customer.parent
|
|
-while parent != current_customer
|
|
-ancests << parent
|
|
-parent = parent.parent
|
|
=render :partial => "public/customers/filleul", :object => current_customer, :locals => {:inline_b => true}
|
|
|
|
-ancests.reverse.each do |ancest|
|
|
|
|
|
|
%span{:style => "position:relative;top:-50px;"}
|
|
>
|
|
=render :partial => "public/customers/filleul", :object => ancest, :locals => {:inline_b => true}
|
|
%span{:style => "position:relative;top:-50px;"}
|
|
>
|
|
=render :partial => "public/customers/filleul", :object => @customer, :locals => {:inline_b => true}
|
|
|
|
%hr
|
|
|
|
|
|
|