<div class="ddm-admin-section">
  <div class="ddm-admin-section-header">Exception Log</div>
  <div class="ddm-admin-section-body">
    <div>
      Below you can find a list of the exceptions that have been recorded for this project.
    </div>

    <table data-classes="table table-sm table-striped table-hover small-font small-inputs"
           data-toggle="table"
           data-filter-control="true"
           data-show-export="true"
           data-export-types="['csv', 'json']"
           data-export-data-type="all"
           data-export-options='{"fileName": "DDM_ExceptionLogs_{{ project.url_id }}"}'
           data-pagination="true"
           data-page-size="10"
           data-buttons-class="transparent">
      <thead>
      <tr>
        <th data-field="date" data-filter-control="input" data-sortable="true">Date</th>
        <th data-field="participant" data-filter-control="select" data-sortable="true">Participant</th>
        <th data-field="type" data-filter-control="select" data-sortable="true">Type</th>
        <th data-field="raised-by" data-filter-control="select" data-sortable="true">Raised by</th>
        <th data-field="blueprint" data-filter-control="select" data-sortable="true">Related Blueprint</th>
        <th data-field="message" data-filter-control="input" data-sortable="true">Message</th>
      </tr>
      </thead>

      {% for e in exceptions %}
      <tr>
        <td>{{ e.date|date:"Y-m-d, H:i:s" }}</td>
        <td>{{ e.participant }}</td>
        <td>{{ e.exception_type }}</td>
        <td>{{ e.raised_by }}</td>
        <td>{{ e.blueprint.pk }}</td>
        <td>{{ e.message }}</td>
      </tr>
      {% empty %}
      <tr>
        <td>No exceptions recorded.</td>
      </tr>
      {% endfor %}
    </table>
  </div>
</div>
