<commit_before><% 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><commit_msg>Send section IDs to reorder<commit_after><% 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 %>

{'fraction_non_alphanumeric': 0.20274725274725275, 'fraction_numerical': 0.005494505494505495, 'mean_word_length': 3.2152777777777777, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2224039', 'n_tokens_mistral': 680, 'n_tokens_neox': 632, 'n_words': 138}