From 6142f9a425394f6b42db933dd173fb3026db358b Mon Sep 17 00:00:00 2001 From: Wouter van der Loop Date: Thu, 30 Nov 2023 09:41:35 +0100 Subject: [PATCH] Add extra fields and indices to audit tables, based on configuration damienharper/auditor#61 --- src/Resources/views/Audit/entry.html.twig | 36 +++++++++++++++++++++++ src/translations/auditor.de.yaml | 2 ++ src/translations/auditor.en.yaml | 2 ++ src/translations/auditor.es.yaml | 2 ++ src/translations/auditor.et.yaml | 2 ++ src/translations/auditor.fr.yaml | 2 ++ src/translations/auditor.it.yaml | 2 ++ src/translations/auditor.nl.yaml | 2 ++ 8 files changed, 50 insertions(+) diff --git a/src/Resources/views/Audit/entry.html.twig b/src/Resources/views/Audit/entry.html.twig index 8e64c75d..d9668e0a 100644 --- a/src/Resources/views/Audit/entry.html.twig +++ b/src/Resources/views/Audit/entry.html.twig @@ -83,6 +83,42 @@ {% endif %} +
+
+
+
+ + + + + + + + + {% set extraFields = entry.getExtraField() %} + {% for key, value in extraFields %} + + + + + {% endfor %} + +
+ {% trans from 'auditor' %}audit.audit_details.extra_field{% endtrans %} + + {% trans from 'auditor' %}audit.audit_details.value{% endtrans %} +
+ {{ key }} + + {% if value is not null %} + {{ helper.dump(value) }} + {% endif %} +
+
+
+
+
+ {% if entry.getTransactionHash() is not empty %}
diff --git a/src/translations/auditor.de.yaml b/src/translations/auditor.de.yaml index f6a46bcc..946d1be4 100644 --- a/src/translations/auditor.de.yaml +++ b/src/translations/auditor.de.yaml @@ -7,8 +7,10 @@ audit: most_recent: (neueste zuerst) entry_title: Alle Operationen dieser Transaktion anzeigen property: Eigenschaft + extra_field: Extra eigenschaft old_value: Alter Wert new_value: Neuer Wert + value: Wert transaction: Transaktion entity_per_entity: (Objekt pro Objekt) operations_count: '%count% Operation(en)' diff --git a/src/translations/auditor.en.yaml b/src/translations/auditor.en.yaml index f4abe9af..e4f415b4 100644 --- a/src/translations/auditor.en.yaml +++ b/src/translations/auditor.en.yaml @@ -7,8 +7,10 @@ audit: most_recent: (most recent first) entry_title: View all operations within this transaction property: Attribute + extra_field: Extra attribute old_value: Old value new_value: New value + value: Value transaction: Transaction entity_per_entity: (entity per entity) operations_count: '%count% operation(s)' diff --git a/src/translations/auditor.es.yaml b/src/translations/auditor.es.yaml index 0ddc2724..0843a9e9 100644 --- a/src/translations/auditor.es.yaml +++ b/src/translations/auditor.es.yaml @@ -7,8 +7,10 @@ audit: most_recent: (el más reciente primero) entry_title: Ver todas las operaciones dentro de esta transacción property: Propiedad + extra_field: Extra propiedad old_value: Viejo valor new_value: Nuevo valor + value: Valor transaction: Transacción entity_per_entity: (entidad por entidad) operations_count: '%count% registro(s)' diff --git a/src/translations/auditor.et.yaml b/src/translations/auditor.et.yaml index 6eb688b5..dedf50ce 100644 --- a/src/translations/auditor.et.yaml +++ b/src/translations/auditor.et.yaml @@ -7,8 +7,10 @@ audit: most_recent: (hiljuti lisatud eespool) entry_title: Vaatle kõiki selle transaktsiooni toiminguid property: Rekvisiit + extra_field: Extra rekvisiit old_value: Vana väärtus new_value: Uus väärtus + value: Väärtus transaction: Transaktsioon entity_per_entity: (kirje kaupa) operations_count: '%count% operation(s)' diff --git a/src/translations/auditor.fr.yaml b/src/translations/auditor.fr.yaml index 1ad38c3b..71dcf23c 100644 --- a/src/translations/auditor.fr.yaml +++ b/src/translations/auditor.fr.yaml @@ -7,8 +7,10 @@ audit: most_recent: (le plus récent en premier) entry_title: Afficher toutes les opérations de cette transaction property: Attribut + extra_field: Extra attribut old_value: Ancienne valeur new_value: Nouvelle valeur + value: Valeur transaction: Transaction entity_per_entity: (entité par entité) operations_count: '%count% opération(s)' diff --git a/src/translations/auditor.it.yaml b/src/translations/auditor.it.yaml index 3d2e9929..7ae66cb9 100644 --- a/src/translations/auditor.it.yaml +++ b/src/translations/auditor.it.yaml @@ -7,8 +7,10 @@ audit: most_recent: (la più recente per prima) entry_title: Visualizza tutte le operazioni per una transazione property: Proprietà + extra_field: Extra Proprietà old_value: Vecchio valore new_value: Nuovo valore + value: Valore transaction: Transazione entity_per_entity: (entità per entità) operations_count: '%count% operation(s)' diff --git a/src/translations/auditor.nl.yaml b/src/translations/auditor.nl.yaml index f06c9dbc..7b77b856 100644 --- a/src/translations/auditor.nl.yaml +++ b/src/translations/auditor.nl.yaml @@ -7,8 +7,10 @@ audit: most_recent: (meest recente eerst) entry_title: Bekijk alle operaties binnen deze transactie property: Veld + extra_field: Extra veld old_value: Oude waarde new_value: Nieuwe waarde + value: Waarde transaction: Transactie entity_per_entity: (entiteit per entiteit) operations_count: '%count% bewerking(en)'