From b3c62f4be5593fbfebd9000f4e59b3d2b2bd2b32 Mon Sep 17 00:00:00 2001 From: Guillaume Manen Date: Wed, 4 Jun 2014 10:26:35 +0200 Subject: [PATCH] Revert "Fix 68" This reverts commit 33b76c8aa7ecd8c3f9450f4386a946063116cb06. --- Controller/CrudController.php | 13 ++++------- Resources/views/base.list.html.twig | 34 ++++++++++++++--------------- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/Controller/CrudController.php b/Controller/CrudController.php index b673f69..cbab55c 100644 --- a/Controller/CrudController.php +++ b/Controller/CrudController.php @@ -276,8 +276,7 @@ protected function doIndex() Query::HINT_CUSTOM_OUTPUT_WALKER, 'Gedmo\Translatable\Query\TreeWalker\TranslationWalker' ) - // ->getResult() - ; + ->getResult(); return $this->renderIndex($query); } @@ -477,8 +476,8 @@ protected function addSuccessFlash($message, $route = null) 'heading' => 'Success!', 'message' => $this->getTranslator()->trans($message, array('%entity%' => $this->getEntityName())), 'actions' => $actions + ) ) - ) ); } @@ -497,16 +496,12 @@ protected function handleSuccessResponse($action, $entity = null) * * @param object $entity entity */ - protected function prePersist($entity, $action) - { - } + protected function prePersist($entity, $action) {} /** * Post flush entity * * @param object $entity entity */ - protected function postFlush($entity, $action) - { - } + protected function postFlush($entity, $action) {} } diff --git a/Resources/views/base.list.html.twig b/Resources/views/base.list.html.twig index c66a425..db705d6 100644 --- a/Resources/views/base.list.html.twig +++ b/Resources/views/base.list.html.twig @@ -17,14 +17,14 @@
- - {% for attr, field in list_fields %} - - {% endfor %} - {% if actions|length > 0 %} - - {% endif %} - + + {% for attr, field in list_fields %} + + {% endfor %} + {% if actions|length > 0 %} + + {% endif %} + {% for item in list_items %} @@ -33,15 +33,15 @@ {% endfor %} {% block action_buttons %} - {% if actions|length > 0 %} - - {% endif %} + {% if actions|length > 0 %} + + {% endif %} {% endblock %} {% endfor %}
{{ field|trans }}Actions
{{ field | trans }}Actions
{{ attribute(item, attr)|nl2br }} -
- {% for action in actions %} - - {% endfor %} -
-
+
+ {% for action in actions %} + + {% endfor %} +
+