From 053b9568b2e3d032720d405bc1c2b71eccb36714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 12 Aug 2015 08:22:30 +0200 Subject: add new post form in material header --- src/Wallabag/CoreBundle/Controller/EntryController.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php') diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 29e0ffb0..ef686ff1 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -15,11 +15,11 @@ class EntryController extends Controller /** * @param Request $request * - * @Route("/new", name="new_entry") + * @Route("/new-entry", name="new_entry") * * @return \Symfony\Component\HttpFoundation\Response */ - public function addEntryAction(Request $request) + public function addEntryFormAction(Request $request) { $entry = new Entry($this->getUser()); @@ -45,11 +45,23 @@ class EntryController extends Controller return $this->redirect($this->generateUrl('homepage')); } - return $this->render('WallabagCoreBundle:Entry:new.html.twig', array( + return $this->render('WallabagCoreBundle:Entry:new_form.html.twig', array( 'form' => $form->createView(), )); } + /** + * @param Request $request + * + * @Route("/new", name="new") + * + * @return \Symfony\Component\HttpFoundation\Response + */ + public function addEntryAction(Request $request) + { + return $this->render('WallabagCoreBundle:Entry:new.html.twig'); + } + /** * Edit an entry content. * -- cgit v1.2.3