diff --git a/app/src/Web/Controller/Admin/CategoriesController.php b/app/src/Web/Controller/Admin/CategoriesController.php index 0b223afd..34948c92 100644 --- a/app/src/Web/Controller/Admin/CategoriesController.php +++ b/app/src/Web/Controller/Admin/CategoriesController.php @@ -40,6 +40,7 @@ public function create(Request $request): string // 初期表示時 if (!$request->get('category') || !$request->isValidSig()) { + $this->set('show_category_list', true); return "admin/categories/create.twig"; } diff --git a/app/twig_templates/admin/categories/create.twig b/app/twig_templates/admin/categories/create.twig index 15f822db..81606a16 100644 --- a/app/twig_templates/admin/categories/create.twig +++ b/app/twig_templates/admin/categories/create.twig @@ -43,7 +43,7 @@ {% endif %} - {% if not req.get('category') %} + {% if show_category_list %}