-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusers.html
52 lines (50 loc) · 1.48 KB
/
users.html
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% extends "base.html" %}
{% block content %}
<!--
<h1>
<title>User List</title>
</h1>
<h1>Showing {{ response["total"] }} from page: {{ response["page"] }} </h1>
-->
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">ID</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Email</th>
<th scope="col">Avatar</th>
</tr>
</thead>
<tbody>
{% for user in response["data"] %}
<tr>
<th scope="row"><b>{{ user.id }} </b></th>
<td><b>{{ user.first_name }} </b></td>
<td><b>{{ user.last_name }} </b></td>
<td><b>{{ user.email }} </b></td>
<td>
<div class="avatar avatar-xs me-2">
<img src="{{ user.avatar }}" alt="Photo of {{ user.first_name }}." class="rounded-circle">
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="container-fluid">
{% if response.get("total_pages") %}
{% for page_number in range(1, response["total_pages"] + 1) %}
{% if response["total_pages"] == page_number %}
<button class="btn btn-outline-primary active">
<span>{{ page_number }} <span class="sr-only">(current)</span></span>
</button>
{% else %}
<a href="?page={{ page_number }}" class="btn btn-outline-primary">
{{ page_number }}
</a>
{% endif %}
{% endfor %}
{% endif %}
</div>
{% endblock %}