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

article view, fav list, archive list

This commit is contained in:
Nicolas Lœuillet 2015-01-22 21:11:22 +01:00
parent 9d50517cea
commit bd9f08157c
7 changed files with 232 additions and 29 deletions

View file

@ -11,7 +11,7 @@ class EntryController extends Controller
/**
* @Route("/unread", name="unread")
*/
public function unreadAction()
public function showUnreadAction()
{
$repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
$entries = $repository->findUnreadByUser(1);
@ -22,4 +22,49 @@ class EntryController extends Controller
);
}
/**
* @Route("/archive", name="archive")
*/
public function showArchiveAction()
{
$repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
$entries = $repository->findArchiveByUser(1);
return $this->render(
'WallabagBundle:Entry:entries.html.twig',
array('entries' => $entries)
);
}
/**
* @Route("/starred", name="starred")
*/
public function showStarredAction()
{
$repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
$entries = $repository->findStarredByUser(1);
return $this->render(
'WallabagBundle:Entry:entries.html.twig',
array('entries' => $entries)
);
}
/**
* @Route("/view/{id}", requirements={"id" = "\d+"}, name="view")
*/
public function viewAction($id)
{
$repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
$entry = $repository->find($id);
return $this->render(
'WallabagBundle:Entry:entry.html.twig',
array('entry' => $entry)
);
}
}