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

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

    <ul id="sortable">
      <% @favorite_group.posts.limit(1_000).each do |post| %>
        <%= tag.li id: "favorite_group[post_ids]_#{post.id}" do -%>
          <%= post_preview(post, show_deleted: true).presence || "Hidden: Post ##{post.id}" -%>
        <% end -%>
      <% end %>
    </ul>

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

<%= render "favorite_groups/secondary_links" %>
