<table id="userList" class="table table-condensed table-striped">
  <thead>
    <tr>
      <th data-translate>ID</th>
      <th data-translate>Username</th>
      <th data-translate>Role</th>
      <th data-translate>Name</th>
      <th>2FA</th>
      <th data-translate>Creation date</th>
      <th data-translate>Last access</th>
    </tr>
  </thead>
  <tbody>
    <tr data-ng-repeat="user in auditLog.users.elems | orderBy:'name' | limitTo:itemsPerPage:((auditLog.users.currentPage - 1) * itemsPerPage)">
      <td>{{user.id}}</td>
      <td>{{user.username}}</td>
      <td>{{user.role}}</td>
      <td>{{user.name}}</td>
      <td><i class="fa" data-ng-class="{'fa-check': user.two_factor, 'fa-times': !user.two_factor}"></i></td>
      <td>{{user.creation_date | date:'dd-MM-yyyy HH:mm'}}</td>
      <td>{{user.last_login | date:'dd-MM-yyyy HH:mm'}}</td>
    </tr>
  </tbody>
</table>
<div class="text-center" data-ng-show="auditLog.users.elems.length > itemsPerPage | limitTo:itemsPerPage:((auditLog.users.currentPage - 1) * itemsPerPage)">
  <ul uib-pagination
      total-items="auditLog.users.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.users.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.users" csv-label='true' filename="users.csv"><i class="fa-solid fa-download"></i> <span data-translate>Export</span></button>
