diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 1 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/TagController.php | 21 |
2 files changed, 3 insertions, 19 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 845ebef6..3dcfbebe 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -573,6 +573,7 @@ class EntryController extends Controller | |||
573 | 'entries' => $entries, | 573 | 'entries' => $entries, |
574 | 'currentPage' => $page, | 574 | 'currentPage' => $page, |
575 | 'searchTerm' => $searchTerm, | 575 | 'searchTerm' => $searchTerm, |
576 | 'isFiltered' => $form->isSubmitted(), | ||
576 | ] | 577 | ] |
577 | ); | 578 | ); |
578 | } | 579 | } |
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index f2ca58c6..be2dff98 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php | |||
@@ -84,28 +84,11 @@ class TagController extends Controller | |||
84 | */ | 84 | */ |
85 | public function showTagAction() | 85 | public function showTagAction() |
86 | { | 86 | { |
87 | $repository = $this->get('wallabag_core.entry_repository'); | ||
88 | $tags = $this->get('wallabag_core.tag_repository') | 87 | $tags = $this->get('wallabag_core.tag_repository') |
89 | ->findAllTags($this->getUser()->getId()); | 88 | ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); |
90 | |||
91 | $flatTags = []; | ||
92 | |||
93 | foreach ($tags as $tag) { | ||
94 | $nbEntries = $repository->countAllEntriesByUserIdAndTagId( | ||
95 | $this->getUser()->getId(), | ||
96 | $tag->getId() | ||
97 | ); | ||
98 | |||
99 | $flatTags[] = [ | ||
100 | 'id' => $tag->getId(), | ||
101 | 'label' => $tag->getLabel(), | ||
102 | 'slug' => $tag->getSlug(), | ||
103 | 'nbEntries' => $nbEntries, | ||
104 | ]; | ||
105 | } | ||
106 | 89 | ||
107 | return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [ | 90 | return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [ |
108 | 'tags' => $flatTags, | 91 | 'tags' => $tags, |
109 | ]); | 92 | ]); |
110 | } | 93 | } |
111 | 94 | ||