summaryrefslogtreecommitdiff
path: root/app/views/users/show.html.erb
diff options
context:
space:
mode:
authorMrYummy <elemental428@gmail.com>2017-06-20 16:22:56 +0200
committerMrYummy <elemental428@gmail.com>2017-06-20 16:22:56 +0200
commit8dc051ea46ba46c0e2798495f40bfa3e2bb83074 (patch)
treecfd8216888ddac2de40a817630d4cf0b855ad17f /app/views/users/show.html.erb
parent992406a20b90d47d1ef8a9b4f8d0c599590a1171 (diff)
Added ban reason and expiration date to user pages
Diffstat (limited to 'app/views/users/show.html.erb')
-rw-r--r--app/views/users/show.html.erb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index e371a09..eb14575 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -15,11 +15,12 @@
<h1><%= @user.name %></h1>
<div class="clear"></div>
-
- <% if @user.banned? %>
- <span class="user-banned">This user is banned!</span>
+ <% if @ban_json %>
+ <span class="user-banned">This used is banned for "<%=@ban_json["reason"]%>"<%=" until #{@ban_json["expires"]}" unless @ban_json["expires"] == "forever"%></span>
+ <% elsif @user.banned? %>
+ <span class="user-banned">This user is banned!</span>
<% end %>
-
+ <br>
<% if !@user.confirmed? %>
<% if @user.is?(current_user) || mod? %>
<span class="user-unconfirmed">Please confirm your email <u><%= @user.email %></u> !</span>