Skip to content

Commit 6142f9a

Browse files
committed
Add extra fields and indices to audit tables, based on configuration DamienHarper/auditor#61
1 parent 2ee34eb commit 6142f9a

File tree

8 files changed

+50
-0
lines changed

8 files changed

+50
-0
lines changed

Diff for: src/Resources/views/Audit/entry.html.twig

+36
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,42 @@
8383
</div>
8484
{% endif %}
8585

86+
<div class="mt-2 flex flex-col">
87+
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
88+
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
89+
<div class="overflow-hidden border border-gray-200 sm:rounded group-hover:border-blue-200 transition-all duration-300">
90+
<table class="min-w-full divide-y divide-gray-200">
91+
<thead class="bg-gray-50">
92+
<tr>
93+
<th scope="col" class="px-3 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-1/3">
94+
{% trans from 'auditor' %}audit.audit_details.extra_field{% endtrans %}
95+
</th>
96+
<th scope="col" class="px-3 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-2/3">
97+
{% trans from 'auditor' %}audit.audit_details.value{% endtrans %}
98+
</th>
99+
</tr>
100+
</thead>
101+
<tbody class="divide-y divide-gray-200">
102+
{% set extraFields = entry.getExtraField() %}
103+
{% for key, value in extraFields %}
104+
<tr class="bg-white">
105+
<td class="px-3 py-1 whitespace-nowrap text-sm font-medium text-gray-900">
106+
<code class="text-gray-700">{{ key }}</code>
107+
</td>
108+
<td class="px-3 py-1 whitespace-nowrap text-sm text-gray-500">
109+
{% if value is not null %}
110+
<span class="text-blue-500">{{ helper.dump(value) }}</span>
111+
{% endif %}
112+
</td>
113+
</tr>
114+
{% endfor %}
115+
</tbody>
116+
</table>
117+
</div>
118+
</div>
119+
</div>
120+
</div>
121+
86122
{% if entry.getTransactionHash() is not empty %}
87123
<div class="text-right">
88124
<a class="text-xs text-gray-500 hover:text-blue-500 transition-all duration-300" href="{{ path('dh_auditor_show_transaction', {hash: entry.getTransactionHash()}) }}" title="{% trans from 'auditor' %}audit.audit_details.entry_title{% endtrans %}">

Diff for: src/translations/auditor.de.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ audit:
77
most_recent: (neueste zuerst)
88
entry_title: Alle Operationen dieser Transaktion anzeigen
99
property: Eigenschaft
10+
extra_field: Extra eigenschaft
1011
old_value: Alter Wert
1112
new_value: Neuer Wert
13+
value: Wert
1214
transaction: Transaktion
1315
entity_per_entity: (Objekt pro Objekt)
1416
operations_count: '%count% Operation(en)'

Diff for: src/translations/auditor.en.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ audit:
77
most_recent: (most recent first)
88
entry_title: View all operations within this transaction
99
property: Attribute
10+
extra_field: Extra attribute
1011
old_value: Old value
1112
new_value: New value
13+
value: Value
1214
transaction: Transaction
1315
entity_per_entity: (entity per entity)
1416
operations_count: '%count% operation(s)'

Diff for: src/translations/auditor.es.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ audit:
77
most_recent: (el más reciente primero)
88
entry_title: Ver todas las operaciones dentro de esta transacción
99
property: Propiedad
10+
extra_field: Extra propiedad
1011
old_value: Viejo valor
1112
new_value: Nuevo valor
13+
value: Valor
1214
transaction: Transacción
1315
entity_per_entity: (entidad por entidad)
1416
operations_count: '%count% registro(s)'

Diff for: src/translations/auditor.et.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ audit:
77
most_recent: (hiljuti lisatud eespool)
88
entry_title: Vaatle kõiki selle transaktsiooni toiminguid
99
property: Rekvisiit
10+
extra_field: Extra rekvisiit
1011
old_value: Vana väärtus
1112
new_value: Uus väärtus
13+
value: Väärtus
1214
transaction: Transaktsioon
1315
entity_per_entity: (kirje kaupa)
1416
operations_count: '%count% operation(s)'

Diff for: src/translations/auditor.fr.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ audit:
77
most_recent: (le plus récent en premier)
88
entry_title: Afficher toutes les opérations de cette transaction
99
property: Attribut
10+
extra_field: Extra attribut
1011
old_value: Ancienne valeur
1112
new_value: Nouvelle valeur
13+
value: Valeur
1214
transaction: Transaction
1315
entity_per_entity: (entité par entité)
1416
operations_count: '%count% opération(s)'

Diff for: src/translations/auditor.it.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ audit:
77
most_recent: (la più recente per prima)
88
entry_title: Visualizza tutte le operazioni per una transazione
99
property: Proprietà
10+
extra_field: Extra Proprietà
1011
old_value: Vecchio valore
1112
new_value: Nuovo valore
13+
value: Valore
1214
transaction: Transazione
1315
entity_per_entity: (entità per entità)
1416
operations_count: '%count% operation(s)'

Diff for: src/translations/auditor.nl.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ audit:
77
most_recent: (meest recente eerst)
88
entry_title: Bekijk alle operaties binnen deze transactie
99
property: Veld
10+
extra_field: Extra veld
1011
old_value: Oude waarde
1112
new_value: Nieuwe waarde
13+
value: Waarde
1214
transaction: Transactie
1315
entity_per_entity: (entiteit per entiteit)
1416
operations_count: '%count% bewerking(en)'

0 commit comments

Comments
 (0)