Files
project-managment/templates/pages/accounts/user_detail.html
T
sankalp 057031ed1b feat(templates/pages): add admin delete actions and UI refinements
- New Features
  - Add delete buttons with confirmation modals for users, expenses, invoices, and tickets
  - Introduce a priority column with styled badges in the ticket list
  - Refactor form fields to a shared partial for cleaner markup
- Enhancements
  - Rename “Creator” to “Assignee” and improve status/priority badge rendering
  - Fix empty‑state colspan and correct broken delete‑modal label closing tag
  - Initialize Quill editor on the ticket detail page
- Bug Fixes
  - Resolve typo in button class name and mismatched table header count
2026-05-28 00:26:59 +05:45

52 lines
3.1 KiB
HTML

{% extends "base_authenticated.html" %}
{% block title %}{{ profile_user.username }}{% endblock %}
{% block content_inner %}
<div class="max-w-2xl mx-auto">
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 overflow-hidden">
<div class="bg-blue-600 px-6 py-12">
<div class="flex items-center gap-4">
<div class="w-16 h-16 rounded-full bg-white/20 flex items-center justify-center text-white text-2xl font-bold">
{{ profile_user.first_name|first|default:profile_user.username|first|upper }}
</div>
<div class="text-white">
<h1 class="text-2xl font-bold">{{ profile_user.get_full_name|default:profile_user.username }}</h1>
<p class="text-white/80">{{ profile_user.get_role_display }}</p>
</div>
</div>
</div>
<div class="p-6 space-y-4">
<div class="grid grid-cols-2 gap-4">
<div class="p-4 bg-gray-50 rounded-xl">
<p class="text-xs text-gray-500 font-medium uppercase tracking-wider">Username</p>
<p class="text-sm font-semibold text-gray-900 mt-1">{{ profile_user.username }}</p>
</div>
<div class="p-4 bg-gray-50 rounded-xl">
<p class="text-xs text-gray-500 font-medium uppercase tracking-wider">Email</p>
<p class="text-sm font-semibold text-gray-900 mt-1">{{ profile_user.email|default:"-" }}</p>
</div>
<div class="p-4 bg-gray-50 rounded-xl">
<p class="text-xs text-gray-500 font-medium uppercase tracking-wider">Role</p>
<p class="text-sm font-semibold text-gray-900 mt-1">{{ profile_user.get_role_display }}</p>
</div>
<div class="p-4 bg-gray-50 rounded-xl">
<p class="text-xs text-gray-500 font-medium uppercase tracking-wider">Active</p>
<p class="text-sm font-semibold text-gray-900 mt-1">{% if profile_user.is_active %}Yes{% else %}No{% endif %}</p>
</div>
<div class="p-4 bg-gray-50 rounded-xl">
<p class="text-xs text-gray-500 font-medium uppercase tracking-wider">Member Since</p>
<p class="text-sm font-semibold text-gray-900 mt-1">{{ profile_user.date_joined|date:"M Y" }}</p>
</div>
</div>
<div class="flex gap-3 pt-2">
<a href="{% url 'user_edit' profile_user.pk %}" class="btn bg-blue-600 text-white hover:bg-blue-700 border-0">Edit User</a>
<a href="{% url 'user_list' %}" class="btn btn-ghost">Back</a>
{% if user.is_admin %}
<label for="delete-modal-user" class="btn bg-red-600 text-white hover:bg-red-700 border-0 cursor-pointer">Delete</label>
{% endif %}
</div>
</div>
</div>
</div>
{% url 'user_delete' profile_user.pk as delete_url %}
{% include "components/delete_modal.html" with modal_id="delete-modal-user" delete_url=delete_url %}
{% endblock %}