aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb4
-rw-r--r--app/views/user/show.rhtml18
2 files changed, 14 insertions, 8 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 %>