<commit_before><div class="row">
  <div class="span1"><h3>Milestone</h3></div>
  <div class="span3">
    <h4>Title</h4>
    <% if !milestone.is_virtual? %>
      <input name="milestones[<%= milestone.id %>][title]" type="text" class="span3" required="true" value="<%= milestone.title %>">
    <% else %>
      <h4><%= milestone.title %></h4>
    <% end %>
  </div>
  <div class="span2">
    <% if !milestone.is_virtual? %>
    <h4>Start Date</h4>
    <div class="datepicker input-append date">
      <input name="milestones[<%= milestone.id %>][start_at]" type="datetime"
       value="<%= milestone.start_at.strftime('%d-%m-%Y') %>" 
       class="input-medium" required="true">
      <span class="add-on">
        <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
      </span>
    </div>
    <% end %>
  </div>
  <div class="span2">
    <% if !milestone.is_virtual? %>
    <h4>End Date (Optional)</h4>
    <div class="datepicker input-append date">
      <input name="milestones[<%= milestone.id %>][end_at]" type="datetime" 
      <% if milestone.end_at %> value="<%= milestone.end_at.strftime('%d-%m-%Y') %>" <% end %> 
      class="input-medium">
      <span class="add-on">
        <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
      </span>
    </div>
    <% end %>
  </div>

  <div class="span1">
  <% if !milestone.is_virtual? %>
    <div class="pull-right">
    <%= render :partial => 'layouts/delete_confirm', locals: { :path_to_item => course_lesson_plan_milestone_path(@course, milestone) } %>
    </div>
  <% end %>
  </div>
</div>

<% if (milestone.entries.select { |m| not(m.is_virtual?) }).length > 0 %>
  <div>
    <h3 class="muted">Entries</h3>
    
    <div class="row">
      <div class="span1">
        <h4>Type</h4>
      </div>
      
      <div class="span3">
        <h4>Title</h4>
      </div>
      
      <div class="span2">
        <h4>Start</h4>
      </div>
      
      <div class="span2">
        <h4>End</h4>
      </div>
    </div>
    
    <hr class="hr-shrink-margin">
    <% sorted_entries = milestone.entries.sort_by { |e| e.start_at  } %>
    <% sorted_entries.each { |entry| %><commit_msg>Move delete button for milestones to same row as fields.<commit_after><div class="row">
  <div class="span1"><h3>Milestone</h3></div>
  <div class="span3">
    <h4>Title</h4>
  </div>
  <% if !milestone.is_virtual? %>
  <div class="span2">
    <h4>Start Date</h4>
  </div>
  <div class="span2">
    <h4>End Date (Optional)</h4>
  </div>
  <% end %>
</div>
<div class="row">
  <div class="span3 offset1">
    <% if !milestone.is_virtual? %>
      <input name="milestones[<%= milestone.id %>][title]" type="text" class="span3" required="true" value="<%= milestone.title %>">
    <% else %>
      <h4><%= milestone.title %></h4>
    <% end %>
  </div>
  <% if !milestone.is_virtual? %>
  <div class="span2">
    <div class="datepicker input-append date">
      <input name="milestones[<%= milestone.id %>][start_at]" type="datetime"
       value="<%= milestone.start_at.strftime('%d-%m-%Y') %>" 
       class="input-medium" required="true">
      <span class="add-on">
        <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
      </span>
    </div>
  </div>
  <div class="span2">
    <div class="datepicker input-append date">
      <input name="milestones[<%= milestone.id %>][end_at]" type="datetime" 
      <% if milestone.end_at %> value="<%= milestone.end_at.strftime('%d-%m-%Y') %>" <% end %> 
      class="input-medium">
      <span class="add-on">
        <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
      </span>
    </div>
  </div>

  <div class="span1">
    <div class="pull-right">
    <%= render :partial => 'layouts/delete_confirm', locals: { :path_to_item => course_lesson_plan_milestone_path(@course, milestone) } %>
    </div>
  </div>
  <% end %>
</div>

<% if (milestone.entries.select { |m| not(m.is_virtual?) }).length > 0 %>
  <div>
    <h3 class="muted">Entries</h3>
    
    <div class="row">
      <div class="span1">
        <h4>Type</h4>
      </div>
      
      <div class="span3">
        <h4>Title</h4>
      </div>
      
      <div class="span2">
        <h4>Start</h4>
      </div>
      
      <div class="span2">
        <h4>End</h4>
      </div>
    </div>
    
    <hr class="hr-shrink-margin">
    <% sorted_entries = milestone.entries.sort_by { |e| e.start_at  } %>
    <% sorted_entries.each { |entry| %>
{'fraction_non_alphanumeric': 0.2183778926084026, 'fraction_numerical': 0.01482812851044709, 'mean_word_length': 2.7921635434412266, 'pattern_counts': {'":': 0, '<': 175, '<?xml version=': 0, '>': 181, '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': '5101369', 'n_tokens_mistral': 1746, 'n_tokens_neox': 1623, 'n_words': 291}