aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-08-26 16:55:41 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-08-28 14:44:00 +0200
commitb6520f0b15ac35215e2d94d16a31ea971874dce8 (patch)
treee2353f1c9ebd7164da8975a8620b7b6d7e91e9e1 /src/Wallabag/CoreBundle/Controller
parent8635ab1cd1ae90d7757a59444ef80759a040eccf (diff)
downloadwallabag-b6520f0b15ac35215e2d94d16a31ea971874dce8.tar.gz
wallabag-b6520f0b15ac35215e2d94d16a31ea971874dce8.tar.zst
wallabag-b6520f0b15ac35215e2d94d16a31ea971874dce8.zip
Add untagged entries
Fix #1631
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php19
-rw-r--r--src/Wallabag/CoreBundle/Controller/ExportController.php2
2 files changed, 20 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index d71ba6cd..624576b5 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -226,6 +226,10 @@ class EntryController extends Controller
226 $repository = $this->get('wallabag_core.entry_repository'); 226 $repository = $this->get('wallabag_core.entry_repository');
227 227
228 switch ($type) { 228 switch ($type) {
229 case 'untagged':
230 $qb = $repository->getBuilderForUntaggedByUser($this->getUser()->getId());
231
232 break;
229 case 'starred': 233 case 'starred':
230 $qb = $repository->getBuilderForStarredByUser($this->getUser()->getId()); 234 $qb = $repository->getBuilderForStarredByUser($this->getUser()->getId());
231 break; 235 break;
@@ -523,4 +527,19 @@ class EntryController extends Controller
523 ['entry' => $entry] 527 ['entry' => $entry]
524 ); 528 );
525 } 529 }
530
531 /**
532 * Shows untagged articles for current user.
533 *
534 * @param Request $request
535 * @param int $page
536 *
537 * @Route("/untagged/list/{page}", name="untagged", defaults={"page" = "1"})
538 *
539 * @return \Symfony\Component\HttpFoundation\Response
540 */
541 public function showUntaggedEntriesAction(Request $request, $page)
542 {
543 return $this->showEntries('untagged', $request, $page);
544 }
526} 545}
diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php
index 959b308d..6191d5d7 100644
--- a/src/Wallabag/CoreBundle/Controller/ExportController.php
+++ b/src/Wallabag/CoreBundle/Controller/ExportController.php
@@ -46,7 +46,7 @@ class ExportController extends Controller
46 * 46 *
47 * @Route("/export/{category}.{format}", name="export_entries", requirements={ 47 * @Route("/export/{category}.{format}", name="export_entries", requirements={
48 * "format": "epub|mobi|pdf|json|xml|txt|csv", 48 * "format": "epub|mobi|pdf|json|xml|txt|csv",
49 * "category": "all|unread|starred|archive|tag_entries" 49 * "category": "all|unread|starred|archive|tag_entries|untagged"
50 * }) 50 * })
51 * 51 *
52 * @return \Symfony\Component\HttpFoundation\Response 52 * @return \Symfony\Component\HttpFoundation\Response