forked from wallabag/wallabag
Quickstart for beginners
This commit is contained in:
committed by
Nicolas Lœuillet
parent
0aafb8dfcb
commit
5c072d2b57
@ -166,6 +166,11 @@ class EntryController extends Controller
|
||||
*/
|
||||
public function showUnreadAction(Request $request, $page)
|
||||
{
|
||||
// load the quickstart if no entry in database
|
||||
if ($page == 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUsername($this->getUser()->getId()) == 0) {
|
||||
return $this->redirect($this->generateUrl('quickstart'));
|
||||
}
|
||||
|
||||
return $this->showEntries('unread', $request, $page);
|
||||
}
|
||||
|
||||
@ -211,7 +216,7 @@ class EntryController extends Controller
|
||||
*/
|
||||
private function showEntries($type, Request $request, $page)
|
||||
{
|
||||
$repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry');
|
||||
$repository = $this->get('wallabag_core.entry_repository');
|
||||
|
||||
switch ($type) {
|
||||
case 'starred':
|
||||
|
||||
@ -28,4 +28,15 @@ class StaticController extends Controller
|
||||
array()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/quickstart", name="quickstart")
|
||||
*/
|
||||
public function quickstartAction()
|
||||
{
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Static:quickstart.html.twig',
|
||||
array()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user