Add "Download" button to Audit Trail list when items are within exportable limit

- Display a download button if the total number of audit trail items is within `MAX_LINES`.
- Added the download action as a form submission with the appropriate route.
This commit is contained in:
2026-02-23 11:44:41 +01:00
parent 3b8984eec5
commit 98130bb452

View File

@@ -24,4 +24,14 @@
</div>
{{ chill_pagination(pagination) }}
{% if pagination.totalItems <= constant('Chill\\MainBundle\\Audit\\AuditEventDumper::MAX_LINES') %}
<ul class="record_actions sticky-form-buttons">
<li>
<form method="post" action="{{ path('chill_main_audit_trail_generate', app.request.query.all) }}">
<button class="btn btn-action"><i class="bi bi-download"></i> {{ 'audit_trail.list.download'|trans }}</button>
</form>
</li>
</ul>
{% endif %}
{% endblock %}