From ad51743e8bd15782a25c5e717c87786d34091ce3 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 2 Sep 2018 16:43:49 +0200 Subject: Show untagged entries count on tag list Closes #3235 Signed-off-by: Kevin Decherf --- src/Wallabag/CoreBundle/Controller/TagController.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Wallabag/CoreBundle/Controller') diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index d0155c60..bd50de7f 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -87,6 +87,8 @@ class TagController extends Controller { $tags = $this->get('wallabag_core.tag_repository') ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); + $untagged = $this->get('wallabag_core.entry_repository') + ->countUntaggedEntriesForUser($this->getUser()->getId()); $renameForms = []; foreach ($tags as $tag) { @@ -96,6 +98,7 @@ class TagController extends Controller return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [ 'tags' => $tags, 'renameForms' => $renameForms, + 'untagged' => $untagged, ]); } -- cgit v1.2.3 From 0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 5 Jun 2019 17:09:05 +0200 Subject: Fix typo & CS --- src/Wallabag/CoreBundle/Controller/TagController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Controller') diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index bd50de7f..91f34b3d 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -88,7 +88,7 @@ class TagController extends Controller $tags = $this->get('wallabag_core.tag_repository') ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); $untagged = $this->get('wallabag_core.entry_repository') - ->countUntaggedEntriesForUser($this->getUser()->getId()); + ->countUntaggedEntriesByUser($this->getUser()->getId()); $renameForms = []; foreach ($tags as $tag) { -- cgit v1.2.3 From 35c7819cb63a9c481a2b612755d881d24d6586d0 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 6 Jun 2019 13:34:20 +0200 Subject: Remove link when there are no untagged articles --- src/Wallabag/CoreBundle/Controller/TagController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle/Controller') diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index 91f34b3d..90d36d71 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -87,7 +87,7 @@ class TagController extends Controller { $tags = $this->get('wallabag_core.tag_repository') ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); - $untagged = $this->get('wallabag_core.entry_repository') + $nbEntriesUntagged = $this->get('wallabag_core.entry_repository') ->countUntaggedEntriesByUser($this->getUser()->getId()); $renameForms = []; @@ -98,7 +98,7 @@ class TagController extends Controller return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [ 'tags' => $tags, 'renameForms' => $renameForms, - 'untagged' => $untagged, + 'nbEntriesUntagged' => $nbEntriesUntagged, ]); } -- cgit v1.2.3