102 lines
4.9 KiB
HTML
102 lines
4.9 KiB
HTML
{% extends "module_base.html" %}
|
|
{% load static %}
|
|
|
|
{% block title %}User Details - {{ user.username }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="card-title mb-0">
|
|
<i class="fas fa-user me-2"></i>User Details: {{ user.username }}
|
|
</h4>
|
|
<div class="card-tools">
|
|
<a href="{% url 'accounts:edit_user' user.id %}" class="btn btn-warning btn-sm">
|
|
<i class="fas fa-edit"></i> Edit
|
|
</a>
|
|
<a href="{% url 'accounts:user_list' %}" class="btn btn-secondary btn-sm">
|
|
<i class="fas fa-arrow-left"></i> Back to List
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<h5>Basic Information</h5>
|
|
<table class="table table-borderless">
|
|
<tr>
|
|
<th width="150">Username:</th>
|
|
<td>{{ user.username }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Full Name:</th>
|
|
<td>{{ user.first_name }} {{ user.last_name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Email:</th>
|
|
<td>{{ user.email|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Phone:</th>
|
|
<td>{{ user.phone|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Department:</th>
|
|
<td>{{ user.department|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Position:</th>
|
|
<td>{{ user.position|default:"-" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Status:</th>
|
|
<td>
|
|
{% if user.is_active %}
|
|
<span class="badge bg-success">Active</span>
|
|
{% else %}
|
|
<span class="badge bg-secondary">Inactive</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Date Joined:</th>
|
|
<td>{{ user.date_joined|date:"d M Y H:i" }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<h5>Roles & Permissions</h5>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
{% if user.userrole_set.exists %}
|
|
<ul class="list-group list-group-flush">
|
|
{% for user_role in user.userrole_set.all %}
|
|
<li class="list-group-item">
|
|
<strong>{{ user_role.role.name }}</strong>
|
|
<br>
|
|
<small class="text-muted">{{ user_role.role.description }}</small>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p class="text-muted">No roles assigned</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<h5 class="mt-4">Recent Activity</h5>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<p class="text-muted">Activity tracking not implemented yet</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |