From 012259cd36e6c357cec51880b72a2c55770432ed Mon Sep 17 00:00:00 2001 From: Faheed Date: Sun, 19 Oct 2025 18:38:33 +0300 Subject: [PATCH] ... --- templates/user/admin_settings.html | 273 ++++++++++++----------------- 1 file changed, 108 insertions(+), 165 deletions(-) diff --git a/templates/user/admin_settings.html b/templates/user/admin_settings.html index 30b6911..dd5098c 100644 --- a/templates/user/admin_settings.html +++ b/templates/user/admin_settings.html @@ -1,25 +1,25 @@ {% extends "base.html" %} {% load static %} {% load i18n %} +{% load humanize %} {% block title %}{% trans "Admin Settings" %} - KAAUH ATS{% endblock %} + {% block customCSS %} -{% block styles %} {% endblock %} {% block content %} -
+

@@ -88,177 +116,92 @@

- - {# --- User Management Section (Cards) --- #} - {# --- Paged User Table Section --- #}
-
-

{% trans "Staff User List" %}

+ +
+ +

{% trans "Staff User List" %}

+ + {# 1. Create User Button - Using the enhanced btn-main-action class #} + + {% trans "Create New User" %} + +
- {# Assumes 'page_obj' contains the paginated queryset from the view #} - - - - - - + + + + + + + {% for user in staffs %} - - - + + {# Column: Last Login Date #} + + + {% empty %} - + {% endfor %}
{% trans "ID" %}{% trans "Username" %}{% trans "Full Name" %}{% trans "Email" %}{% trans "Status" %}{% trans "Actions" %}{% trans "ID" %}{% trans "Full Name" %}{% trans "Email" %}{% trans "Status" %}{% trans "First Join" %}{% trans "Last Login" %}{% trans "Actions" %}
{{ user.pk }}{{ user.username }} {{ user.get_full_name|default:user.first_name }} {{ user.email }} + {% if user.is_active %} - {% trans "Active" %} + {% trans "Active" %} {% else %} - {% trans "Inactive" %} + {% trans "Inactive" %} {% endif %} - - {# 1. Edit Button (Pencil Icon) #} - - - + + {# Column: First Join Date #} + + {{ user.date_joined|date:"d M Y" }} + + {% if user.last_login %} + {{ user.last_login|naturaltime }} + {% else %} + {% trans "Never" %} + {% endif %} + +
+ {# 1. Edit Button (Pencil Icon) #} + + + - {# 2. Change Password Button (Key Icon) #} - {# NOTE: You must define a URL named 'user_password_change' that accepts the user ID #} - - - + {# 2. Change Password Button (Key Icon) #} + + + - {# 3. Delete Button (Trash Icon) #} - {# NOTE: You must define a URL named 'user_delete' that accepts the user ID #} - - - + {# 3. Delete Button (Trash Icon) #} + + + +
{% trans "No staff users found." %}{% trans "No staff users found." %}
- {# --- Pagination Controls --- #} - {% if page_obj.has_other_pages %} - - {% endif %} -
-
- - {# --- Permissions & Group Management Section --- #} -