]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/EntryController.php
add new post form in material header
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / EntryController.php
index 29e0ffb0d9e37c1882ad8f5873c047434d8914e2..ef686ff1b7977a787486d6926ef1c4807c14b22b 100644 (file)
@@ -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.
      *