Merge pull request #3416 from BrokenEagle/fix-deleted-comments-visibility

Fix deleted comments visibility on partial index by comment
This commit is contained in:
Albert Yi
2017-12-13 14:34:12 -08:00
committed by GitHub

View File

@@ -1,7 +1,7 @@
<div id="p-index-by-comment" class="comments-for-post">
<div class="list-of-comments">
<% @comments.each do |comment| %>
<% if CurrentUser.is_moderator? || !comment.is_deleted? %>
<% if CurrentUser.is_moderator? || (params[:search] && params[:search][:is_deleted] =~ /t/) || !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? %>