users: reword ban notice messages.
* Show the ban length instead of the ban expiration date in ban notices. * Fix the ban notice to not say "Your account has been temporarily banned" when it's a permanent ban.
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
<div class="notice notice-error notice-large" id="ban-notice">
|
||||
<h2>Your account has been temporarily banned</h2>
|
||||
<div>Reason: <span class="prose"><%= format_text CurrentUser.user.active_ban.reason, inline: true %></span></div>
|
||||
<div>Your ban will expire in <%= time_ago_in_words(CurrentUser.user.active_ban.expires_at) %></div>
|
||||
</div>
|
||||
<% if CurrentUser.user.is_banned? %>
|
||||
<% @active_ban = CurrentUser.user.active_ban %>
|
||||
|
||||
<div class="notice notice-error notice-large" id="ban-notice">
|
||||
<h2>You have been banned <%= humanized_duration @active_ban.duration %></h2>
|
||||
|
||||
<div>
|
||||
Reason: <span class="prose"><%= format_text @active_ban.reason, inline: true %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -89,12 +89,13 @@
|
||||
<td><%= presenter.permissions %></td>
|
||||
</tr>
|
||||
|
||||
<% if user.is_banned? %>
|
||||
<% if user.is_banned? && user.active_ban.present? %>
|
||||
<tr>
|
||||
<th>Ban reason</th>
|
||||
<td>
|
||||
<span class="prose">
|
||||
<%= format_text presenter.ban_reason, inline: true %>
|
||||
<%= format_text user.active_ban.reason, inline: true %>
|
||||
(banned <%= humanized_duration(user.active_ban.duration) %>)
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user