1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-17 17:08:37 +00:00

add new post form in material header

This commit is contained in:
Nicolas Lœuillet 2015-08-12 08:22:30 +02:00 committed by Nicolas Lœuillet
parent fedaf00537
commit 053b9568b2
10 changed files with 66 additions and 52 deletions

View 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.
*