diff --git a/app/config/security.yml b/app/config/security.yml index 50ae50492..5e74e82fb 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -69,11 +69,11 @@ security: - { path: ^/logout, roles: [IS_AUTHENTICATED_ANONYMOUSLY, IS_AUTHENTICATED_2FA_IN_PROGRESS] } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } - - { path: /(unread|starred|archive|with_annotations|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: /(unread|starred|archive|annotated|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/locale, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/feed, roles: IS_AUTHENTICATED_ANONYMOUSLY } - - { path: /(unread|starred|archive|with_annotations).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } # For backwards compatibility + - { path: /(unread|starred|archive|annotated).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } # For backwards compatibility - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/settings, roles: ROLE_SUPER_ADMIN } - { path: ^/annotations, roles: ROLE_USER } diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 4657d87ee..54ee6bf7e 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -282,13 +282,13 @@ class EntryController extends Controller * * @param int $page * - * @Route("/with_annotations/list/{page}", name="with_annotations", defaults={"page" = "1"}) + * @Route("/annotated/list/{page}", name="annotated", defaults={"page" = "1"}) * * @return \Symfony\Component\HttpFoundation\Response */ public function showWithAnnotationsEntriesAction(Request $request, $page) { - return $this->showEntries('with_annotations', $request, $page); + return $this->showEntries('annotated', $request, $page); } /** @@ -296,7 +296,7 @@ class EntryController extends Controller * * @param string $type * - * @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|with_annotations|all"}) + * @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|annotated|all"}) * * @return \Symfony\Component\HttpFoundation\RedirectResponse */ @@ -577,7 +577,7 @@ class EntryController extends Controller $qb = $repository->getBuilderForArchiveByUser($this->getUser()->getId()); $formOptions['filter_archived'] = true; break; - case 'with_annotations': + case 'annotated': $qb = $repository->getBuilderForAnnotationsByUser($this->getUser()->getId()); break; case 'unread': diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php index 360640648..2db335527 100644 --- a/src/Wallabag/CoreBundle/Controller/ExportController.php +++ b/src/Wallabag/CoreBundle/Controller/ExportController.php @@ -47,7 +47,7 @@ class ExportController extends Controller * * @Route("/export/{category}.{format}", name="export_entries", requirements={ * "format": "epub|mobi|pdf|json|xml|txt|csv", - * "category": "all|unread|starred|archive|tag_entries|untagged|search|with_annotations|same_domain" + * "category": "all|unread|starred|archive|tag_entries|untagged|search|annotated|same_domain" * }) * * @return \Symfony\Component\HttpFoundation\Response @@ -80,7 +80,7 @@ class ExportController extends Controller ->getResult(); $title = 'Search ' . $searchTerm; - } elseif ('with_annotations' === $category) { + } elseif ('annotated' === $category) { $entries = $repository->getBuilderForAnnotationsByUser( $this->getUser()->getId() )->getQuery() diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 390f655d5..d44506c72 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -594,7 +594,7 @@ class EntryRepository extends EntityRepository $qb->leftJoin('e.tags', 't'); $qb->andWhere('t.id is null'); break; - case 'with_annotations': + case 'annotated': $qb->leftJoin('e.annotations', 'a'); $qb->andWhere('a.id is not null'); 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 09d1523cc..3c5fad1e9 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 @@ -14,7 +14,7 @@ {{ 'entry.page_titles.untagged'|trans }} {% elseif currentRoute == 'same_domain' %} {{ 'entry.page_titles.same_domain'|trans }} -{% elseif currentRoute == 'with_annotations' %} +{% elseif currentRoute == 'annotated' %} {{ 'entry.page_titles.with_annotations'|trans }} {% else %} {{ '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 b38a33ce2..104d577b9 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 @@ {% set activeRoute = null %} {% if currentRoute == 'all' or currentRouteFromQueryParams == 'all' %} {% set activeRoute = 'all' %} - {% elseif currentRoute == 'with_annotations' or currentRouteFromQueryParams == 'with_annotations' %} - {% set activeRoute = 'with_annotations' %} + {% elseif currentRoute == 'annotated' or currentRouteFromQueryParams == 'annotated' %} + {% set activeRoute = 'annotated' %} {% elseif currentRoute == 'archive' or currentRouteFromQueryParams == 'archive' %} {% set activeRoute = 'archive' %} {% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %} @@ -61,8 +61,8 @@