35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
<div id="c-comments">
|
|
<div id="a-index">
|
|
<h1>Comments</h1>
|
|
<% if !CurrentUser.user.is_builder? %>
|
|
<div style="margin-bottom: 1em;">
|
|
<h2>Before commenting, read the <%= link_to "how to comment guide", wiki_pages_path(:search => {:title => "howto:comment"}) %>.</h2>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if @posts.empty? %>
|
|
<%= render "post_sets/blank" %>
|
|
<% end %>
|
|
|
|
<% @posts.select {|x| Danbooru.config.can_user_see_post?(CurrentUser.user, x)}.each do |post| %>
|
|
<div id="post_<%= post.id %>" class="post <%= PostPresenter.preview_class(post) %>" <%= PostPresenter.data_attributes(post) %>>
|
|
<div class="preview">
|
|
<% if post.visible? %>
|
|
<%= link_to(image_tag(post.preview_file_url), post_path(post)) %>
|
|
<% end %>
|
|
</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 %>
|