2024-02-13 10:04:59 +00:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/admin.css') }}">
|
2024-02-13 23:15:32 +00:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/loginform.css') }}" />
|
2024-02-13 22:48:23 +00:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/modal.css') }}">
|
2024-02-13 10:04:59 +00:00
|
|
|
|
|
|
|
{% if users != None %}
|
|
|
|
<p>Showing {{users|count}} users</p>
|
|
|
|
<div class="user-container">
|
2024-02-13 11:59:14 +00:00
|
|
|
<table class="table table-style">
|
2024-02-13 10:04:59 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-02-13 22:48:23 +00:00
|
|
|
<th scope="col">#</th>
|
2024-02-13 11:59:14 +00:00
|
|
|
<th scope="col">Username</th>
|
|
|
|
<th scope="col">E-Mail</th>
|
|
|
|
<th scope="col">Phone Number</th>
|
2024-02-13 22:48:23 +00:00
|
|
|
<th scope="col">Role</th>
|
|
|
|
<th>Actions</th>
|
2024-02-13 10:04:59 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for user in users %}
|
|
|
|
<tr>
|
2024-02-13 22:48:23 +00:00
|
|
|
<td>{{user.id}}</td>
|
2024-02-13 10:04:59 +00:00
|
|
|
<td>{{user.username}}</td>
|
|
|
|
<td>{{user.email}}</td>
|
|
|
|
<td>{{user.phone}}</td>
|
2024-02-13 22:48:23 +00:00
|
|
|
<td>{{user.role}}</td>
|
|
|
|
<td>
|
|
|
|
<div class="input-form-row">
|
|
|
|
<div class="button neutral">
|
|
|
|
<p class="btnText">Edit User</p>
|
|
|
|
<div class="btnTwo">
|
|
|
|
<p class="btnText2">{{user.id}}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<label for="deleteModal{{user.id}}">
|
|
|
|
<div class="button error">
|
|
|
|
<p class="btnText">DELETE USER</p>
|
|
|
|
<div class="btnTwo">
|
|
|
|
<p class="btnText2">X</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</td>
|
2024-02-13 10:04:59 +00:00
|
|
|
</tr>
|
2024-02-13 22:48:23 +00:00
|
|
|
|
|
|
|
<!-- Modal -->
|
|
|
|
<input class="modal-state" id="deleteModal{{user.id}}" type="checkbox" />
|
|
|
|
<div class="modal">
|
|
|
|
<label class="modal__bg" for="deleteModal{{user.id}}"></label>
|
|
|
|
<div class="modal__inner">
|
|
|
|
<label class="modal__close" for="deleteModal{{user.id}}"></label>
|
|
|
|
<h2>Confirm Delete</h2>
|
|
|
|
<p>Are you sure you want to <b>delete</b> {{user.role}} <b>{{user.username}}</b></p>
|
2024-02-13 23:15:32 +00:00
|
|
|
<form method="POST" action="{{ url_for('main.users.delete', id=user.id) }}">
|
2024-02-13 22:48:23 +00:00
|
|
|
<div class="input-form-row">
|
|
|
|
<input type="submit" class="modal-btn error" for="deleteModal{{user.id}}" value="Delete" />
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-13 10:04:59 +00:00
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<p>Sorry... We have nothing to show here!</p>
|
|
|
|
{% endif %}
|