<div id="c-comments">
  <div id="a-index">
    <h1>Comments</h1>

    <% if @posts.empty? %>
      <%= render "post_sets/blank" %>
    <% end %>

    <% @posts.select {|x| Danbooru.config.can_user_see_post?(CurrentUser.user, x)}.each do |post| %>
      <div class="post <%= PostPresenter.preview_class(post) %>" <%= PostPresenter.preview_attributes(post) %>>
        <div class="preview">
          <%= link_to(image_tag(post.preview_file_url), post_path(post)) %>
        </div>
        <%= render "comments/partials/index/list", :post => post, :comments => post.comments.visible(CurrentUser.user).recent.reverse, :show_header => true %>
        <div class="clearfix"></div>
      </div>
    <% end %>

    <%= numbered_paginator(@posts) %>
  </div>
</div>

<%= render "comments/secondary_links" %>

<% content_for(:page_title) do %>
  Comments - <%= Danbooru.config.app_name %>
<% end %>
