{% extends "hub/base.html" %}
{% load staticfiles %}
{% block pagetitle %}Users{% endblock %}
{% block content %}

<div class="dashhead">
  <div class="dashhead-titles">
    <h6 class="dashhead-subtitle">UoP Botswana MoH / TB Training</h6>
    <h2 class="dashhead-title">Users</h2>
  </div>
</div>

<hr class="m-t">
<div class="flextable">
  <form class="form-inline" method="post" action=".">
    {% csrf_token %}
    <div class="form-group">
      <label for="code">Facility Code</label>
      {{ form.code }}
      <!-- <select class="custom-select form-control" name="address_type" id="address_type">
        <option value="msisdn">Cell Phone</option>
      </select> -->
    </div>
    <button type="submit" class="btn btn-default">Search</button>
    <b>Results:</b> {{ identities.count }}
  </form>
</div>
<div class="table-full">
  <div class="table-responsive">
    <table class="table" data-sort="table">
      <thead>
        <tr>
          <th>Identity</th>
          <th>Created At</th>
          <th>Action</th>
        </tr>
      </thead>
      <tbody>
        {% for identity in identities.results %}
        <tr>
          {% url 'user-detail' identity.id as url %}
          <td>{{ identity.id }}</td>
          <td>{{ identity.created_at|get_date|date:"D d M Y H:i"  }}</td>
          <td><a href="{{ url }}">view</a></td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
</div>

<!-- <div class="text-center">
  <ul class="pagination">
    <li>
      <a href="#" aria-label="Previous">
        <span aria-hidden="true">&laquo;</span>
      </a>
    </li>
    <li class="active"><a href="#">1</a></li>
    <li><a href="#">2</a></li>
    <li><a href="#">3</a></li>
    <li><a href="#">4</a></li>
    <li><a href="#">5</a></li>
    <li>
      <a href="#" aria-label="Next">
        <span aria-hidden="true">&raquo;</span>
      </a>
    </li>
  </ul>
</div> -->


{% endblock %}
