From 2c76f0fd894d63422ff34931842917a60dd2e110 Mon Sep 17 00:00:00 2001 From: Xbird Date: Thu, 15 Sep 2022 16:20:26 +0200 Subject: [PATCH] working --- src/Controller/AdminController.php | 9 +++------ templates/_cells/historyDisplay.html.twig | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Controller/AdminController.php b/src/Controller/AdminController.php index 650c7d0..5bd8928 100644 --- a/src/Controller/AdminController.php +++ b/src/Controller/AdminController.php @@ -677,9 +677,10 @@ class AdminController extends AbstractController return $response; } + #[Route('/watchdog', name: 'watchdog')] - #[Route('/watchdog/view/{id}', name: 'watchdog_view')] + #[Route('/watchdog/view/{type}/{id}/{action}', name: 'watchdog_view')] #[Route('/watchdog/{type}', name: 'watchdog_type')] #[Route('/watchdog/{type}/{action}', name: 'watchdog_type_action')] public function watchdog( @@ -690,10 +691,6 @@ class AdminController extends AbstractController string $action = null, int $id = null ): Response { - /** - * @var LogEntryRepository $logEntryRepository - */ - $logEntryRepository = $EntityManagerInterface->getRepository('Gedmo\Loggable\Entity\LogEntry'); $qb = $EntityManagerInterface->createQueryBuilder(); $qbButtons = $EntityManagerInterface->createQueryBuilder(); @@ -724,7 +721,7 @@ class AdminController extends AbstractController } if (null != $id) { - $qb->where('l.objectId = :id'); + $qb->andWhere('l.objectId = :id'); $qb->setParameter('id', $id); } diff --git a/templates/_cells/historyDisplay.html.twig b/templates/_cells/historyDisplay.html.twig index de4df31..e348a09 100644 --- a/templates/_cells/historyDisplay.html.twig +++ b/templates/_cells/historyDisplay.html.twig @@ -11,7 +11,7 @@ {% endif %}

{% if notype is not defined %} -

{{ i.objectClass }} (# {{ i.objectId }}) {% if is_granted('ROLE_ADMIN') %}{% endif %}

+

{{ i.objectClass }} (# {{ i.objectId }}) {% if is_granted('ROLE_ADMIN') %}{% endif %}

{% endif %}

{{ ('title_data_' ~ i.action)|trans }}