aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-05-02 21:32:47 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-05-02 21:32:47 +0200
commit2a007fe43d937043c2c41b011f98652bd6e138a7 (patch)
tree298b57a87da662306505adac14c5b15a81190fe2 /src/Wallabag
parentba9fee085597932f451741b47ad7013e7eb4323b (diff)
downloadwallabag-2a007fe43d937043c2c41b011f98652bd6e138a7.tar.gz
wallabag-2a007fe43d937043c2c41b011f98652bd6e138a7.tar.zst
wallabag-2a007fe43d937043c2c41b011f98652bd6e138a7.zip
Fix tags listing
Fix #1994 * Remove unused method in tag repository
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php2
-rw-r--r--src/Wallabag/CoreBundle/Repository/TagRepository.php18
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig2
4 files changed, 3 insertions, 21 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php
index 16d14d79..8645fb44 100644
--- a/src/Wallabag/CoreBundle/Controller/TagController.php
+++ b/src/Wallabag/CoreBundle/Controller/TagController.php
@@ -81,7 +81,7 @@ class TagController extends Controller
81 { 81 {
82 $tags = $this->getDoctrine() 82 $tags = $this->getDoctrine()
83 ->getRepository('WallabagCoreBundle:Tag') 83 ->getRepository('WallabagCoreBundle:Tag')
84 ->findTags($this->getUser()->getId()); 84 ->findAllTags($this->getUser()->getId());
85 85
86 return $this->render( 86 return $this->render(
87 'WallabagCoreBundle:Tag:tags.html.twig', 87 'WallabagCoreBundle:Tag:tags.html.twig',
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php
index afeb985b..c567317e 100644
--- a/src/Wallabag/CoreBundle/Repository/TagRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php
@@ -3,8 +3,6 @@
3namespace Wallabag\CoreBundle\Repository; 3namespace Wallabag\CoreBundle\Repository;
4 4
5use Doctrine\ORM\EntityRepository; 5use Doctrine\ORM\EntityRepository;
6use Pagerfanta\Adapter\DoctrineORMAdapter;
7use Pagerfanta\Pagerfanta;
8 6
9class TagRepository extends EntityRepository 7class TagRepository extends EntityRepository
10{ 8{
@@ -23,22 +21,6 @@ class TagRepository extends EntityRepository
23 } 21 }
24 22
25 /** 23 /**
26 * Find Tags and return a Pager.
27 *
28 * @param int $userId
29 *
30 * @return Pagerfanta
31 */
32 public function findTags($userId)
33 {
34 $qb = $this->getQbForAllTags($userId);
35
36 $pagerAdapter = new DoctrineORMAdapter($qb);
37
38 return new Pagerfanta($pagerAdapter);
39 }
40
41 /**
42 * Find Tags. 24 * Find Tags.
43 * 25 *
44 * @param int $userId 26 * @param int $userId
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
index dfc61751..bb0ca939 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
@@ -4,7 +4,7 @@
4 4
5{% block content %} 5{% block content %}
6 <div class="results"> 6 <div class="results">
7 <div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div> 7 <div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
8 </div> 8 </div>
9 9
10 <ul> 10 <ul>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
index 6b583689..6fd263d8 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
@@ -4,7 +4,7 @@
4 4
5{% block content %} 5{% block content %}
6 <div class="results clearfix"> 6 <div class="results clearfix">
7 <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div> 7 <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
8 </div> 8 </div>
9 <br /> 9 <br />
10 <ul class="row data"> 10 <ul class="row data">