show thumbnails for comment search
This commit is contained in:
@@ -5,7 +5,13 @@
|
||||
<div class="comments-for-post">
|
||||
<div class="list-of-comments">
|
||||
<% @comments.each do |comment| %>
|
||||
<%= render "comments/partials/show/comment", :post => comment.post, :comment => comment, :show_header => false %>
|
||||
<div class="post post-preview" data-tags="<%= comment.post.tag_string %>" data-uploader="<%= comment.post.uploader_name %>" data-rating="<%= comment.post.rating %>" data-flags="<%= comment.post.status %>" data-score="<%= comment.post.score %>" data-parent-id="<%= comment.post.parent_id %>" data-has-children="<%= comment.post.has_children? %>">
|
||||
<div class="preview">
|
||||
<%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %>
|
||||
</div>
|
||||
<%= render :partial => "comments/partials/show/comment", :collection => [comment] %>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
<%= format_text(comment.body) %>
|
||||
</div>
|
||||
<menu>
|
||||
<% if @comment || @comments %>
|
||||
<li><%= link_to "View post", post_path(comment.post_id) %></li>
|
||||
<% else %>
|
||||
<% if @post || @posts %>
|
||||
<li><%= link_to "Reply", new_comment_path(:post_id => comment.post_id), :class => "reply-link", "data-comment-id" => comment.id %></li>
|
||||
<% if comment.editable_by?(CurrentUser.user) %>
|
||||
<li><%= link_to "Delete", comment_path(comment.id), :confirm => "Do you really want to delete this comment?", :method => :delete, :remote => true %></li>
|
||||
|
||||
Reference in New Issue
Block a user