user_list.html 1.46 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
{% extends "base.html" %}


{% block content-header %}
{% endblock %}

{% block content %}
<div class="row">
<div class="col-md-12 white-bg">

    {% if is_paginated %}
      <div class="pagination">
        <span class="page-links">
          {% if page_obj.has_previous %}
            <a href="?page={{ page_obj.previous_page_number }}"><i class="fa fa-chevron-left" aria-hidden="true"></i></a>
          {% endif %}
          <span class="page-current">
            Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
          </span>
          {% if page_obj.has_next %}
            <a href="?page={{ page_obj.next_page_number }}"><i class="fa fa-chevron-right" aria-hidden="true"></i></a>
          {% endif %}
        </span>
      </div>
    {% endif %}

    <table class="article-table table table-sm my-4">
      <thead>
        <tr>
          <th>ID</th>
          <th>Username</th>
          <th>Email</th>
          <th>Registration date</th>
          <th>Role</th>
          <th>Actions<img class="inline-image ml-2" role="img" src="{% static 'img/jedi.svg' %}" /></th>
        </tr>
      </thead>
    <tbody>
39 40 41 42 43 44 45
    {% for user in object_list %}
      <tr id="row_{{user.id}}">
        <td>{{user.id}}</td>
        <td>{{user.username}}</td>
	<td>{{user.email}}</td>
        <td>{{user.date_joined |date:'d/m/Y - H:i:s'}}</td>
	<td>{{user.groups.all.0.name}}</td>
46 47 48 49 50 51 52 53 54
	<td></td>
      </tr>
    {% endfor %}
    </tbody>
    </table>
  </div>
</div>
</div>
{% endblock %}