Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra fields and indices to audit tables, based on configuration (see: #61) #378

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/Resources/views/Audit/entry.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,42 @@
</div>
{% endif %}

<div class="mt-2 flex flex-col">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div class="overflow-hidden border border-gray-200 sm:rounded group-hover:border-blue-200 transition-all duration-300">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-3 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-1/3">
{% trans from 'auditor' %}audit.audit_details.extra_field{% endtrans %}
</th>
<th scope="col" class="px-3 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-2/3">
{% trans from 'auditor' %}audit.audit_details.value{% endtrans %}
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
{% set extraFields = entry.getExtraField() %}
{% for key, value in extraFields %}
<tr class="bg-white">
<td class="px-3 py-1 whitespace-nowrap text-sm font-medium text-gray-900">
<code class="text-gray-700">{{ key }}</code>
</td>
<td class="px-3 py-1 whitespace-nowrap text-sm text-gray-500">
{% if value is not null %}
<span class="text-blue-500">{{ helper.dump(value) }}</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>

{% if entry.getTransactionHash() is not empty %}
<div class="text-right">
<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 %}">
Expand Down
2 changes: 2 additions & 0 deletions src/translations/auditor.de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
2 changes: 2 additions & 0 deletions src/translations/auditor.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
2 changes: 2 additions & 0 deletions src/translations/auditor.es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
2 changes: 2 additions & 0 deletions src/translations/auditor.et.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
2 changes: 2 additions & 0 deletions src/translations/auditor.fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
2 changes: 2 additions & 0 deletions src/translations/auditor.it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
2 changes: 2 additions & 0 deletions src/translations/auditor.nl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down