mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-22 17:18:37 +00:00
Added route to list entries with annotations
This commit is contained in:
parent
9a6146d2ef
commit
dce50ddb79
23 changed files with 143 additions and 4 deletions
|
@ -277,12 +277,26 @@ class EntryController extends Controller
|
|||
return $this->showEntries('untagged', $request, $page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows entries with annotations for current user.
|
||||
*
|
||||
* @param int $page
|
||||
*
|
||||
* @Route("/with_annotations/list/{page}", name="with_annotations", defaults={"page" = "1"})
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function showWithAnnotationsEntriesAction(Request $request, $page)
|
||||
{
|
||||
return $this->showEntries('with_annotations', $request, $page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows random entry depending on the given type.
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|all"})
|
||||
* @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|with_annotations|all"})
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
*/
|
||||
|
@ -563,6 +577,9 @@ class EntryController extends Controller
|
|||
$qb = $repository->getBuilderForArchiveByUser($this->getUser()->getId());
|
||||
$formOptions['filter_archived'] = true;
|
||||
break;
|
||||
case 'with_annotations':
|
||||
$qb = $repository->getBuilderForAnnotationsByUser($this->getUser()->getId());
|
||||
break;
|
||||
case 'unread':
|
||||
$qb = $repository->getBuilderForUnreadByUser($this->getUser()->getId());
|
||||
$formOptions['filter_unread'] = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue