mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 04:08:57 +02:00
Allow to show collection elements that were deleted before by timetravel
This commit is contained in:
parent
b5bc096972
commit
f604022e49
9 changed files with 386 additions and 78 deletions
|
@ -96,16 +96,6 @@ class PartController extends AbstractController
|
|||
{
|
||||
$this->denyAccessUnlessGranted('read', $part);
|
||||
|
||||
$table = $dataTable->createFromType(LogDataTable::class, [
|
||||
'filter_elements' => $historyHelper->getAssociatedElements($part),
|
||||
'mode' => 'element_history'
|
||||
], ['pageLength' => 10])
|
||||
->handleRequest($request);
|
||||
|
||||
if ($table->isCallback()) {
|
||||
return $table->getResponse();
|
||||
}
|
||||
|
||||
$timeTravel_timestamp = null;
|
||||
if ($timestamp !== null) {
|
||||
//If the timestamp only contains numbers interpret it as unix timestamp
|
||||
|
@ -118,6 +108,16 @@ class PartController extends AbstractController
|
|||
$timeTravel->revertEntityToTimestamp($part, $timeTravel_timestamp);
|
||||
}
|
||||
|
||||
$table = $dataTable->createFromType(LogDataTable::class, [
|
||||
'filter_elements' => $historyHelper->getAssociatedElements($part),
|
||||
'mode' => 'element_history'
|
||||
], ['pageLength' => 10])
|
||||
->handleRequest($request);
|
||||
|
||||
if ($table->isCallback()) {
|
||||
return $table->getResponse();
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
'Parts/info/show_part_info.html.twig',
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue