This commit is contained in:
albert
2010-10-08 18:42:26 -04:00
parent 6bc469b05d
commit f051e04550
88 changed files with 2865 additions and 699 deletions

View File

@@ -3,9 +3,9 @@ class PostPresenter < Presenter
@post = post
end
def image_html(template, current_user)
return template.content_tag("p", "This image was deleted.") if @post.is_deleted? && !current_user.is_janitor?
return template.content_tag("p", "You need a privileged account to see this image.") if !Danbooru.config.can_see_post?(@post, current_user)
def image_html(template)
return template.content_tag("p", "This image was deleted.") if @post.is_removed? && !CurrentUser.user.is_janitor?
return template.content_tag("p", "You need a privileged account to see this image.") if !Danbooru.config.can_see_post?(@post, CurrentUser.user)
if @post.is_flash?
template.render(:partial => "posts/partials/show/flash", :locals => {:post => @post})
@@ -14,8 +14,8 @@ class PostPresenter < Presenter
end
end
def tag_list_html(template, current_user)
def tag_list_html(template)
@tag_set_presenter ||= TagSetPresenter.new(@post.tag_array)
@tag_set_presenter.tag_list_html(template, :show_extra_links => current_user.is_privileged?)
@tag_set_presenter.tag_list_html(template, :show_extra_links => CurrentUser.user.is_privileged?)
end
end