Fix thumbnail appearing next to deleted comments

This commit is contained in:
Toks
2015-07-23 09:57:13 -04:00
parent 95e10e3acd
commit 52c73efc28
3 changed files with 24 additions and 16 deletions

View File

@@ -5,15 +5,17 @@
<div class="comments-for-post">
<div class="list-of-comments">
<% @comments.each do |comment| %>
<div id="post_<%= comment.post.id %>" class="post <%= PostPresenter.preview_class(comment.post) %>" <%= PostPresenter.data_attributes(comment.post) %>>
<div class="preview">
<% if comment.post.visible? %>
<%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %>
<% end %>
<% if CurrentUser.is_moderator? || !comment.is_deleted? %>
<div id="post_<%= comment.post.id %>" class="post <%= PostPresenter.preview_class(comment.post) %>" <%= PostPresenter.data_attributes(comment.post) %>>
<div class="preview">
<% if comment.post.visible? %>
<%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %>
<% end %>
</div>
<%= render :partial => "comments/partials/show/comment", :collection => [comment] %>
<div class="clearfix"></div>
</div>
<%= render :partial => "comments/partials/show/comment", :collection => [comment] %>
<div class="clearfix"></div>
</div>
<% end %>
<% end %>
</div>
</div>