{# pages/audit_log.html — audit log timeline page #} {% extends "base.html" %} {% block title %}Audit Log — {{ title | default("Admin") }}{% endblock %} {% block content %}
{{ icon("magnifying-glass", class="absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-gray-400)]", size="20px") }}
{% if entries %} {% for entry in entries %}
{% if entry.action == 'CREATE' %} Created {% elif entry.action == 'UPDATE' %} Updated {% elif entry.action == 'DELETE' %} Deleted {% endif %}
{{ entry.user_email | default("System") }} {{ entry.action | lower }}d {{ entry.model_name }} #{{ entry.object_id }} {% if entry.object_repr %} ({{ entry.object_repr }}) {% endif %}
{{ entry.timestamp }} {% if entry.ip_address %} IP: {{ entry.ip_address }} {% endif %}
{% if entry.changes %}
Changed: {{ entry.changes.keys() | list | join(', ') }}
{% endif %}
View
{% endfor %} {% else %}
{{ icon("clock", class="mx-auto text-[var(--color-gray-400)]", size="48px") }}

No audit log entries found

{% endif %}
{% from "partials/pagination.html" import render_pagination %} {{ render_pagination(page, total_pages, total_items, per_page) }}
{% endblock %}