23 lines
699 B
Plaintext
23 lines
699 B
Plaintext
=link_to [:public, customer_message], :class => "customer_message_li", :id => "customer_message_#{customer_message.id}", :remote => true do
|
|
|
|
|
|
.time
|
|
=l customer_message.created_at, :format => "%d/%m/%y"
|
|
.pseudo
|
|
-if !customer_message.readed or customer_message.children.where(:destinataire_id => current_customer.id).where("readed is null").first
|
|
.new
|
|
|
|
|
|
|
|
-if customer_message.expediteur and customer_message.expediteur == current_customer
|
|
moi
|
|
-else
|
|
= customer_message.expediteur.anonyme_nick
|
|
|
|
|
|
|
|
-if answer = customer_message.children.order("created_at DESC").first
|
|
= truncate(answer.message)
|
|
-else
|
|
= truncate(customer_message.message)
|
|
.clear |