90 lines
4.6 KiB
HTML
90 lines
4.6 KiB
HTML
{% extends 'layouts/main-layout.html' %}
|
|
{% block content %}
|
|
{% load static %}
|
|
<div class="page-heading">
|
|
<div class="page-title">
|
|
<div class="row">
|
|
<div class="col-12 col-md-6 order-md-1 order-last">
|
|
<h3>Deleted Users</h3>
|
|
</div>
|
|
<div class="col-12 col-md-6 order-md-2 order-first">
|
|
<nav aria-label="breadcrumb" class="breadcrumb-header float-start float-lg-end">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="/">Dashboard</a></li>
|
|
<li class="breadcrumb-item" aria-current="page">Recycle Bin</li>
|
|
<li class="breadcrumb-item active" aria-current="page">Users</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<section class="section">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
{% if page_object %}
|
|
<div class="d-flex justify-content-end my-2 gap-2">
|
|
<input name="search_text" type="search" class='dataTable-input' autocomplete="off" placeholder='Search here...'
|
|
hx-get="{% url 'recycle_bin:deleted_users_search' page_object.number %}" hx-trigger="keyup changed delay:500ms, search" hx-target="#search_result">
|
|
</div>
|
|
{% endif %}
|
|
<table class="table table-hover" id="table1">
|
|
<thead>
|
|
<tr>
|
|
<th>Sl No.</th>
|
|
<th>Image</th>
|
|
<th>Name</th>
|
|
<th>Email</th>
|
|
<th>Designation</th>
|
|
<th>Department</th>
|
|
<th>Datetime</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
{% if page_object %}
|
|
<tbody id="search_result">
|
|
{% for user in page_object %}
|
|
<tr>
|
|
<td>{{page_object.start_index|add:forloop.counter0}}</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 %}
|
|
</tbody>
|
|
{% else %}
|
|
<div class="alert alert-info" role="alert">
|
|
No record available!
|
|
</div>
|
|
{% endif %}
|
|
</table>
|
|
{% include 'commons/pagination.html' %}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
{% endblock content %} |