From 5ea11df9d6a9f27b58b51c52e9971886ff674b19 Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Tue, 20 Jul 2010 21:57:41 +0100 Subject: Show banned in public. --- app/models/user.rb | 7 +++++++ app/views/user/show.rhtml | 8 ++++++++ public/stylesheets/main.css | 14 ++++++++------ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index f9f1a99cf..d648fef3f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -116,6 +116,9 @@ class User < ActiveRecord::Base if not name.nil? name.strip! end + if self.public_banned? + name = name + " (Banned)" + end name end @@ -251,6 +254,10 @@ class User < ActiveRecord::Base def admin_page_links? self.admin_level == 'super' end + # Is it public that they are banned? + def public_banned? + !self.ban_text.empty? + end # Various ways the user can be banned, and text to describe it if failed def can_file_requests? self.ban_text.empty? diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml index 54d864698..6a341af6c 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.rhtml @@ -72,6 +72,14 @@ <% end %>

+ <% if @display_user.public_banned? %> +

+ + This user has been banned from WhatDoTheyKnow.com + +

+ <% end %> + <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %>
diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index ecbbb1466..0596e729b 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -1168,14 +1168,16 @@ div.act_link img { div.user_about_me { - width: 37em; padding: 0em 0.5em 0em 0.5em; - margin: 0em 0em 1em 1.5em; - /*border-color: #5F5F5F; - border-width: 1px; - border-style: dotted; - */ + margin: 1em 1.5em 1em 1.5em; overflow: auto; } +#user_public_banned +{ + text-align: center; + margin: 0em 14em 0em 0em; + padding: 1em 1em 1em 1em; + background-color: #d0d0d0; +} -- cgit v1.2.3