This commit is contained in:
r888888888
2013-05-07 18:19:30 -07:00
parent 49de333b74
commit 0535237704
6 changed files with 11 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
<div class="ui-corner-all ui-state-error" id="ban-notice">
<h1>Your account has been temporarily banned</h1>
<p>Reason: <%= CurrentUser.user.ban.reason %></p>
<p>Your ban will expire in <%= time_ago_in_words(CurrentUser.user.ban.expires_at) %></p>
<p>Reason: <%= CurrentUser.user.recent_ban.reason %></p>
<p>Your ban will expire in <%= time_ago_in_words(CurrentUser.user.recent_ban.expires_at) %></p>
</div>

View File

@@ -28,7 +28,7 @@
<% if CurrentUser.is_moderator? %>
<li><%= link_to "Promote", edit_admin_user_path(@user) %></li>
<% if @user.is_banned? %>
<li><%= link_to "Unban", ban_path(@user.ban) %></li>
<li><%= link_to "Unban", ban_path(@user.recent_ban) %></li>
<% else %>
<li><%= link_to "Ban", new_ban_path(:ban => {:user_id => @user.id}) %></li>
<% end %>