<% content_for :breadcrumbs do %>
  <li><%= link_to "Your manuals", manuals_path %></li>
  <li><%= link_to manual.title, manual_path(manual) %></li>
  <li class="active">Reorder sections</li>
<% end %>

<h1 class="page-header">
  Reorder sections
</h1>

<div class="row">
  <div class="col-md-8">
    <ol class="reorderable-document-list">
      <% documents.each do |document| %>
        <li><%= document.title %></li>
      <% end %>
    </ol>
  </div>
</div>

<div class="row">
  <div class="col-md-12">
    <div class="actions">
      <%= form_tag(update_order_manual_documents_path(manual), method: :post) do %>
        <button name="submit" class="btn btn-primary">Save section order</button>
      <% end %>
      <%= link_to "Back", manual_path(manual), class: "action-link" %>
    </div>
  </div>
</div>

<% content_for :breadcrumbs do %>
  <li><%= link_to "Your manuals", manuals_path %></li>
  <li><%= link_to manual.title, manual_path(manual) %></li>
  <li class="active">Reorder sections</li>
<% end %>

<h1 class="page-header">
  Reorder sections
</h1>
<%= form_tag(update_order_manual_documents_path(manual), method: :post) do %>
  <div class="row">
    <div class="col-md-8">
      <ol class="reorderable-document-list">
        <% documents.each do |document| %>
          <li>
            <input type="hidden" name="section_order[]" value="<%= document.id %>">
            <%= document.title %>
          </li>
        <% end %>
      </ol>
    </div>
  </div>

  <div class="row">
    <div class="col-md-12">
      <div class="actions">
        <button name="submit" class="btn btn-primary">Save section order</button>
        <%= link_to "Back", manual_path(manual), class: "action-link" %>
      </div>
    </div>
  </div>
<% end %>


Send section IDs to reorder
Send section IDs to reorder

So that the reordering is saved, send it to the server on submit.
