Remove the `category_name` field from the `/wiki_page.json` API. This field was originally added only because it was needed by our autocomplete Javascript. It was also misnamed, it wasn't the tag's category name, it was the category's ID. Users should use `https://danbooru.donmai.us/wiki_pages.json?only=title,tag` instead if they need this. This triggered a N+1 query pattern when dumping wiki pages to BigQuery, which made dumping wiki pages very slow. It also meant this field was included in the database dump, even though it wasn't a real database column.
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
<% page_title "Wiki Comparison: #{@thispage.pretty_title.titleize}" %>
|
|
|
|
<%= render "wiki_pages/secondary_links" %>
|
|
<%= render "wiki_pages/sidebar" %>
|
|
|
|
<% content_for(:content) do %>
|
|
<h1>Wiki Page Version Comparison: <%= link_to @thispage.title, wiki_page_versions_path(search: { wiki_page_id: @thispage.wiki_page_id }, type: params[:type], anchor: "wiki-page-version-#{@thispage.id}"), class: "tag-type-#{@thispage.wiki_page.tag.category}" %></h1>
|
|
|
|
<% if params[:type].present? %>
|
|
<%= render "versions/types" %>
|
|
<% end %>
|
|
|
|
<% if @otherpage.present? %>
|
|
<% if @thispage.id != @otherpage.id %>
|
|
<p>Showing differences between <%= compact_time @thispage.updated_at %> (<%= link_to_user @thispage.updater %>) and <%= compact_time @otherpage.updated_at %> (<%= link_to_user @otherpage.updater %>)</p>
|
|
|
|
<% if wiki_version_show_other_names(@thispage, @otherpage) %>
|
|
<p><%= wiki_version_other_names_diff(@thispage, @otherpage) %></p>
|
|
<% else %>
|
|
<p><em>No changes to other names.</em></p>
|
|
<% end %>
|
|
|
|
<% if @thispage.body != @otherpage.body %>
|
|
<div class="diff-body">
|
|
<%= diff_body_html(@thispage, @otherpage, :body) %>
|
|
</div>
|
|
<% else %>
|
|
<p><em>No changes to body.</em></p>
|
|
<% end %>
|
|
<% else %>
|
|
<p><em>Version is latest!</em></p>
|
|
<% end %>
|
|
<% else %>
|
|
<p><em>No versions to compare!</em></p>
|
|
<% end %>
|
|
<% end %>
|