<commit_before><div class="panel panel-part part">
  <div class="panel-heading js-sort-handle">
    <h4 class="panel-title">
      <a class="js-part-toggle" data-toggle="collapse" data-parent="#parts" href="#<%= f.object.slug || 'untitled-part' %>">
        <i class="glyphicon glyphicon-chevron-down pull-left add-right-margin"></i>
        <span class="js-part-title"><%= f.object.title.present? ? f.object.title : 'Untitled part' %></span>
      </a>
    </h4>
  </div>
  <div id="<%= f.object.slug || 'untitled-part' %>" class="js-part-toggle-target panel-collapse collapse in" aria-expanded="true">
    <div class="panel-body">
      <fieldset class="inputs">
        <div class="form-group" id="edition_parts_title_input">
          <span class="form-label">
            <%= f.label :title %><abbr title="required">*</abbr>
          </span>
          <span class="form-wrapper">
            <%= f.text_field :title, disabled: @resource.locked_for_edits?, class: "title form-control" %>
          </span>
        </div>

        <%
          slug_input_html = { class: 'slug form-control', disabled: !editable }
          if @resource.version_number == 1
            slug_input_html['data-accepts-generated-value'] = true
          end
        %>

        <div class="form-group" id="edition_parts_slug_input">
          <span class="form-label">
            <%= f.label :slug %><abbr title="required">*</abbr>
          </span>
          <span class="form-wrapper">
            <%= f.text_field :slug, slug_input_html %>
            <span class="help-block">
              for example, title-of-part (no spaces, apostrophes or acronyms)
            </span>
          </span>
        </div>

        <div class="form-group">
          <span class="form-label">
            <%= f.label :body %><abbr title="required">*</abbr>
          </span>
          <span class="form-wrapper">
            <%= f.text_area :body, rows: 25, disabled: @resource.locked_for_edits?, class: "title form-control" %>
          </span>
        </div>

        <%= f.hidden_field :order, class: 'order', disabled: !editable %>

        <% unless @resource.locked_for_edits? %><commit_msg>Add a Part error block for without JavaScript requests<commit_after><div class="panel panel-part part">
  <div class="panel-heading js-sort-handle">
    <h4 class="panel-title">
      <a class="js-part-toggle" data-toggle="collapse" data-parent="#parts" href="#<%= f.object.slug || 'untitled-part' %>">
        <i class="glyphicon glyphicon-chevron-down pull-left add-right-margin"></i>
        <span class="js-part-title"><%= f.object.title.present? ? f.object.title : 'Untitled part' %></span>
      </a>
    </h4>
  </div>
  <div id="<%= f.object.slug || 'untitled-part' %>" class="js-part-toggle-target panel-collapse collapse in" aria-expanded="true">
    <div class="panel-body">
      <fieldset class="inputs">
        <div class="form-group" id="edition_parts_title_input">
          <span class="form-label">
            <%= f.label :title %><abbr title="required">*</abbr>
          </span>
          <span class="form-wrapper">
            <%= f.text_field :title, disabled: @resource.locked_for_edits?, class: "title form-control" %>
          </span>
          <%= form_errors(f.object.errors[:title]) %>
        </div>

        <%
          slug_input_html = { class: 'slug form-control', disabled: !editable }
          if @resource.version_number == 1
            slug_input_html['data-accepts-generated-value'] = true
          end
        %>

        <div class="form-group" id="edition_parts_slug_input">
          <span class="form-label">
            <%= f.label :slug %><abbr title="required">*</abbr>
          </span>
          <span class="form-wrapper">
            <%= f.text_field :slug, slug_input_html %>
            <span class="help-block">
              for example, title-of-part (no spaces, apostrophes or acronyms)
            </span>
          </span>
          <%= form_errors(f.object.errors[:slug]) %>
        </div>

        <div class="form-group">
          <span class="form-label">
            <%= f.label :body %><abbr title="required">*</abbr>
          </span>
          <span class="form-wrapper">
            <%= f.text_area :body, rows: 25, disabled: @resource.locked_for_edits?, class: "title form-control" %>
          </span>
        </div>

        <%= f.hidden_field :order, class: 'order', disabled: !editable %>

        <% unless @resource.locked_for_edits? %>
{'fraction_non_alphanumeric': 0.1755011135857461, 'fraction_numerical': 0.0022271714922048997, 'mean_word_length': 2.3590127150336575, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 109, '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': '7197152', 'n_tokens_mistral': 1466, 'n_tokens_neox': 1415, 'n_words': 280}