<table id="ReportsTable" class="table table-condensed table-striped">
  <thead>
    <tr>
      <th><i class="fa-solid fa-hashtag"></i></th>
      <th data-translate>Date</th>
      <th data-translate>Last update</th>
      <th data-translate>Expiration date</th>
      <th data-translate>Channel</th>
      <th data-translate>Status</th>
      <th>Tor</th>
      <th data-translate>Comments</th>
      <th data-translate>Messages</th>
      <th data-translate>Files</th>
      <th data-translate>Whistleblower's last access</th>
    </tr>
  </thead>
  <tbody>
    <tr data-ng-repeat="tip in auditLog.tips.elems | orderBy:'last_update':true | limitTo:itemsPerPage:((auditLog.tips.currentPage - 1) * itemsPerPage)">
      <td>{{tip.progressive}}</td>
      <td>{{tip.creation_date | date:'dd-MM-yyyy HH:mm'}}</td>
      <td>{{tip.last_update | date:'dd-MM-yyyy HH:mm'}}</td>
      <td>{{tip.expiration_date | date:'dd-MM-yyyy HH:mm'}}</td>
      <td>{{contexts_by_id[tip.context_id]['name']}}</td>
      <td>{{Utils.getSubmissionStatusText(tip.status, tip.substatus, submission_statuses)}}</td>
      <td><i data-ng-if="itip.tor" class="fa-solid fa-check"></i></td>
      <td>{{tip.comments}}</td>
      <td>{{tip.messages}}</td>
      <td>{{tip.files}}</td>
      <td>{{tip.last_access | date:'dd-MM-yyyy HH:mm'}}</td>
    </tr>
  </tbody>
</table>
<div class="text-center" data-ng-show="auditLog.tips.elems.length > itemsPerPage">
  <ul uib-pagination
      total-items="auditLog.tips.elems.length"
      first-text="<< {{'First' | translate}}"
      last-text="{{'Last' | translate}} >>"
      previous-text="< {{'Previous' | translate}}"
      next-text="{{'Next' | translate}} >"
      items-per-page="itemsPerPage"
      data-ng-model="auditLog.tips.currentPage"
      max-size="10"
      class="pagination-sm"
      boundary-links="true"
      force-ellipses="true"></ul>
</div>
<button class="btn btn-sm btn-link" type="button" ng-csv="resources.tips" csv-label='true' filename="reports.csv"><i class="fa-solid fa-download"></i> <span data-translate>Export</span></button>
