blog_perso_app/app/views/public/comments/_comment.html.haml
Nicolas Bally 27d7568a83 comments
2015-04-13 15:51:41 +02:00

30 lines
976 B
Plaintext

.comment#comment{:class => ("author" if comment.email == "info@nicolasbally.com"), :id => comment.id}
%aside=gravatar_image_tag(comment.email? ? comment.email : comment.pseudo, :gravatar => {:default => "http://#{HOSTNAME}/default_avatar.jpg"})
.comment_body
%div.header
.right.coms
=link_to ic(:share), new_public_comment_path(:commentable_id => comment.commentable_id, :commentable_type =>comment.commentable_type, :parent_id => comment.id), :remote => true, :class => "add_comment"
%strong
-if comment.website?
=link_to(comment.pseudo, comment.website, :target => "_blank")+","
-else
=comment.pseudo+","
%time.updated{:datetime => Time.now, :pubdate => true}
="le "+l(comment.created_at, :format => :human_date)
%blockquote=simple_format comment.comment
.child_comments
=render comment.children.where(:enabled => true).order(:created_at)