Ergänzt AJAX-Livesuche für Seiten, Beiträge und Mediathek
CMS quality / php (8.2) (push) Canceled after 0s
CMS quality / php (8.4) (push) Canceled after 0s
CMS quality / browser (push) Canceled after 0s
CMS quality / mysql (push) Canceled after 0s

This commit is contained in:
kantarci committed 2026-09-14 11:09:24 +02:00
1 parent 11b60fc5d8
commit 41d87f62a4
20 files changed
+703 -311

No files matched your search

+11 -2
View File
@@ -54,14 +54,23 @@ final class EditorController extends AbstractController
}
unset($page);
return $this->render('admin/pages.html.twig', [
$view = [
'pages' => 'trash' === $status ? [] : $pages,
'trash' => 'trash' === $status ? array_map(static fn (array $p): array => [...$p, 'deletedAt' => $p['deleted_at']], $pages) : [],
'parentChoices' => $parentChoices, 'postLayouts' => PostLayouts::all(),
'contentType' => $type, 'result' => $result, 'query' => $query, 'status' => $status,
'listRoute' => 'post' === $type ? 'admin_posts' : 'admin_pages',
'areaChoices' => ['header' => $this->partials->choices('header'), 'footer' => $this->partials->choices('footer')],
]);
];
if ($request->isXmlHttpRequest()) {
return $this->json([
'html' => $this->renderView('admin/content-results.html.twig', $view),
'total' => $result['total'],
'parameters' => ['q' => $query, 'status' => $status, 'limit' => $result['limit'], 'seite' => $result['page']],
]);
}
return $this->render('admin/pages.html.twig', $view);
}
#[Route('/api/content-choices', name: 'admin_content_choices', methods: ['GET'])]