fixes #1284
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
<div class="bans">
|
||||
<div class="show">
|
||||
<h1>Show Ban</h1>
|
||||
<ul>
|
||||
<ul style="margin-bottom: 1em;">
|
||||
<li><strong>User</strong>: <%= link_to_user(@ban.user) %></li>
|
||||
<li><strong>Expires</strong>: <%= compact_time @ban.expires_at %></li>
|
||||
<li><strong>Reason</strong>: <%= @ban.reason %></li>
|
||||
</ul>
|
||||
|
||||
<%= form_tag(ban_path(@ban), :method => :delete) do %>
|
||||
<%= submit_tag "Unban" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
<%= render "users/upgrade_notice" %>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.user.is_banned? %>
|
||||
<%= render "users/ban_notice" %>
|
||||
<% end %>
|
||||
|
||||
<% if cookies["accepted_tos"].blank? && !CurrentUser.is_privileged? %>
|
||||
<%= render "users/tos" %>
|
||||
<% end %>
|
||||
|
||||
5
app/views/users/_ban_notice.html.erb
Normal file
5
app/views/users/_ban_notice.html.erb
Normal file
@@ -0,0 +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>
|
||||
</div>
|
||||
@@ -27,6 +27,11 @@
|
||||
|
||||
<% 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>
|
||||
<% else %>
|
||||
<li><%= link_to "Ban", new_ban_path(:ban => {:user_id => @user.id}) %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<li>|</li>
|
||||
|
||||
Reference in New Issue
Block a user