intra_app/app/views/admin/comments/_comment.html.haml
Nicolas Bally 761e075bb6 initial
2018-11-08 21:47:30 +01:00

14 lines
874 B
Plaintext

%tr#comment_row.comment_row{:id => comment.id, :class => ("warning" if !comment.enabled)}
%td
-if comment.commentable and comment.commentable_type = "Article"
=#link_to comment.commentable.title, public_article_path(:id => comment.commentable.slug, :anchor => "comments")
=link_to "Voir l'article", article_path(:slug => comment.commentable.lang_articles[0].slug, :lang => "fr"), :target => "_blank"
%td=comment.pseudo
%td=comment.email
%td=simple_format comment.comment
%td.actions
= link_to i(:"trash-o"), [:admin, comment], :data => {:confirm => 'Voulez-vous vraiment supprimer ce commentaire ?'}, :method => :delete, :remote => true
= link_to i(:pencil), edit_admin_comment_path(comment), :remote => true
= link_to i(:check), admin_comment_path(:id => comment.id, :comment => {:enabled => true}), :remote => true, :method => :put