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.
51 lines
2.6 KiB
HTML
51 lines
2.6 KiB
HTML
{% extends "base_authenticated.html" %}
|
|
{% block title %}Activity Log{% endblock %}
|
|
{% block content_inner %}
|
|
<div class="mb-6">
|
|
<h1 class="text-2xl font-bold text-gray-900">Activity Log</h1>
|
|
<p class="text-gray-500 mt-1">System-wide audit trail of all actions.</p>
|
|
</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">Actor</th>
|
|
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Action</th>
|
|
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Object</th>
|
|
<th class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Timestamp</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for activity in activities %}
|
|
<tr class="hover:bg-gray-50 transition-colors">
|
|
<td>
|
|
<div class="flex items-center gap-2">
|
|
<div class="w-7 h-7 rounded-full bg-blue-500 flex items-center justify-center text-white text-xs font-bold">{{ activity.actor.username|first|upper }}</div>
|
|
<span class="text-sm font-medium text-gray-900">{{ activity.actor.username }}</span>
|
|
</div>
|
|
</td>
|
|
<td class="text-sm text-gray-700">{{ activity.verb }}</td>
|
|
<td class="text-sm text-gray-500">{{ activity.content_type }} #{{ activity.object_id }}</td>
|
|
<td class="text-sm text-gray-500">{{ activity.timestamp|date:"M d, Y H:i" }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr><td colspan="4" class="text-center py-12 text-gray-500">No activity recorded yet.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% if page_obj.has_other_pages %}
|
|
<div class="flex justify-center items-center gap-2 mt-6">
|
|
{% if page_obj.has_previous %}
|
|
<a href="?page={{ page_obj.previous_page_number }}" class="btn btn-sm bg-white border-gray-200 hover:bg-gray-50">Previous</a>
|
|
{% endif %}
|
|
<span class="text-sm text-gray-500">Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}</span>
|
|
{% if page_obj.has_next %}
|
|
<a href="?page={{ page_obj.next_page_number }}" class="btn btn-sm bg-white border-gray-200 hover:bg-gray-50">Next</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|