<commit_before>{% load i18n %}

<div id="renameChapter" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">{% trans "Rename Chapter" %}</h3>
    </div>
    <div class="modal-body">
      <input type="hidden" name="chapter_id" value=""/>
      <input type="text" name="chapter" placeholder="{% trans "New chapter title" %}" class="form-control">
    </div>
    <div class="modal-footer">
      <button class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
      <button class="btn btn-default btn-primary operation-rename">{% trans "Save" %}</button>
    </div>
   </div>
 </div>
</div>

<div id="renameSection" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">{% trans "Rename Section" %}</h3>
    </div>
    <div class="modal-body">
      <input type="hidden" name="chapter_id" value=""/>
      <input type="text" name="chapter" placeholder="{% trans "New section title" %}" class="form-control">
    </div>
    <div class="modal-footer">
      <button class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
      <button class="btn btn-default btn-primary operation-rename">{% trans "Save" %}</button>
    </div>
  </div>
 </div>
</div>


<div id="newChapter" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">{% trans "Create New Chapter" %}</h3>
    </div>
    <div class="modal-body">
      <input type="text" name="chapter" class="form-control" placeholder="{% trans "Enter new Chapter title" %}">
    </div>
    <div class="modal-footer">
      <button class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
      <button class="btn btn-default btn-primary operation-create">{% trans "Create Chapter" %}</button>
    </div>
  </div>
</div>
</div>

<div id="newSection" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">{% trans "Create New Section" %}</h3>
    </div>
    <div class="modal-body">
      <input type="text" class="form-control" placeholder="{% trans "Enter new Section title" %}">
    </div>
    <div class="modal-footer">
      <button class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
      <button class="btn btn-default btn-primary operation-create">{% trans "Create Section" %}</button>
    </div>
  </div>
  </div>
</div>

<div id="removeChapter" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      <h3>{% trans "Remove chapter" %}</h3>
    </div>
    <div class="modal-body">
      <form>
         <input type="hidden" name="chapter_id" value=""/>
         <p>{% trans "Are you sure you would like to delete this chapter? You will lose all data associated to this chapter and you will not be able to undo this operation!" %}</p>
         <p><input type="checkbox" name="understand" value="on"  class="form-control"/> {% trans "I understand and agree" %}</p>
      </form>
    </div>
    <div class="modal-footer">
      <a href="#" class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Close" %}</a>
      <button class="btn btn-default btn-primary operation-remove">{% trans "Remove" %}</button>
    </div>
  </div>
 </div>
</div>

<div id="removeSection" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      <h3>{% trans "Remove section" %}</h3>
    </div>
    <div class="modal-body">
      <form>
         <input type="hidden" name="chapter_id" value=""/>
         <p>{% trans "Are you sure you would like to delete this section?" %}</p>
         <p><input type="checkbox" name="understand" value="on"  class="form-control"/> {% trans "I understand and agree" %}</p>
      </form>
    </div>
    <div class="modal-footer">
      <a href="#" class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Close" %}</a>
      <button class="btn btn-default btn-primary operation-remove">{% trans "Remove" %}</button>
    </div>
   </div>
  </div>
 </div>

<div class="template templateTOCContent">
 <div id="edit-info" class="alert template" style="margin-bottom:10px;">All books should contain at least one section and can have as many chapters as you like.</div>

 <div class="toc">
 </div>
</div>

<div class="template templateTOCToolbar">
    <h2>{% trans "Table of Contents" %}</h2>
    <div class="btn-toolbar float-right">
        <div class="btn-group">
            <button type="button" class="btn btn-default" data-toggle="button" id="detail-switch">{% trans "Detail View" %}</button>
        </div>
        <div class="btn-group">
          <button id="expand" class="btn btn-default" rel="tooltip" data-placement="bottom" data-original-title="{% trans "Expand All" %}"><i class="icon-arrow-down"></i></button>
          <button id="collapse" class="btn btn-default" rel="tooltip" data-placement="bottom" data-original-title="{% trans "Collapse All" %}"><i class="icon-arrow-up"></i></button>
        </div>
        <div class="btn-group">
          <button href="#newChapter" role="button" class="btn btn-default" data-toggle="modal">{% trans "New Chapter" %}</button><commit_msg>BK-933 Delete chapter and section dialogs have broken layout<commit_after>{% load i18n %}

<div id="renameChapter" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">{% trans "Rename Chapter" %}</h3>
    </div>
    <div class="modal-body">
      <input type="hidden" name="chapter_id" value=""/>
      <input type="text" name="chapter" placeholder="{% trans "New chapter title" %}" class="form-control">
    </div>
    <div class="modal-footer">
      <button class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
      <button class="btn btn-default btn-primary operation-rename">{% trans "Save" %}</button>
    </div>
   </div>
 </div>
</div>

<div id="renameSection" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">{% trans "Rename Section" %}</h3>
    </div>
    <div class="modal-body">
      <input type="hidden" name="chapter_id" value=""/>
      <input type="text" name="chapter" placeholder="{% trans "New section title" %}" class="form-control">
    </div>
    <div class="modal-footer">
      <button class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
      <button class="btn btn-default btn-primary operation-rename">{% trans "Save" %}</button>
    </div>
  </div>
 </div>
</div>


<div id="newChapter" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">{% trans "Create New Chapter" %}</h3>
    </div>
    <div class="modal-body">
      <input type="text" name="chapter" class="form-control" placeholder="{% trans "Enter new Chapter title" %}">
    </div>
    <div class="modal-footer">
      <button class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
      <button class="btn btn-default btn-primary operation-create">{% trans "Create Chapter" %}</button>
    </div>
  </div>
</div>
</div>

<div id="newSection" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">{% trans "Create New Section" %}</h3>
    </div>
    <div class="modal-body">
      <input type="text" class="form-control" placeholder="{% trans "Enter new Section title" %}">
    </div>
    <div class="modal-footer">
      <button class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
      <button class="btn btn-default btn-primary operation-create">{% trans "Create Section" %}</button>
    </div>
  </div>
  </div>
</div>

<div id="removeChapter" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      <h3>{% trans "Remove chapter" %}</h3>
    </div>
    <div class="modal-body">
      <form>
         <input type="hidden" name="chapter_id" value=""/>
         <p>{% trans "Are you sure you would like to delete this chapter? You will lose all data associated to this chapter and you will not be able to undo this operation!" %}</p>

        <div class="row">
          <div class="col-md-9">
            <input type="checkbox" id="toc_delete_chapter" name="understand" value="on"/>
            <label for="toc_delete_chapter"><span></span>{% trans "I understand and agree" %}</label>
          </div>
        </div>

      </form>
    </div>
    <div class="modal-footer">
      <a href="#" class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Close" %}</a>
      <button class="btn btn-default btn-primary operation-remove">{% trans "Remove" %}</button>
    </div>
  </div>
 </div>
</div>

<div id="removeSection" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      <h3>{% trans "Remove section" %}</h3>
    </div>
    <div class="modal-body">
      <form>
         <input type="hidden" name="chapter_id" value=""/>
         <p>{% trans "Are you sure you would like to delete this section?" %}</p>

         <div class="row">
           <div class="col-md-9">
             <input type="checkbox" name="understand" value="on"  id="toc_delete_section"/>
             <label for="toc_delete_section"><span></span>{% trans "I understand and agree" %}</label>
           </div>
         </div>
         
      </form>
    </div>
    <div class="modal-footer">
      <a href="#" class="btn btn-default operation-cancel" data-dismiss="modal" aria-hidden="true">{% trans "Close" %}</a>
      <button class="btn btn-default btn-primary operation-remove">{% trans "Remove" %}</button>
    </div>
   </div>
  </div>
 </div>

<div class="template templateTOCContent">
 <div id="edit-info" class="alert template" style="margin-bottom:10px;">All books should contain at least one section and can have as many chapters as you like.</div>

 <div class="toc">
 </div>
</div>

<div class="template templateTOCToolbar">
    <h2>{% trans "Table of Contents" %}</h2>
    <div class="btn-toolbar float-right">
        <div class="btn-group">
            <button type="button" class="btn btn-default" data-toggle="button" id="detail-switch">{% trans "Detail View" %}</button>
        </div>
        <div class="btn-group">
          <button id="expand" class="btn btn-default" rel="tooltip" data-placement="bottom" data-original-title="{% trans "Expand All" %}"><i class="icon-arrow-down"></i></button>
          <button id="collapse" class="btn btn-default" rel="tooltip" data-placement="bottom" data-original-title="{% trans "Collapse All" %}"><i class="icon-arrow-up"></i></button>
        </div>
        <div class="btn-group">
          <button href="#newChapter" role="button" class="btn btn-default" data-toggle="modal">{% trans "New Chapter" %}</button>
{'fraction_non_alphanumeric': 0.19724198635663465, 'fraction_numerical': 0.0038876256143181983, 'mean_word_length': 3.936278059377263, 'pattern_counts': {'":': 0, '<': 353, '<?xml version=': 0, '>': 353, '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': '3102922', 'n_tokens_mistral': 4352, 'n_tokens_neox': 4210, 'n_words': 1093}