bans: change expires_at field to duration.
Changes: * Change the `expires_at` field to `duration`. * Make moderators choose from a fixed set of standard ban lengths, instead of allowing arbitrary ban lengths. * List `duration` in seconds in the /bans.json API. * Dump bans to BigQuery. Note that some old bans have a negative duration. This is because their expiration date was before their creation date, which is because in 2013 bans were migrated to Danbooru 2 and the original ban creation dates were lost.
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
<div id="a-show">
|
||||
<h1>Show Ban</h1>
|
||||
<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>User</strong> <%= link_to_user(@ban.user) %></li>
|
||||
<li><strong>Duration</strong> <%= humanized_duration(@ban.created_at, @ban.expires_at) %></li>
|
||||
<li>
|
||||
<strong>Reason</strong>:
|
||||
<strong>Reason</strong>
|
||||
<div class="prose">
|
||||
<%= format_text @ban.reason %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user