- Add custom border, background, and spacing utilities to base template - Enhance message notification styling and layout - Update delete modal button appearance and behavior - Refine comment card component with Tailwind classes and responsive behavior - Adjust sidebar responsiveness for mobile view
53 lines
3.1 KiB
HTML
53 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="card-surface 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-3 p-4 bg-hover rounded-xl">
|
|
<div>
|
|
<p class="text-xs text-muted font-medium uppercase tracking-wider">Username</p>
|
|
<p class="text-sm font-semibold text-primary mt-1">{{ profile_user.username }}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-xs text-muted font-medium uppercase tracking-wider">Email</p>
|
|
<p class="text-sm font-semibold text-primary mt-1">{{ profile_user.email|default:"-" }}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-xs text-muted font-medium uppercase tracking-wider">Role</p>
|
|
<p class="text-sm font-semibold text-primary mt-1">{{ profile_user.get_role_display }}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-xs text-muted font-medium uppercase tracking-wider">Active</p>
|
|
<p class="text-sm font-semibold text-primary mt-1">{% if profile_user.is_active %}Yes{% else %}No{% endif %}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-xs text-muted font-medium uppercase tracking-wider">Member Since</p>
|
|
<p class="text-sm font-semibold text-primary 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="px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-600 text-white hover:bg-blue-700 transition-colors">Edit User</a>
|
|
<a href="{% url 'user_list' %}" class="px-3 py-1.5 rounded-lg text-sm font-medium text-secondary hover:bg-hover border border-soft transition-colors">Back</a>
|
|
{% if user.is_admin %}
|
|
<label for="delete-modal-user" class="px-3 py-1.5 rounded-lg text-sm font-medium bg-red-600 text-white hover:bg-red-700 transition-colors 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 %}
|