diff options
-rw-r--r-- | app/models/user.rb | 4 | ||||
-rw-r--r-- | app/views/user/show.rhtml | 18 | ||||
-rw-r--r-- | public/stylesheets/main.css | 11 |
3 files changed, 23 insertions, 10 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index d648fef3f..45b2b3836 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -116,9 +116,6 @@ class User < ActiveRecord::Base if not name.nil? name.strip! end - if self.public_banned? - name = name + " (Banned)" - end name end @@ -275,6 +272,7 @@ class User < ActiveRecord::Base text = self.ban_text.strip text = CGI.escapeHTML(text) text = MySociety::Format.make_clickable(text, :contract => 1) + text = text.gsub(/\n/, '<br>') return text end diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml index 6a341af6c..56dabeff8 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.rhtml @@ -73,11 +73,19 @@ </p> <% if @display_user.public_banned? %> - <p id="user_public_banned"> - <strong> - This user has been banned from WhatDoTheyKnow.com - </strong> - </p> + <div id="user_public_banned"> + <p> + <strong> + This user has been banned from WhatDoTheyKnow.com + </strong> + </p> + <p> + They have been given the following explanation: + </p> + <p class="details"> + <%= @display_user.can_fail_html %> + </p> + </div> <% 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 a6a0f3409..2eff85a5f 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -1207,9 +1207,16 @@ div.user_about_me #user_public_banned { - text-align: center; margin: 0em 14em 0em 0em; - padding: 1em 1em 1em 1em; + padding: 0.5em 1em 0.5em 1em; background-color: #d0d0d0; } +#user_public_banned .details +{ + margin-left: 4em; + margin-right: 4em; + font-size: 0.8em; + font-style: italic; +} + |