mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 18:34:32 +02:00
Show and link which log entry was undone/reverted on log detail page
This commit is contained in:
parent
47ef8e9568
commit
5a3fc0fb43
2 changed files with 6 additions and 2 deletions
|
@ -131,9 +131,9 @@ class LogEntryExtraFormatter
|
|||
|
||||
if (($context instanceof LogWithEventUndoInterface) && $context->isUndoEvent()) {
|
||||
if ('undo' === $context->getUndoMode()) {
|
||||
$array['log.undo_mode.undo'] = (string) $context->getUndoEventID();
|
||||
$array['log.undo_mode.undo'] = '#' . $context->getUndoEventID();
|
||||
} elseif ('revert' === $context->getUndoMode()) {
|
||||
$array['log.undo_mode.revert'] = (string) $context->getUndoEventID();
|
||||
$array['log.undo_mode.revert'] = '#' . $context->getUndoEventID();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
{% if log_entry.type == 'part_stock_changed' %}
|
||||
({{ ('log.part_stock_changed.' ~ log_entry.instockChangeType)|trans }})
|
||||
{% endif %}
|
||||
|
||||
{% if log_entry is instanceof('App\\Entity\\Contracts\\LogWithEventUndoInterface') and log_entry.undoEvent %}
|
||||
<b>({{ ('log.undo_mode.' ~ log_entry.undoMode)|trans }}: <a href="{{ path('log_details', {"id": log_entry.UndoEventID}) }}">#{{ log_entry.UndoEventID }}</a>)</b>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue