]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/EntryController.php
Merge pull request #1319 from wallabag/v2-form-header
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / EntryController.php
index 8894690ced079e07c971dd8d7dba1567df28be08..6944a686e5d917a8feca04de5298aa6f68b95d72 100644 (file)
@@ -18,11 +18,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());
 
@@ -48,11 +48,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.
      *