<div id="c-pool-orders">
  <div id="a-edit">
    <h1>Order Pool: <%= @pool.pretty_name %></h1>
    <p>Drag and drop the list below to determine ordering.</p>

    <%= render "posts/partials/common/inline_blacklist" %>

    <ul id="sortable">
      <% @pool.posts(:limit => 1_000).each do |post| %>
        <li class="ui-state-default" id="pool[post_id_array]_<%= post.id %>">
          <%= PostPresenter.preview(post).presence || "Hidden: Post ##{post.id}" %>
        </li>
      <% end %>
    </ul>

    <%= simple_form_for(@pool, :format => :js, :html => {:id => "ordering-form"}) do |f| %>
      <%= submit_tag "Save" %>
    <% end %>
  </div>
</div>

<%= render "pools/secondary_links" %>

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