negos_app/app/views/public/customer_messages/_customer_message.html.haml
2017-06-06 16:15:40 +02:00

26 lines
830 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
DF
-customer_message.expediteur.reseauxes.where("parent_id is not null").each do |reseaux|
.sub_reseaux=reseaux.name
-if answer = customer_message.children.order("created_at DESC").first
= truncate(answer.message)
-else
= truncate(customer_message.message)
.clear