Files
fetsite/app/views/comments/_comment.html.erb

18 lines
638 B
Plaintext

<div id="<%= comment.divid %>">
<a class="pull-left media-object" href="#"><%= image_tag comment.thumb_url %></a>
<div class="media-body">
<b><%= comment.user.try(:email) %></b> (<%= I18n.l(comment.created_at) %>):
<p><%= comment.text %>
<% if can?(:comment, comment.commentable) %>
<br><%= link_to "comment" , new_comment_path( commentable_type: "Comment", commentable_id: comment.id), remote:true %>
<% end %>
</p>
<%= render partial:"comments/comments", object: comment.children.order(:created_at).reverse_order if comment.children.size >0 %>
</div>
<div id="<%= Comment.formid_for(comment) %>">
</div>
</div>