Initials
This commit is contained in:
27
templates/accounts/user_list.html
Normal file
27
templates/accounts/user_list.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between mb-3">
|
||||
<h3>Users</h3>
|
||||
<a class="btn btn-success" href="{% url 'accounts:user_add' %}">Add User</a>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<thead><tr><th>#</th><th>Username</th><th>Email</th><th>Phone</th><th>Role</th><th>Actions</th></tr></thead>
|
||||
<tbody>
|
||||
{% for u in users %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ u.username }}</td>
|
||||
<td>{{ u.email }}</td>
|
||||
<td>{{ u.phone_number }}</td>
|
||||
<td>{{ u.role }}</td>
|
||||
<td>
|
||||
<a class="btn btn-sm btn-primary" href="{% url 'accounts:user_edit' u.pk %}">Edit</a>
|
||||
<a class="btn btn-sm btn-danger" href="{% url 'accounts:user_delete' u.pk %}">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan="6">No users yet.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user