Fix deleted comments visibility on partial index by comment

This commit is contained in:
BrokenEagle
2017-12-01 16:30:01 -08:00
parent 2000719227
commit f346d6e35d

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? %>