From 1099302ab2f0ab3ed2e2b1a13c0f2d2351e2c49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 23 Feb 2026 13:48:40 +0100 Subject: [PATCH] Add French translations and implement UI for audit trail download statuses - Added new French translations for audit trail download states in `messages.fr.yml`. - Updated `waitForDump` endpoint to render a Twig template with download status. - Created `download.html.twig` to display the download status with dynamic messages for different states. --- .../Controller/AuditTrailSearchController.php | 8 +++-- .../views/AuditTrail/download.html.twig | 31 +++++++++++++++++++ .../translations/messages.fr.yml | 6 ++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Resources/views/AuditTrail/download.html.twig diff --git a/src/Bundle/ChillMainBundle/Controller/AuditTrailSearchController.php b/src/Bundle/ChillMainBundle/Controller/AuditTrailSearchController.php index 3547a96a5..b02f19ba3 100644 --- a/src/Bundle/ChillMainBundle/Controller/AuditTrailSearchController.php +++ b/src/Bundle/ChillMainBundle/Controller/AuditTrailSearchController.php @@ -92,10 +92,14 @@ final readonly class AuditTrailSearchController } - #[Route('/{_locale°/main/audit-trail/wait/{uuid}', name: 'chill_main_audit_trail_wait')] + #[Route('/{_locale}/main/audit-trail/wait/{uuid}', name: 'chill_main_audit_trail_wait')] public function waitForDump(StoredObject $storedObject): Response { - return new Response($storedObject->getStatus()); + return new Response( + $this->twig->render('@ChillMain/AuditTrail/download.html.twig', [ + 'storedObject' => $storedObject, + ]) + ); } private function buildFilter(): FilterOrderHelper diff --git a/src/Bundle/ChillMainBundle/Resources/views/AuditTrail/download.html.twig b/src/Bundle/ChillMainBundle/Resources/views/AuditTrail/download.html.twig new file mode 100644 index 000000000..1fc8df64e --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/AuditTrail/download.html.twig @@ -0,0 +1,31 @@ +{% extends "@ChillMain/layout.html.twig" %} + +{% block title "audit_trail.download.title"|trans %} + +{% block js %} + {{ encore_entry_link_tags('page_wait_download_stored_object') }} +{% endblock %} + +{% block css %} + {{ encore_entry_script_tags('page_wait_download_stored_object') }} +{% endblock %} + +{% block content %} +

{{ block('title') }}

+ +
+ + +{% endblock content %} diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index 7f3b54269..e3edcc596 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -1026,3 +1026,9 @@ audit_trail: person_number: Identifiant usager by_users: Utilisateurs download: Télécharger + download: + title: Téléchargement de la liste des accès + ready: Liste prête + waiting: En cours de préparation + failure: Erreur lors de la préparation du document + stopped: La préparation a nécessité une attente trop longue, veuillez recharger la page