<commit_before><h1>Listing Reports</h1>

<div class="row">
  <div class="col-md-8 col-md-offset-2">
    <table class="table table-hover">
      <thead>
        <tr>
          <th>Cause</th>
          <th>Position</th>
          <th>Email (reporter)</th>
          <th>Email (position)</th>
          <th>Description</th>
          <th>Options</th>
        </tr>
      </thead>

      <tbody>
        <% @reports.each do |report| %>
        <tr>
          <td><span class="label label-<%= cause_label(report.cause) %>"><%= report.cause.capitalize %></span></td>
          <td><%= link_to report.position.name, report.position, class: "btn btn-xs btn-primary" %></td>
          <td><%= report.email %></td>
          <td><%= report.position.email %></td>
          <td><%= report.description %></td>
          <td><%= link_to 'Ignore', ignore_report_path(report), class: "btn btn-xs btn-danger" %></td>
          <td><%= link_to 'Remove position', report.position, method: :delete, class: "btn btn-xs btn-danger" %></td>
        </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>

<br>

<%= link_to 'New Report', new_report_path, class: "btn btn-success" %><commit_msg>Fixed bug in style, add confirmation to dangerous buttons<commit_after><h1>Listing Reports</h1>

<div class="row">
  <div class="col-md-8 col-md-offset-2">
    <table class="table table-hover">
      <thead>
        <tr>
          <th>Cause</th>
          <th>Position</th>
          <th>Email (reporter)</th>
          <th>Email (position)</th>
          <th>Description</th>
          <th>Options</th>
        </tr>
      </thead>

      <tbody>
        <% @reports.each do |report| %>
        <tr>
          <td><span class="label label-<%= cause_label(report.cause) %>"><%= report.cause.capitalize %></span></td>
          <td><%= link_to report.position.name, report.position, class: "btn btn-xs btn-primary" %></td>
          <td><%= report.email %></td>
          <td><%= report.position.email %></td>
          <td><%= report.description %></td>
          <td><%= link_to 'Ignore', ignore_report_path(report), class: "btn btn-xs btn-danger", data: { confirm: "Are you sure?" }  %>
              <%= link_to 'Remove position', report.position, method: :delete, class: "btn btn-xs btn-danger", data: { confirm: "Are you sure?" }  %></td>
        </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>

<br>

<%= link_to 'New Report', new_report_path, class: "btn btn-success" %>
{'fraction_non_alphanumeric': 0.20314389359129384, 'fraction_numerical': 0.0032245062474808546, 'mean_word_length': 2.336021505376344, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 113, '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': '5503177', 'n_tokens_mistral': 881, 'n_tokens_neox': 829, 'n_words': 188}