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:
@@ -9,14 +9,14 @@
|
||||
<%= link_to_user(ban.user) %>
|
||||
<%= link_to "»", bans_path(search: search_params.merge(user_name: ban.user.name)) %>
|
||||
<% end %>
|
||||
<% t.column "Duration" do |ban| %>
|
||||
<%= humanized_duration(ban.created_at, ban.expires_at) %>
|
||||
<% end %>
|
||||
<% t.column "Reason", td: {class: "col-expand"} do |ban| %>
|
||||
<div class="prose">
|
||||
<%= format_text ban.reason %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% t.column "Duration" do |ban| %>
|
||||
<%= humanized_duration(ban.created_at, ban.expires_at) %>
|
||||
<% end %>
|
||||
<% t.column "Banner" do |ban| %>
|
||||
<%= link_to_user ban.banner %>
|
||||
<%= link_to "»", bans_path(search: { banner_name: ban.banner.name }) %>
|
||||
|
||||
Reference in New Issue
Block a user