Split the wiki page versions template into two partials, _global_listing.html.erb and _page_listing.html.erb, to avoid the nested conditionals that arise from combining these two pages into one template. Add html IDs to distinguish between these two partials.
24 lines
544 B
Plaintext
24 lines
544 B
Plaintext
<div id="c-wiki-page-versions">
|
|
<div id="a-index">
|
|
<%= render "wiki_pages/sidebar" %>
|
|
|
|
<section id="content">
|
|
<h1>Wiki Pages</h1>
|
|
|
|
<% if params.dig(:search, :wiki_page_id).present? %>
|
|
<%= render "page_listing" %>
|
|
<% else %>
|
|
<%= render "global_listing" %>
|
|
<% end %>
|
|
|
|
<%= numbered_paginator(@wiki_page_versions) %>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render "wiki_pages/secondary_links" %>
|
|
|
|
<% content_for(:page_title) do %>
|
|
Wiki Page Versions - <%= Danbooru.config.app_name %>
|
|
<% end %>
|