Files
eam-project/templates/recycle_bin/deleted-users-data.html
T
2025-05-23 14:44:12 +08:00

45 lines
1.9 KiB
HTML

{% if page_object %}
{% load static %}
{% for user in page_object %}
<tr>
<td>
{% if page_object.start_index %}
{{page_object.start_index|add:forloop.counter0}}
{% else %}
{{forloop.counter}}
{% endif %}
</td>
<td>
<div class="user-img d-flex align-items-center">
<div class="avatar avatar-lg">
{% if user.profile_pic %}
<img src="{{user.profile_pic.url}}">
{% else %}
<img src="{% static 'assets/images/faces/1.jpg' %}">
{% endif %}
</div>
</div>
</td>
<td>{{user.full_name | title}}</td>
<td>{{user.email}}</td>
<td>{{user.role}}</td>
<td>{{user.department}}</td>
<td>{{user.updated_at}}</td>
<td>
<div class="btn-group btn-group-sm" role="group" aria-label="Basic example">
<form action="{% url 'recycle_bin:deleted_user_restore' user.id %}" method="post" onsubmit="return confirm('Are you sure you want to restore it?')">
{% csrf_token %}
<button type="submit" class="btn btn-success btn-sm" title="Restore"><i class="bi bi-arrow-repeat"></i></button>
</form>
<form action="{% url 'recycle_bin:deleted_user_permanently' user.id %}" method="post" onsubmit="return confirm('Are you sure you want to delete this permanently?')">
{% csrf_token %}
<button type="submit" class="btn btn-danger btn-sm" title="Delete"><i class="bi bi-trash3-fill"></i></button>
</form>
</div>
</td>
</tr>
{% endfor %}
{% else %}
<td colspan="8" class="text-center"> No record found related to your search keyword</td>
{% endif %}