From 0e052f2fd7c3c76f092d34061465cb7b8bd3d5bb Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 31 Mar 2013 17:53:51 -0400 Subject: [PATCH] fixes #866 --- app/models/user.rb | 3 +++ app/presenters/post_presenter.rb | 2 +- app/views/posts/show.html.erb | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 6e45cd9eb..239c93004 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -299,6 +299,9 @@ class User < ActiveRecord::Base when Levels::ADMIN "Admin" + + else + "" end end diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index 470e87c62..77ad1fa0a 100644 --- a/app/presenters/post_presenter.rb +++ b/app/presenters/post_presenter.rb @@ -69,7 +69,7 @@ class PostPresenter < Presenter def image_html(template) return template.content_tag("p", "The artist requested removal of this image") if @post.is_banned? && !CurrentUser.user.is_privileged? - return template.content_tag("p", "You need a privileged account to see this image.") if !Danbooru.config.can_user_see_post?(CurrentUser.user, @post) + return template.content_tag("p", template.link_to("You need a privileged account to see this image.", template.upgrade_information_users_path)) if !Danbooru.config.can_user_see_post?(CurrentUser.user, @post) if @post.is_flash? template.render("posts/partials/show/flash", :post => @post) diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index bdd9a0446..0c8224863 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -24,7 +24,9 @@

History