aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2020-04-26 14:09:16 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2020-04-26 14:09:16 +0200
commitfd30989a186db2a68afa1bd24b3cf39b8ce94ef3 (patch)
treeed662cd28d46fa213da35928a35f7e0cac41d3d9 /src
parentefea7a352f947a3632095d95a7dfbb07b8fd86c7 (diff)
downloadwallabag-with-annotations-route.tar.gz
wallabag-with-annotations-route.tar.zst
wallabag-with-annotations-route.zip
Enhanced tests and changed routewith-annotations-route
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php8
-rw-r--r--src/Wallabag/CoreBundle/Controller/ExportController.php4
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig8
-rw-r--r--src/Wallabag/CoreBundle/Twig/WallabagExtension.php2
6 files changed, 13 insertions, 13 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index 2c4b5536..13b23b61 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -240,13 +240,13 @@ class EntryController extends Controller
240 * 240 *
241 * @param int $page 241 * @param int $page
242 * 242 *
243 * @Route("/with_annotations/list/{page}", name="with_annotations", defaults={"page" = "1"}) 243 * @Route("/annotated/list/{page}", name="annotated", defaults={"page" = "1"})
244 * 244 *
245 * @return \Symfony\Component\HttpFoundation\Response 245 * @return \Symfony\Component\HttpFoundation\Response
246 */ 246 */
247 public function showWithAnnotationsEntriesAction(Request $request, $page) 247 public function showWithAnnotationsEntriesAction(Request $request, $page)
248 { 248 {
249 return $this->showEntries('with_annotations', $request, $page); 249 return $this->showEntries('annotated', $request, $page);
250 } 250 }
251 251
252 /** 252 /**
@@ -254,7 +254,7 @@ class EntryController extends Controller
254 * 254 *
255 * @param string $type 255 * @param string $type
256 * 256 *
257 * @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|with_annotations|all"}) 257 * @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|annotated|all"})
258 * 258 *
259 * @return \Symfony\Component\HttpFoundation\RedirectResponse 259 * @return \Symfony\Component\HttpFoundation\RedirectResponse
260 */ 260 */
@@ -517,7 +517,7 @@ class EntryController extends Controller
517 case 'archive': 517 case 'archive':
518 $qb = $repository->getBuilderForArchiveByUser($this->getUser()->getId()); 518 $qb = $repository->getBuilderForArchiveByUser($this->getUser()->getId());
519 break; 519 break;
520 case 'with_annotations': 520 case 'annotated':
521 $qb = $repository->getBuilderForAnnotationsByUser($this->getUser()->getId()); 521 $qb = $repository->getBuilderForAnnotationsByUser($this->getUser()->getId());
522 break; 522 break;
523 case 'unread': 523 case 'unread':
diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php
index 8517e7a9..55b94f0a 100644
--- a/src/Wallabag/CoreBundle/Controller/ExportController.php
+++ b/src/Wallabag/CoreBundle/Controller/ExportController.php
@@ -47,7 +47,7 @@ class ExportController extends Controller
47 * 47 *
48 * @Route("/export/{category}.{format}", name="export_entries", requirements={ 48 * @Route("/export/{category}.{format}", name="export_entries", requirements={
49 * "format": "epub|mobi|pdf|json|xml|txt|csv", 49 * "format": "epub|mobi|pdf|json|xml|txt|csv",
50 * "category": "all|unread|starred|archive|tag_entries|untagged|search|with_annotations" 50 * "category": "all|unread|starred|archive|tag_entries|untagged|search|annotated"
51 * }) 51 * })
52 * 52 *
53 * @return \Symfony\Component\HttpFoundation\Response 53 * @return \Symfony\Component\HttpFoundation\Response
@@ -80,7 +80,7 @@ class ExportController extends Controller
80 ->getResult(); 80 ->getResult();
81 81
82 $title = 'Search ' . $searchTerm; 82 $title = 'Search ' . $searchTerm;
83 } elseif ('with_annotations' === $category) { 83 } elseif ('annotated' === $category) {
84 $entries = $repository->getBuilderForAnnotationsByUser( 84 $entries = $repository->getBuilderForAnnotationsByUser(
85 $this->getUser()->getId() 85 $this->getUser()->getId()
86 )->getQuery() 86 )->getQuery()
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 9f25ad4c..dab84635 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -535,7 +535,7 @@ class EntryRepository extends EntityRepository
535 $qb->leftJoin('e.tags', 't'); 535 $qb->leftJoin('e.tags', 't');
536 $qb->andWhere('t.id is null'); 536 $qb->andWhere('t.id is null');
537 break; 537 break;
538 case 'with_annotations': 538 case 'annotated':
539 $qb->leftJoin('e.annotations', 'a'); 539 $qb->leftJoin('e.annotations', 'a');
540 $qb->andWhere('a.id is not null'); 540 $qb->andWhere('a.id is not null');
541 break; 541 break;
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig
index d93e5a67..ffb070cb 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig
@@ -12,7 +12,7 @@
12 {{ 'entry.page_titles.filtered_tags'|trans }} {{ filter }} 12 {{ 'entry.page_titles.filtered_tags'|trans }} {{ filter }}
13{% elseif currentRoute == 'untagged' %} 13{% elseif currentRoute == 'untagged' %}
14 {{ 'entry.page_titles.untagged'|trans }} 14 {{ 'entry.page_titles.untagged'|trans }}
15{% elseif currentRoute == 'with_annotations' %} 15{% elseif currentRoute == 'annotated' %}
16 {{ 'entry.page_titles.with_annotations'|trans }} 16 {{ 'entry.page_titles.with_annotations'|trans }}
17{% else %} 17{% else %}
18 {{ 'entry.page_titles.unread'|trans }} 18 {{ 'entry.page_titles.unread'|trans }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
index 6c4ae40b..e726db5a 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -40,8 +40,8 @@
40 {% set activeRoute = null %} 40 {% set activeRoute = null %}
41 {% if currentRoute == 'all' or currentRouteFromQueryParams == 'all' %} 41 {% if currentRoute == 'all' or currentRouteFromQueryParams == 'all' %}
42 {% set activeRoute = 'all' %} 42 {% set activeRoute = 'all' %}
43 {% elseif currentRoute == 'with_annotations' or currentRouteFromQueryParams == 'with_annotations' %} 43 {% elseif currentRoute == 'annotated' or currentRouteFromQueryParams == 'annotated' %}
44 {% set activeRoute = 'with_annotations' %} 44 {% set activeRoute = 'annotated' %}
45 {% elseif currentRoute == 'archive' or currentRouteFromQueryParams == 'archive' %} 45 {% elseif currentRoute == 'archive' or currentRouteFromQueryParams == 'archive' %}
46 {% set activeRoute = 'archive' %} 46 {% set activeRoute = 'archive' %}
47 {% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %} 47 {% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %}
@@ -61,8 +61,8 @@
61 <li class="bold {% if activeRoute == 'archive' %}active{% endif %}"> 61 <li class="bold {% if activeRoute == 'archive' %}active{% endif %}">
62 <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a> 62 <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a>
63 </li> 63 </li>
64 <li class="bold {% if activeRoute == 'with_annotations' %}active{% endif %}"> 64 <li class="bold {% if activeRoute == 'annotated' %}active{% endif %}">
65 <a class="waves-effect" href="{{ path('with_annotations') }}">{{ 'menu.left.with_annotations'|trans }} <span class="numberItems grey-text">{{ count_entries('with_annotations') }}</span></a> 65 <a class="waves-effect" href="{{ path('annotated') }}">{{ 'menu.left.with_annotations'|trans }} <span class="numberItems grey-text">{{ count_entries('annotated') }}</span></a>
66 </li> 66 </li>
67 <li class="bold {% if activeRoute == 'all' %}active{% endif %}"> 67 <li class="bold {% if activeRoute == 'all' %}active{% endif %}">
68 <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a> 68 <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a>
diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
index e0f67375..64f54bfb 100644
--- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
+++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
@@ -94,7 +94,7 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface
94 case 'unread': 94 case 'unread':
95 $qb = $this->entryRepository->getBuilderForUnreadByUser($user->getId()); 95 $qb = $this->entryRepository->getBuilderForUnreadByUser($user->getId());
96 break; 96 break;
97 case 'with_annotations': 97 case 'annotated':
98 $qb = $this->entryRepository->getBuilderForAnnotationsByUser($user->getId()); 98 $qb = $this->entryRepository->getBuilderForAnnotationsByUser($user->getId());
99 break; 99 break;
100 case 'all': 100 case 'all':