deleted posts are now hidden
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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">–</a> }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user