From 9dfd70f26736b141ec027e51ebc2192a1f3775d1 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 26 Feb 2022 20:58:53 +0100 Subject: [PATCH] backports murph-skeleton --- assets/css/admin.scss | 18 +++++++++++------- core/Controller/Admin/Crud/CrudController.php | 14 ++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/assets/css/admin.scss b/assets/css/admin.scss index 40bfaf3..9b9a739 100644 --- a/assets/css/admin.scss +++ b/assets/css/admin.scss @@ -163,8 +163,13 @@ tr.table-primary-light { .fa { font-size: 1.2rem; margin-right: 5px; - min-width: 30px; color: #fff; + width: 35px; + display: inline-block; + } + + .nav-item-label { + display: inline-block; } &.active { @@ -245,10 +250,10 @@ tr.table-primary-light { .nav-link { padding-left: 10px; - } - .nav-item-label { - display: none; + .nav-item-label { + display: none; + } } .sidebar-heading { @@ -490,9 +495,8 @@ fieldset.form-group { } } -th.crud-batch-column { - width: 20px !important; - max-width: 20px; +.table .crud-batch-column { + width: 1%; } form { diff --git a/core/Controller/Admin/Crud/CrudController.php b/core/Controller/Admin/Crud/CrudController.php index c6b223e..57f6688 100644 --- a/core/Controller/Admin/Crud/CrudController.php +++ b/core/Controller/Admin/Crud/CrudController.php @@ -68,9 +68,10 @@ abstract class CrudController extends AdminController $entityManager->create($entity); $this->addFlash('success', 'The data has been saved.'); - return $this->redirectToRoute($configuration->getPageRoute('edit'), [ - 'entity' => $entity->getId(), - ]); + return $this->redirectToRoute($configuration->getPageRoute('edit'), array_merge( + ['entity' => $entity->getId()], + $configuration->getPageRouteParams('edit') + )); } $this->addFlash('warning', 'The form is not valid.'); } @@ -111,9 +112,10 @@ abstract class CrudController extends AdminController $entityManager->update($entity); $this->addFlash('success', 'The data has been saved.'); - return $this->redirectToRoute($configuration->getPageRoute('edit'), [ - 'entity' => $entity->getId(), - ]); + return $this->redirectToRoute($configuration->getPageRoute('edit'), array_merge( + ['entity' => $entity->getId()], + $configuration->getPageRouteParams('edit') + )); } $this->addFlash('warning', 'The form is not valid.'); }