From 10dae97b784fcb0313d1d3237318153ecc5425e6 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 6 Dec 2023 04:09:43 +0200 Subject: [PATCH] fix room search form --- src/Controller/RoomController.php | 6 ++++-- templates/default/module/room.html.twig | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Controller/RoomController.php b/src/Controller/RoomController.php index f349cbd..2f86e63 100644 --- a/src/Controller/RoomController.php +++ b/src/Controller/RoomController.php @@ -19,12 +19,14 @@ class RoomController extends AbstractController 'GET' ] )] - public function index(): Response + public function index( + ?Request $request + ): Response { return $this->redirectToRoute( 'room_namespace', [ - 'namespace' => $this->getParameter('app.kevacoin.room.namespace.default') + 'namespace' => $request->get('namespace') ? $request->get('namespace') : $this->getParameter('app.kevacoin.room.namespace.default') ] ); } diff --git a/templates/default/module/room.html.twig b/templates/default/module/room.html.twig index 9c6d9b1..3c64fb4 100644 --- a/templates/default/module/room.html.twig +++ b/templates/default/module/room.html.twig @@ -1,4 +1,4 @@ -
+
{% if list %}