mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-16 18:01:38 +00:00
Added button to show entries with the same domain
This commit is contained in:
parent
84dcaaaea9
commit
890c7d0bfa
11 changed files with 64 additions and 5 deletions
|
@ -517,6 +517,20 @@ class EntryController extends Controller
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* List the entries with the same domain as the current one.
|
||||
*
|
||||
* @param int $page
|
||||
*
|
||||
* @Route("/domain/{id}/{page}", requirements={"id" = ".+"}, defaults={"page" = 1}, name="same_domain")
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function getSameDomainEntries(Request $request, $page = 1)
|
||||
{
|
||||
return $this->showEntries('same-domain', $request, $page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Global method to retrieve entries depending on the given type
|
||||
* It returns the response to be send.
|
||||
|
@ -553,6 +567,9 @@ class EntryController extends Controller
|
|||
$qb = $repository->getBuilderForUnreadByUser($this->getUser()->getId());
|
||||
$formOptions['filter_unread'] = true;
|
||||
break;
|
||||
case 'same-domain':
|
||||
$qb = $repository->getBuilderForSameDomainByUser($this->getUser()->getId(), $request->get('id'));
|
||||
break;
|
||||
case 'all':
|
||||
$qb = $repository->getBuilderForAllByUser($this->getUser()->getId());
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue