deleted posts are now hidden

This commit is contained in:
albert
2011-10-22 13:25:22 -04:00
parent b28817c5e5
commit f07bf9b2cc
10 changed files with 41 additions and 13 deletions

View File

@@ -1,5 +1,9 @@
class PostPresenter < Presenter
def self.preview(post)
if post.is_deleted? && !CurrentUser.is_privileged?
return ""
end
flags = []
flags << "pending" if post.is_pending?
flags << "flagged" if post.is_flagged?

View File

@@ -37,7 +37,11 @@ private
current_query = template.params[:tags] || ""
if CurrentUser.user.is_privileged?
html << %{<a href="/wiki_pages?title=#{u(tag)}">?</a> }
if categories[tag] == 1
html << %{<a href="/artists/show_or_new?name=#{u(tag)}">?</a> }
else
html << %{<a href="/wiki_pages?title=#{u(tag)}">?</a> }
end
html << %{<a href="/posts?tags=#{u(current_query)}+#{u(tag)}" class="search-inc-tag">+</a> }
html << %{<a href="/posts?tags=#{u(current_query)}+-#{u(tag)}" class="search-exl-tag">&ndash;</a> }
end