From 1f0877964b7051cf1fcffe8693fac6866bf3aea5 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 15 Jun 2026 11:28:57 +0100 Subject: [PATCH] Enhance user view and list UI with improved layout and functionality --- generic/templates/generic/user_view.html | 106 +++++++++++++---------- templates/user_list_view.html | 82 ++++++++++-------- 2 files changed, 108 insertions(+), 80 deletions(-) diff --git a/generic/templates/generic/user_view.html b/generic/templates/generic/user_view.html index 5053dfdf..04e5e6f7 100644 --- a/generic/templates/generic/user_view.html +++ b/generic/templates/generic/user_view.html @@ -7,51 +7,69 @@ {% endblock %} {% block content %} - Trainees list +
+

Accounts

+ +
-
- +
+ Bulk edit -
-
- - - - - +
+
+
+
+ + + + + +
+
@@ -61,8 +79,4 @@
{% include "generic/partials/filter_bar.html" with filter=filter app_name=app_name collapse_id="bottom-filter-body" %} - Bulk create users - Create single user - - {% endblock %} diff --git a/templates/user_list_view.html b/templates/user_list_view.html index 847acc44..fbef6170 100644 --- a/templates/user_list_view.html +++ b/templates/user_list_view.html @@ -1,47 +1,61 @@ {% extends "generic/base.html" %} +{% load crispy_forms_tags %} {% block content %} -

Users

-
- + + +
+ Filter users list -
- {{ filter.form.as_p }} - -
+
+
+ {{ filter.form|crispy }} +
+ + Reset +
+
+
- {{object_list|length}} Users shown. -
    - {% for list_user in object_list %} -
  • Username: {{ list_user.username }} - Name: {{list_user.first_name}} {{list_user.last_name}} - {% if list_user.userprofile.grade %}Grade: {{list_user.userprofile.grade}}{% endif %} Supervisor: {{list_user.userprofile.supervisor}} -
    Registration number: {{list_user.userprofile.registration_number}} - - - {% if user.is_superuser %} - - - {% endif %} +
    + {{ object_list|length }} Users shown. +
    + +
      + {% for list_user in object_list %} +
    • +
      + @{{ list_user.username }} + Name: {{ list_user.first_name }} {{ list_user.last_name }} + {% if list_user.userprofile.grade %} + Grade: {{ list_user.userprofile.grade }} + {% endif %} + Supervisor: {{ list_user.userprofile.supervisor|default:"None" }} +
      Registration number: {{ list_user.userprofile.registration_number|default:"N/A" }}
      +
      +
      + Edit user + Edit profile + {% if user.is_superuser %} + Admin edit + Delete + {% endif %} +
    • {% endfor %}
    - - Bulk create users - Create single user - {% endblock %} - -{% block css %} - - - -{% endblock css %} \ No newline at end of file