@post_versions.empty? caused this query:
SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "post_versions" WHERE (true) LIMIT 20 OFFSET 0) subquery_for_count
which is unnecessary since @post_versions can be counted directly.
24 lines
610 B
Plaintext
24 lines
610 B
Plaintext
<div id="c-post-versions">
|
|
<div id="a-index">
|
|
<h1>Changes</h1>
|
|
|
|
<% if @post_versions.length == 0 %>
|
|
<%= render "post_sets/blank" %>
|
|
<% else %>
|
|
<%= render "listing", :post_versions => @post_versions %>
|
|
|
|
<% if params[:lr] && CurrentUser.is_janitor? %>
|
|
<p><%= link_to "Revert this user's changes", new_user_revert_path(:user_id => params[:lr]) %></p>
|
|
<% end %>
|
|
|
|
<%= numbered_paginator(@post_versions) %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render "secondary_links" %>
|
|
|
|
<% content_for(:page_title) do %>
|
|
Post Changes - <%= Danbooru.config.app_name %>
|
|
<% end %>
|