Files
project-managment/templates/pages/accounts/user_list.html
T
sankalp a42fd580b7 refactor(templates/pages): redesign login, profile, and ticket list UI with Tailwind improvements
Added branding and updated layouts using base_authenticated.html; applied consistent Tailwind styling across authentication and ticket pages; improved usability with hover effects and clearer typography.

New Features:
-

Enhancements:
- Refactored login page layout to use a centered card with branding and modern styling.
- Updated profile page to use the authenticated base template and a refined card design.
- Enhanced ticket list page with a descriptive subtitle, SVG icon, and refined table styling including hover states and better typography.

Bug Fixes:
- Fixed template inheritance to use base_authenticated.html for profile and tickets pages.
- Corrected form button text and styling for consistency.
2026-05-28 00:00:06 +05:45

62 lines
3.4 KiB
HTML

{% extends "base_authenticated.html" %}
{% block title %}Users{% endblock %}
{% block content_inner %}
<div class="flex items-center justify-between mb-6">
<div>
<h1 class="text-2xl font-bold text-gray-900">Users</h1>
<p class="text-gray-500 mt-1">Manage system users and their roles.</p>
</div>
<a href="{% url 'user_create' %}" class="btn bg-blue-600 text-white hover:bg-blue-700 border-0">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
New User
</a>
</div>
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 overflow-hidden">
<div class="overflow-x-auto">
<table class="table w-full">
<thead>
<tr class="bg-gray-50">
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">User</th>
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Email</th>
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Role</th>
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Status</th>
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider"></th>
</tr>
</thead>
<tbody>
{% for u in users %}
<tr class="hover:bg-gray-50 transition-colors">
<td>
<div class="flex items-center gap-3">
<div class="w-8 h-8 rounded-full bg-blue-600 flex items-center justify-center text-white text-xs font-bold">{{ u.username|first|upper }}</div>
<a href="{% url 'user_detail' u.pk %}" class="font-medium text-gray-900 hover:text-blue-600">{{ u.username }}</a>
</div>
</td>
<td class="text-gray-600">{{ u.email|default:"-" }}</td>
<td>
<span class="text-xs px-2.5 py-1 rounded-full font-medium {% if u.role == 'admin' %}bg-sky-100 text-sky-700{% elif u.role == 'client' %}bg-blue-100 text-blue-700{% else %}bg-green-100 text-green-700{% endif %}">
{{ u.get_role_display }}
</span>
</td>
<td>
{% if u.is_active %}
<span class="text-xs px-2.5 py-1 rounded-full font-medium bg-green-100 text-green-700">Active</span>
{% else %}
<span class="text-xs px-2.5 py-1 rounded-full font-medium bg-red-100 text-red-700">Inactive</span>
{% endif %}
</td>
<td>
<div class="flex gap-1">
<a href="{% url 'user_detail' u.pk %}" class="btn btn-sm btn-ghost">View</a>
<a href="{% url 'user_edit' u.pk %}" class="btn btn-sm bg-blue-50 text-blue-700 hover:bg-blue-100 border-0">Edit</a>
<a href="{% url 'user_delete' u.pk %}" class="btn btn-sm text-red-600 hover:bg-red-50 border-0">Delete</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}