add shortcut to deleted posts
This commit is contained in:
@@ -29,6 +29,10 @@ module PostSets
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_deleted?
|
||||||
|
tag_string !~ /status/ && ::Post.tag_match("#{tag_string} status:deleted").exists?
|
||||||
|
end
|
||||||
|
|
||||||
def has_explicit?
|
def has_explicit?
|
||||||
posts.any? {|x| x.rating == "e"}
|
posts.any? {|x| x.rating == "e"}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<%= render "posts/partials/index/blacklist" %>
|
<%= render "posts/partials/index/blacklist" %>
|
||||||
|
<%= render "posts/partials/index/related" %>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<section id="content">
|
<section id="content">
|
||||||
|
|||||||
8
app/views/posts/partials/index/_related.html.erb
Normal file
8
app/views/posts/partials/index/_related.html.erb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<section id="related-box">
|
||||||
|
<h1>Related Searches</h1>
|
||||||
|
<ul id="related-list">
|
||||||
|
<% if @post_set.has_deleted? %>
|
||||||
|
<li><%= link_to "Deleted", posts_path(:tags => "#{params[:tags]} status:deleted") %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
Reference in New Issue
Block a user