{% extends "quite_admin/base.html" %} {% from "quite_admin/_filter_controls.html" import add_filter_button, condition_chips with context %} {% macro change_value(text, present, truncated, kind) %} {% if not present %}{{ t('Not present') }} {% elif text is none %}NULL {% elif text == '' %}{{ t('Empty string') }} {% elif kind == 'boolean' %}{{ t('True' if text == 'true' else 'False') }} {% else %}
{{ text }}{% endif %}
{% if truncated %}{{ t('Value truncated') }}{% endif %}
{% endmacro %}
{% macro action_label(event) %}{% if event.action.startswith('action:') %}{{ history_actions.get(event.action, t('Custom action') ~ ': ' ~ event.action[7:]) }}{% else %}{{ t(history_actions.get(event.action, event.action)) }}{% endif %}{% endmacro %}
{% macro record_reference(item) %}{% if item.record_label %}{% if item.record_url %}#{{ item.record_label }} ↗{% else %}#{{ item.record_label }}{% endif %}{% endif %}{% endmacro %}
{% macro event_changes(item, expanded=false) %}
{% set event = item.event %}
{% if item.changes %}
{{ change.name }}{% endif %}{{ t('Additional changes omitted: {count}', count=item.omitted) }}
{% endif %}{% if event.outcome == 'failure' %}{{ t('Changes were not saved.') }}{% elif event.details is none %}{{ t('Field details were not recorded for this event.') }}{% else %}{{ t('No visible field changes.') }}{% endif %}
{% endif %} {% endmacro %} {% from "quite_admin/_ui.html" import empty_state with context %} {% block content %}{{ t('Activity journal') }}
{{ t('Who changed what, with field values before and after.') }}
| {{ t('Time (UTC)') }} | {{ t('User') }} | {{ t('Collection') }} | {{ t('Action') }} | {{ t('Result') }} | {{ t('Field changes') }} |
|---|---|---|---|---|---|
| {{ event.display_name or event.subject }}{% if event.display_name and event.display_name != event.subject %}{{ event.subject }}{% endif %} | {{ history_resources[event.collection].label if event.collection else t('Authentication') }} | {{ action_label(event) }} {{ record_reference(item) }} | {{ t('Success' if event.outcome == 'success' else 'Failure') }} {{ event.status_code }} | {{ event_changes(item) }} | |
| {% call empty_state('No activity found', 'Choose another user or collection, or clear the filters.', 'empty-state') %}{% if history_filters.action == 'changes' and history_level != 'changes' %}{{ t('Show all activity') }}{% endif %}{% endcall %} | |||||