add shortcut to deleted posts

This commit is contained in:
albert
2013-02-18 14:51:17 -05:00
parent 5167cf6948
commit bfe0af7649
3 changed files with 13 additions and 0 deletions

View File

@@ -29,6 +29,10 @@ module PostSets
end
end
def has_deleted?
tag_string !~ /status/ && ::Post.tag_match("#{tag_string} status:deleted").exists?
end
def has_explicit?
posts.any? {|x| x.rating == "e"}
end

View File

@@ -13,6 +13,7 @@
</section>
<%= render "posts/partials/index/blacklist" %>
<%= render "posts/partials/index/related" %>
</aside>
<section id="content">

View 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>