Fix a N+1 query when fetching posts to render thumbnails. Also adds support for the `limit` url param on the posts show page.
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
<div id="c-pools">
|
|
<div id="a-show">
|
|
<h1>
|
|
<%= @pool.pretty_category %>:
|
|
<%= link_to @pool.pretty_name, posts_path(:tags => "pool:#{@pool.id}"), :class => "pool-category-#{@pool.category}" %>
|
|
<% if @pool.is_deleted? %>
|
|
<span class="inactive">(deleted)</span>
|
|
<% end %>
|
|
</h1>
|
|
|
|
<div id="description" class="prose">
|
|
<%= format_text(@pool.description) %>
|
|
</div>
|
|
|
|
<%= render "posts/partials/common/inline_blacklist" %>
|
|
|
|
<section>
|
|
<% if @pool.post_count == 0 %>
|
|
<%= render "post_sets/blank" %>
|
|
<% else %>
|
|
<% @posts.each do |post| %>
|
|
<%= PostPresenter.preview(post, pool_id: @pool.id) %>
|
|
<% end %>
|
|
|
|
<%= numbered_paginator(@posts) %>
|
|
<% end %>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render "secondary_links" %>
|
|
|
|
<% content_for(:page_title) do %>
|
|
Pool - <%= @pool.pretty_name %> - <%= Danbooru.config.app_name %>
|
|
<% end %>
|
|
|
|
<% content_for(:html_header) do %>
|
|
<meta name="description" content="<%= strip_dtext(@pool.description) %>">
|
|
<% end %>
|