diff --git a/app/views/comments/index_by_comment.html.erb b/app/views/comments/index_by_comment.html.erb index 10c7ced7e..7e779ecb1 100644 --- a/app/views/comments/index_by_comment.html.erb +++ b/app/views/comments/index_by_comment.html.erb @@ -5,7 +5,13 @@
<% @comments.each do |comment| %> - <%= render "comments/partials/show/comment", :post => comment.post, :comment => comment, :show_header => false %> +
+
+ <%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %> +
+ <%= render :partial => "comments/partials/show/comment", :collection => [comment] %> +
+
<% end %>
diff --git a/app/views/comments/partials/show/_comment.html.erb b/app/views/comments/partials/show/_comment.html.erb index 4b12b6ab9..2cf3ba51b 100644 --- a/app/views/comments/partials/show/_comment.html.erb +++ b/app/views/comments/partials/show/_comment.html.erb @@ -10,9 +10,7 @@ <%= format_text(comment.body) %> - <% if @comment || @comments %> -
  • <%= link_to "View post", post_path(comment.post_id) %>
  • - <% else %> + <% if @post || @posts %>
  • <%= link_to "Reply", new_comment_path(:post_id => comment.post_id), :class => "reply-link", "data-comment-id" => comment.id %>
  • <% if comment.editable_by?(CurrentUser.user) %>
  • <%= link_to "Delete", comment_path(comment.id), :confirm => "Do you really want to delete this comment?", :method => :delete, :remote => true %>