Files
2026-02-02 10:52:20 +05:30

63 lines
2.7 KiB
HTML

{% extends "core/base.html" %}
{% block content %}
<div class="container my-5">
<div class="card shadow-lg">
<div class="card-header bg-primary text-white d-flex justify-content-between align-items-center">
<h3>Manage Citizens</h3>
<a href="{% url 'superadmin_dashboard' %}" class="btn btn-light btn-sm">Back to Dashboard</a>
</div>
<div class="card-body">
{% if citizens %}
<table class="table table-striped table-hover">
<thead class="table-dark">
<tr>
<th>No.</th>
<th>Username</th>
<th>Email</th>
<th>Phone No.</th>
<th>Date Joined</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for citizen in citizens %}
<tr>
<td>{{ forloop.counter }}</td>
<td>{{ citizen.username }}</td>
<td>{{ citizen.email }}</td>
<td>{{ citizen.phone }}</td>
<td>{{ citizen.date_joined|date:"M d, Y" }}</td>
<td>
{% if citizen.is_currently_banned %}
<span class="badge bg-danger">Banned until {{ citizen.banned_until|date:"M d, Y" }}</span>
{% else %}
<span class="badge bg-success">Active</span>
{% endif %}
</td>
<td>
{% if citizen.is_currently_banned %}
<a href="{% url 'unban_user' citizen.id %}" class="btn btn-sm btn-success">
<i class="fas fa-unlock"></i> Unban
</a>
{% else %}
<a href="{% url 'ban_user' citizen.id %}" class="btn btn-sm btn-danger">
<i class="fas fa-ban"></i> Ban
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-muted">No citizen users found.</p>
{% endif %}
</div>
</div>
</div>
{% endblock %}