{# pages/audit_log.html — audit log timeline page #} {% extends "base.html" %} {% block title %}Audit Log — {{ title | default("Admin") }}{% endblock %} {% block content %}
{% 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 %}

No audit log entries found

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