Links on each tag in Tags view

This commit is contained in:
Nicolas Lœuillet
2016-04-14 15:03:22 +02:00
committed by Jeremy Benoist
parent 79efca1e6f
commit 891456ba9a
7 changed files with 88 additions and 6 deletions

View File

@ -4,7 +4,6 @@ namespace Wallabag\CoreBundle\Controller;
use Pagerfanta\Adapter\DoctrineORMAdapter;
use Pagerfanta\Exception\OutOfRangeCurrentPageException;
use Pagerfanta\Pagerfanta;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
@ -257,9 +256,10 @@ class EntryController extends Controller
}
$pagerAdapter = new DoctrineORMAdapter($qb->getQuery());
$entries = new Pagerfanta($pagerAdapter);
$entries->setMaxPerPage($this->getUser()->getConfig()->getItemsPerPage());
$entries = $this->get('wallabag_core.helper.prepare_pager_for_entries')
->prepare($pagerAdapter, $page);
try {
$entries->setCurrentPage($page);
} catch (OutOfRangeCurrentPageException $e) {