<commit_before><h1>List of documents for <%= @project.title %></h1>

<table>
  <thead>
    <tr>
      <th>Title</th>
      <th>Body</th>
      <th>Project</th>
      <th></th>
      <% if user_signed_in? %>
      <th></th>
      <th></th>
      <% end %>
    </tr>
  </thead>

  <tbody>
    <% @documents.each do |document| %>
      <tr>
        <td><%= document.title %></td>
        <td><%= document.body %></td>
        <td><%= document.project_id %></td>
        <td><%= link_to 'Show', project_document_path(id: document.id, project_id: document.project_id) %></td>
        <% if user_signed_in? %>
        <td><%= link_to 'Edit', edit_project_document_path(id: document.id, project_id: document.project_id) %></td>
        <td><%= link_to 'Destroy', project_document_path(id: document.id, project_id: document.project_id), method: :delete, data: { confirm: 'Are you sure?' } %></td>
		<% end %>
      </tr>
    <% end %>
  </tbody>
</table>

<br>
<% if user_signed_in? %>
<%= link_to 'New Document', new_project_document_path(project_id: @project.id) %>
<% end %><commit_msg>ping to Pavel. styling of documents/index according to layout desition on list of projects<commit_after><h1>List of documents for <%= @project.title %></h1>

<table id="documents" class="table table-striped">
  <thead>
    <tr>
      <th style="width:90%"></th>
      <% if user_signed_in? %>
          <th style="width:15px"></th>
          <th style="width:15px"></th>
      <% end %>
    </tr>
  </thead>
  <tbody>
    <% @documents.each do |document| %>
      <tr>
        <td><h3><%= link_to document.title, project_document_path(id: document.id, project_id: document.project_id) %></h3>
          <%= document.body.truncate(250, separator: ' ') %></td>
        <% if user_signed_in? %>
        <td><%= link_to 'Edit', edit_project_document_path(id: document.id, project_id: document.project_id), type: 'button', :class => 'btn btn-primary btn-xs' %></td>
        <td><%= link_to 'Destroy', project_document_path(id: document.id, project_id: document.project_id), type: 'button', class: 'btn btn-danger btn-xs', method: :delete %></td>
		<% end %>
      </tr>
    <% end %>
  </tbody>
</table>

<br>
<% if user_signed_in? %>
<%= link_to 'New Document', new_project_document_path(project_id: @project.id), :type => 'button', :class => 'btn btn-default' %>
<% end %>
{'fraction_non_alphanumeric': 0.20170212765957446, 'fraction_numerical': 0.006382978723404255, 'mean_word_length': 3.220825852782765, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 100, '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': '3811081', 'n_tokens_mistral': 892, 'n_tokens_neox': 823, 'n_words': 184}