mirror of
https://github.com/wallabag/wallabag.git
synced 2025-02-17 11:15:16 +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()
|
$tags = $this->getDoctrine()
|
||||||
->getRepository('WallabagCoreBundle:Tag')
|
->getRepository('WallabagCoreBundle:Tag')
|
||||||
->findTags($this->getUser()->getId());
|
->findAllTags($this->getUser()->getId());
|
||||||
|
|
||||||
return $this->render(
|
return $this->render(
|
||||||
'WallabagCoreBundle:Tag:tags.html.twig',
|
'WallabagCoreBundle:Tag:tags.html.twig',
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
namespace Wallabag\CoreBundle\Repository;
|
namespace Wallabag\CoreBundle\Repository;
|
||||||
|
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
|
||||||
use Pagerfanta\Pagerfanta;
|
|
||||||
|
|
||||||
class TagRepository extends EntityRepository
|
class TagRepository extends EntityRepository
|
||||||
{
|
{
|
||||||
|
@ -22,22 +20,6 @@ class TagRepository extends EntityRepository
|
||||||
->where('e.user = :userId')->setParameter('userId', $userId);
|
->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.
|
* Find Tags.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="results">
|
<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>
|
</div>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="results clearfix">
|
<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>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<ul class="row data">
|
<ul class="row data">
|
||||||
|
|
Loading…
Reference in a new issue