mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 11:31:05 +00:00
parent
ba9fee0855
commit
2a007fe43d
4 changed files with 3 additions and 21 deletions
|
@ -81,7 +81,7 @@ class TagController extends Controller
|
|||
{
|
||||
$tags = $this->getDoctrine()
|
||||
->getRepository('WallabagCoreBundle:Tag')
|
||||
->findTags($this->getUser()->getId());
|
||||
->findAllTags($this->getUser()->getId());
|
||||
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Tag:tags.html.twig',
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
namespace Wallabag\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
class TagRepository extends EntityRepository
|
||||
{
|
||||
|
@ -22,22 +20,6 @@ class TagRepository extends EntityRepository
|
|||
->where('e.user = :userId')->setParameter('userId', $userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find Tags and return a Pager.
|
||||
*
|
||||
* @param int $userId
|
||||
*
|
||||
* @return Pagerfanta
|
||||
*/
|
||||
public function findTags($userId)
|
||||
{
|
||||
$qb = $this->getQbForAllTags($userId);
|
||||
|
||||
$pagerAdapter = new DoctrineORMAdapter($qb);
|
||||
|
||||
return new Pagerfanta($pagerAdapter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find Tags.
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
{% block content %}
|
||||
<div class="results">
|
||||
<div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div>
|
||||
<div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
{% block content %}
|
||||
<div class="results clearfix">
|
||||
<div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div>
|
||||
<div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
|
||||
</div>
|
||||
<br />
|
||||
<ul class="row data">
|
||||
|
|
Loading…
Reference in a new issue