1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

Added route to list entries with annotations

This commit is contained in:
Nicolas Lœuillet 2020-04-20 19:00:58 +02:00 committed by Jeremy Benoist
parent 9a6146d2ef
commit dce50ddb79
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
23 changed files with 143 additions and 4 deletions

View file

@ -69,11 +69,11 @@ security:
- { path: ^/logout, roles: [IS_AUTHENTICATED_ANONYMOUSLY, IS_AUTHENTICATED_2FA_IN_PROGRESS] } - { path: ^/logout, roles: [IS_AUTHENTICATED_ANONYMOUSLY, IS_AUTHENTICATED_2FA_IN_PROGRESS] }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /(unread|starred|archive|with_annotations|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/locale, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/locale, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/feed, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/feed, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } # For backwards compatibility - { path: /(unread|starred|archive|with_annotations).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } # For backwards compatibility
- { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/settings, roles: ROLE_SUPER_ADMIN } - { path: ^/settings, roles: ROLE_SUPER_ADMIN }
- { path: ^/annotations, roles: ROLE_USER } - { path: ^/annotations, roles: ROLE_USER }

View file

@ -277,12 +277,26 @@ class EntryController extends Controller
return $this->showEntries('untagged', $request, $page); return $this->showEntries('untagged', $request, $page);
} }
/**
* Shows entries with annotations for current user.
*
* @param int $page
*
* @Route("/with_annotations/list/{page}", name="with_annotations", defaults={"page" = "1"})
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function showWithAnnotationsEntriesAction(Request $request, $page)
{
return $this->showEntries('with_annotations', $request, $page);
}
/** /**
* Shows random entry depending on the given type. * Shows random entry depending on the given type.
* *
* @param string $type * @param string $type
* *
* @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|all"}) * @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|with_annotations|all"})
* *
* @return \Symfony\Component\HttpFoundation\RedirectResponse * @return \Symfony\Component\HttpFoundation\RedirectResponse
*/ */
@ -563,6 +577,9 @@ class EntryController extends Controller
$qb = $repository->getBuilderForArchiveByUser($this->getUser()->getId()); $qb = $repository->getBuilderForArchiveByUser($this->getUser()->getId());
$formOptions['filter_archived'] = true; $formOptions['filter_archived'] = true;
break; break;
case 'with_annotations':
$qb = $repository->getBuilderForAnnotationsByUser($this->getUser()->getId());
break;
case 'unread': case 'unread':
$qb = $repository->getBuilderForUnreadByUser($this->getUser()->getId()); $qb = $repository->getBuilderForUnreadByUser($this->getUser()->getId());
$formOptions['filter_unread'] = true; $formOptions['filter_unread'] = true;

View file

@ -47,7 +47,7 @@ class ExportController extends Controller
* *
* @Route("/export/{category}.{format}", name="export_entries", requirements={ * @Route("/export/{category}.{format}", name="export_entries", requirements={
* "format": "epub|mobi|pdf|json|xml|txt|csv", * "format": "epub|mobi|pdf|json|xml|txt|csv",
* "category": "all|unread|starred|archive|tag_entries|untagged|search|same_domain" * "category": "all|unread|starred|archive|tag_entries|untagged|search|with_annotations|same_domain"
* }) * })
* *
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
@ -80,6 +80,13 @@ class ExportController extends Controller
->getResult(); ->getResult();
$title = 'Search ' . $searchTerm; $title = 'Search ' . $searchTerm;
} elseif ('with_annotations' === $category) {
$entries = $repository->getBuilderForAnnotationsByUser(
$this->getUser()->getId()
)->getQuery()
->getResult();
$title = 'With annotations';
} else { } else {
$entries = $repository $entries = $repository
->$methodBuilder($this->getUser()->getId()) ->$methodBuilder($this->getUser()->getId())

View file

@ -142,6 +142,21 @@ class EntryRepository extends EntityRepository
return $this->sortQueryBuilder($this->getRawBuilderForUntaggedByUser($userId)); return $this->sortQueryBuilder($this->getRawBuilderForUntaggedByUser($userId));
} }
/**
* Retrieve entries with annotations for a user.
*
* @param int $userId
*
* @return QueryBuilder
*/
public function getBuilderForAnnotationsByUser($userId)
{
return $this
->getSortedQueryBuilderByUser($userId)
->innerJoin('e.annotations', 'a')
;
}
/** /**
* Retrieve untagged entries for a user. * Retrieve untagged entries for a user.
* *
@ -579,6 +594,10 @@ class EntryRepository extends EntityRepository
$qb->leftJoin('e.tags', 't'); $qb->leftJoin('e.tags', 't');
$qb->andWhere('t.id is null'); $qb->andWhere('t.id is null');
break; break;
case 'with_annotations':
$qb->leftJoin('e.annotations', 'a');
$qb->andWhere('a.id is not null');
break;
} }
$ids = $qb->getQuery()->getArrayResult(); $ids = $qb->getQuery()->getArrayResult();

View file

@ -13,6 +13,7 @@ menu:
starred: 'Favoritter' starred: 'Favoritter'
archive: 'Arkiv' archive: 'Arkiv'
all_articles: 'Alle artikler' all_articles: 'Alle artikler'
# with_annotations: 'With annotations'
config: 'Opsætning' config: 'Opsætning'
tags: 'Tags' tags: 'Tags'
howto: 'KUow-to' howto: 'KUow-to'
@ -65,6 +66,17 @@ config:
new_password_label: 'Ny adgangskode' new_password_label: 'Ny adgangskode'
repeat_new_password_label: 'Gentag adgangskode' repeat_new_password_label: 'Gentag adgangskode'
entry: entry:
# default_title: 'Title of the entry'
page_titles:
# unread: 'Unread entries'
# starred: 'Starred entries'
# archived: 'Archived entries'
# filtered: 'Filtered entries'
# with_annotations: 'Entries with annotations'
# filtered_tags: 'Filtered by tags:'
# filtered_search: 'Filtered by search:'
# untagged: 'Untagged entries'
# all: 'All entries'
list: list:
reading_time: 'estimeret læsetid' reading_time: 'estimeret læsetid'
reading_time_minutes: 'estimeret læsetid: %readingTime% min' reading_time_minutes: 'estimeret læsetid: %readingTime% min'

View file

@ -19,6 +19,7 @@ menu:
starred: Favoriten starred: Favoriten
archive: Archiv archive: Archiv
all_articles: Alle Artikel all_articles: Alle Artikel
# with_annotations: 'With annotations'
config: Konfiguration config: Konfiguration
tags: Tags tags: Tags
internal_settings: Interne Einstellungen internal_settings: Interne Einstellungen
@ -236,6 +237,7 @@ entry:
starred: Favorisierte Einträge starred: Favorisierte Einträge
archived: Archivierte Einträge archived: Archivierte Einträge
filtered: Gefilterte Einträge filtered: Gefilterte Einträge
# with_annotations: 'Entries with annotations'
filtered_tags: 'Gefiltert nach Tags:' filtered_tags: 'Gefiltert nach Tags:'
filtered_search: 'Gefiltert nach Suche:' filtered_search: 'Gefiltert nach Suche:'
untagged: Nicht markierte Einträge untagged: Nicht markierte Einträge

View file

@ -19,6 +19,7 @@ menu:
starred: Starred starred: Starred
archive: Archive archive: Archive
all_articles: All entries all_articles: All entries
with_annotations: With annotations
config: Config config: Config
tags: Tags tags: Tags
internal_settings: Internal Settings internal_settings: Internal Settings
@ -220,6 +221,7 @@ entry:
starred: Starred entries starred: Starred entries
archived: Archived entries archived: Archived entries
filtered: Filtered entries filtered: Filtered entries
with_annotations: Entries with annotations
filtered_tags: 'Filtered by tags:' filtered_tags: 'Filtered by tags:'
filtered_search: 'Filtered by search:' filtered_search: 'Filtered by search:'
untagged: Untagged entries untagged: Untagged entries

View file

@ -19,6 +19,7 @@ menu:
starred: 'Favoritos' starred: 'Favoritos'
archive: 'Archivados' archive: 'Archivados'
all_articles: 'Todos los artículos' all_articles: 'Todos los artículos'
# with_annotations: 'With annotations'
config: 'Configuración' config: 'Configuración'
tags: 'Etiquetas' tags: 'Etiquetas'
internal_settings: 'Configuración interna' internal_settings: 'Configuración interna'
@ -217,6 +218,7 @@ entry:
starred: 'Artículos favoritos' starred: 'Artículos favoritos'
archived: 'Artículos archivados' archived: 'Artículos archivados'
filtered: 'Artículos filtrados' filtered: 'Artículos filtrados'
# with_annotations: 'Entries with annotations'
filtered_tags: 'Filtrado por etiquetas:' filtered_tags: 'Filtrado por etiquetas:'
filtered_search: 'Filtrado por búsqueda:' filtered_search: 'Filtrado por búsqueda:'
untagged: 'Artículos sin etiquetas' untagged: 'Artículos sin etiquetas'

View file

@ -15,6 +15,7 @@ security:
go_to_account: حساب خود را ببینید go_to_account: حساب خود را ببینید
menu: menu:
left: left:
<<<<<<< HEAD
unread: خوانده‌نشده unread: خوانده‌نشده
starred: برگزیده starred: برگزیده
archive: بایگانی archive: بایگانی
@ -32,6 +33,27 @@ menu:
site_credentials: اعتبارنامه‌های وب‌گاه site_credentials: اعتبارنامه‌های وب‌گاه
users_management: مدیریت کاربران users_management: مدیریت کاربران
developer: مدیریت کارخواه‌های API developer: مدیریت کارخواه‌های API
=======
unread: 'خوانده‌نشده'
starred: 'برگزیده'
archive: 'بایگانی'
all_articles: 'همه'
# with_annotations: 'With annotations'
config: 'پیکربندی'
tags: 'برچسب‌ها'
internal_settings: 'تنظیمات درونی'
import: 'درون‌ریزی'
howto: 'خودآموز'
# developer: 'API clients management'
logout: 'خروج'
about: 'درباره'
search: 'جستجو'
save_link: 'ذخیرهٔ یک پیوند'
back_to_unread: 'بازگشت به خوانده‌نشده‌ها'
# users_management: 'Users management'
# site_credentials: 'Site credentials'
quickstart: "Quickstart"
>>>>>>> 4b997bc8 (Added route to list entries with annotations)
top: top:
add_new_entry: افزودن مقالهٔ تازه add_new_entry: افزودن مقالهٔ تازه
search: جستجو search: جستجو
@ -106,10 +128,22 @@ config:
tagging_rules_definition_title: برچسب‌گذاری خودکار یعنی چه؟ tagging_rules_definition_title: برچسب‌گذاری خودکار یعنی چه؟
entry: entry:
page_titles: page_titles:
<<<<<<< HEAD
unread: مقاله‌های خوانده‌نشده unread: مقاله‌های خوانده‌نشده
starred: مقاله‌های برگزیده starred: مقاله‌های برگزیده
archived: مقاله‌های بایگانی‌شده archived: مقاله‌های بایگانی‌شده
filtered: مقاله‌های فیلترشده filtered: مقاله‌های فیلترشده
=======
unread: 'مقاله‌های خوانده‌نشده'
starred: 'مقاله‌های برگزیده'
archived: 'مقاله‌های بایگانی‌شده'
filtered: 'مقاله‌های فیلترشده'
# with_annotations: 'Entries with annotations'
# filtered_tags: 'Filtered by tags:'
# filtered_search: 'Filtered by search:'
# untagged: 'Untagged entries'
# all: 'All entries'
>>>>>>> 4b997bc8 (Added route to list entries with annotations)
list: list:
number_on_the_page: '{0} هیج مقاله‌ای نیست.|{1} یک مقاله هست.|]1,Inf[ %count% مقاله هست.' number_on_the_page: '{0} هیج مقاله‌ای نیست.|{1} یک مقاله هست.|]1,Inf[ %count% مقاله هست.'
reading_time: زمان تخمینی برای خواندن reading_time: زمان تخمینی برای خواندن

View file

@ -19,6 +19,7 @@ menu:
starred: Favoris starred: Favoris
archive: Lus archive: Lus
all_articles: Tous les articles all_articles: Tous les articles
with_annotations: Avec annotations
config: Configuration config: Configuration
tags: Étiquettes tags: Étiquettes
internal_settings: Configuration interne internal_settings: Configuration interne
@ -220,6 +221,7 @@ entry:
starred: Articles favoris starred: Articles favoris
archived: Articles lus archived: Articles lus
filtered: Articles filtrés filtered: Articles filtrés
with_annotations: Articles avec annotations
filtered_tags: 'Articles filtrés par étiquettes :' filtered_tags: 'Articles filtrés par étiquettes :'
filtered_search: 'Articles filtrés par recherche :' filtered_search: 'Articles filtrés par recherche :'
untagged: Article sans étiquette untagged: Article sans étiquette

View file

@ -15,10 +15,12 @@ security:
go_to_account: Vai al tuo account go_to_account: Vai al tuo account
menu: menu:
left: left:
unread: Non letti unread: Non letti
starred: Preferiti starred: Preferiti
archive: Archivio archive: Archivio
all_articles: Tutti all_articles: Tutti
# with_annotations: 'With annotations'
config: Configurazione config: Configurazione
tags: Etichette tags: Etichette
internal_settings: Strumenti internal_settings: Strumenti
@ -175,10 +177,12 @@ config:
entry: entry:
default_title: Titolo del contenuto default_title: Titolo del contenuto
page_titles: page_titles:
unread: Contenuti non letti unread: Contenuti non letti
starred: Contenuti preferiti starred: Contenuti preferiti
archived: Contenuti archiviati archived: Contenuti archiviati
filtered: Contenuti filtrati filtered: Contenuti filtrati
# with_annotations: 'Entries with annotations'
filtered_tags: 'Filtrati per etichetta:' filtered_tags: 'Filtrati per etichetta:'
filtered_search: 'Filtrati per ricerca:' filtered_search: 'Filtrati per ricerca:'
untagged: Articoli non etichettati untagged: Articoli non etichettati

View file

@ -19,6 +19,7 @@ menu:
starred: スター starred: スター
archive: アーカイブ archive: アーカイブ
all_articles: すべての記事 all_articles: すべての記事
# with_annotations: 'With annotations'
config: 設定 config: 設定
tags: タグ tags: タグ
internal_settings: 内部設定 internal_settings: 内部設定
@ -235,6 +236,7 @@ entry:
starred: スター付きの記事 starred: スター付きの記事
archived: アーカイブ済の記事 archived: アーカイブ済の記事
filtered: フィルターされた記事 filtered: フィルターされた記事
# with_annotations: 'Entries with annotations'
filtered_tags: 'タグによるフィルター:' filtered_tags: 'タグによるフィルター:'
untagged: タグがない記事 untagged: タグがない記事
all: すべての記事 all: すべての記事

View file

@ -19,6 +19,7 @@ menu:
starred: Favorits starred: Favorits
archive: Legits archive: Legits
all_articles: Totes los articles all_articles: Totes los articles
# with_annotations: 'With annotations'
config: Configuracion config: Configuracion
tags: Etiquetas tags: Etiquetas
internal_settings: Configuracion intèrna internal_settings: Configuracion intèrna
@ -180,6 +181,7 @@ entry:
starred: Articles favorits starred: Articles favorits
archived: Articles legits archived: Articles legits
filtered: Articles filtrats filtered: Articles filtrats
# with_annotations: 'Entries with annotations'
filtered_tags: 'Articles filtrats per etiquetas:' filtered_tags: 'Articles filtrats per etiquetas:'
filtered_search: 'Articles filtrats per recèrca:' filtered_search: 'Articles filtrats per recèrca:'
untagged: Articles sens etiqueta untagged: Articles sens etiqueta

View file

@ -19,6 +19,7 @@ menu:
starred: Oznaczone gwiazdką starred: Oznaczone gwiazdką
archive: Archiwum archive: Archiwum
all_articles: Wszystkie all_articles: Wszystkie
# with_annotations: 'With annotations'
config: Konfiguracja config: Konfiguracja
tags: Tagi tags: Tagi
internal_settings: Wewnętrzne ustawienia internal_settings: Wewnętrzne ustawienia
@ -210,6 +211,7 @@ entry:
starred: Wpisy oznaczone gwiazdką starred: Wpisy oznaczone gwiazdką
archived: Zarchiwizowane wpisy archived: Zarchiwizowane wpisy
filtered: Odfiltrowane wpisy filtered: Odfiltrowane wpisy
# with_annotations: 'Entries with annotations'
filtered_tags: 'Filtrowane po tagach:' filtered_tags: 'Filtrowane po tagach:'
filtered_search: 'Filtrowanie po wyszukiwaniu:' filtered_search: 'Filtrowanie po wyszukiwaniu:'
untagged: Odtaguj wpisy untagged: Odtaguj wpisy

View file

@ -19,6 +19,7 @@ menu:
starred: 'Destacado' starred: 'Destacado'
archive: 'Arquivo' archive: 'Arquivo'
all_articles: 'Todas as entradas' all_articles: 'Todas as entradas'
# with_annotations: 'With annotations'
config: 'Configurações' config: 'Configurações'
tags: 'Tags' tags: 'Tags'
internal_settings: 'Configurações Internas' internal_settings: 'Configurações Internas'
@ -148,6 +149,7 @@ entry:
starred: 'Entradas destacadas' starred: 'Entradas destacadas'
archived: 'Entradas arquivadas' archived: 'Entradas arquivadas'
filtered: 'Entradas filtradas' filtered: 'Entradas filtradas'
# with_annotations: 'Entries with annotations'
filtered_tags: 'Filtrar por tags:' filtered_tags: 'Filtrar por tags:'
untagged: 'Entradas sem tags' untagged: 'Entradas sem tags'
list: list:

View file

@ -13,6 +13,7 @@ menu:
starred: 'Cu steluță' starred: 'Cu steluță'
archive: 'Arhivă' archive: 'Arhivă'
all_articles: 'Toate' all_articles: 'Toate'
# with_annotations: 'With annotations'
config: 'Configurație' config: 'Configurație'
tags: 'Tag-uri' tags: 'Tag-uri'
howto: 'Cum să' howto: 'Cum să'
@ -64,6 +65,17 @@ config:
new_password_label: 'Parola nouă' new_password_label: 'Parola nouă'
repeat_new_password_label: '' repeat_new_password_label: ''
entry: entry:
# default_title: 'Title of the entry'
page_titles:
# unread: 'Unread entries'
# starred: 'Starred entries'
# archived: 'Archived entries'
# filtered: 'Filtered entries'
# with_annotations: 'Entries with annotations'
# filtered_tags: 'Filtered by tags:'
# filtered_search: 'Filtered by search:'
# untagged: 'Untagged entries'
# all: 'All entries'
list: list:
reading_time: 'timp estimat de citire' reading_time: 'timp estimat de citire'
reading_time_minutes: 'timp estimat de citire: %readingTime% min' reading_time_minutes: 'timp estimat de citire: %readingTime% min'

View file

@ -19,6 +19,7 @@ menu:
starred: 'Помеченные' starred: 'Помеченные'
archive: 'Архивные' archive: 'Архивные'
all_articles: 'Все записи' all_articles: 'Все записи'
# with_annotations: 'With annotations'
config: 'Настройки' config: 'Настройки'
tags: 'Теги' tags: 'Теги'
internal_settings: 'Внутренние настройки' internal_settings: 'Внутренние настройки'
@ -236,6 +237,7 @@ entry:
starred: 'Помеченные записи' starred: 'Помеченные записи'
archived: 'Архивные записи' archived: 'Архивные записи'
filtered: 'Отфильтрованные записи' filtered: 'Отфильтрованные записи'
# with_annotations: 'Entries with annotations'
filtered_tags: 'Отфильтрованные по тегу:' filtered_tags: 'Отфильтрованные по тегу:'
filtered_search: 'Отфильтрованные по поиску:' filtered_search: 'Отфильтрованные по поиску:'
untagged: 'Записи без тегов' untagged: 'Записи без тегов'

View file

@ -19,6 +19,7 @@ menu:
starred: 'ทำการแสดง' starred: 'ทำการแสดง'
archive: 'เอกสาร' archive: 'เอกสาร'
all_articles: 'รายการทั้งหมด' all_articles: 'รายการทั้งหมด'
# with_annotations: 'With annotations'
config: 'กำหนดค่า' config: 'กำหนดค่า'
tags: 'แท็ก' tags: 'แท็ก'
internal_settings: 'ตั้งค่าภายใน' internal_settings: 'ตั้งค่าภายใน'
@ -158,6 +159,7 @@ entry:
starred: 'รายการที่แสดง' starred: 'รายการที่แสดง'
archived: 'รายการเอกสาร' archived: 'รายการเอกสาร'
filtered: 'รายการที่กลั่นกรอง' filtered: 'รายการที่กลั่นกรอง'
# with_annotations: 'Entries with annotations'
filtered_tags: 'แท็กทีกลั่นกรอง่:' filtered_tags: 'แท็กทีกลั่นกรอง่:'
filtered_search: 'การค้นหาที่กลั่นกรอง:' filtered_search: 'การค้นหาที่กลั่นกรอง:'
untagged: 'รายการที่ไม่ได้แท็ก' untagged: 'รายการที่ไม่ได้แท็ก'

View file

@ -19,6 +19,7 @@ menu:
starred: Favoriler starred: Favoriler
archive: Arşiv archive: Arşiv
all_articles: Hepsi all_articles: Hepsi
# with_annotations: 'With annotations'
config: Yapılandırma config: Yapılandırma
tags: Etiketler tags: Etiketler
import: İçe Aktar import: İçe Aktar
@ -315,6 +316,7 @@ entry:
starred: Favorilenmiş makaleler starred: Favorilenmiş makaleler
archived: Arşivlenmiş makaleler archived: Arşivlenmiş makaleler
filtered: Fitrelenmiş makaleler filtered: Fitrelenmiş makaleler
# with_annotations: 'Entries with annotations'
filtered_tags: 'Etiket ile filtrele:' filtered_tags: 'Etiket ile filtrele:'
filtered_search: 'Arama kriteri ile filtrele:' filtered_search: 'Arama kriteri ile filtrele:'
untagged: Etiketlenmemiş makaleler untagged: Etiketlenmemiş makaleler

View file

@ -19,6 +19,7 @@ menu:
starred: '收藏' starred: '收藏'
archive: '存档' archive: '存档'
all_articles: '所有项目' all_articles: '所有项目'
# with_annotations: 'With annotations'
config: '配置' config: '配置'
tags: '标签' tags: '标签'
internal_settings: '内部设置' internal_settings: '内部设置'
@ -236,6 +237,7 @@ entry:
starred: '收藏项目' starred: '收藏项目'
archived: '存档项目' archived: '存档项目'
filtered: '筛选后项目' filtered: '筛选后项目'
# with_annotations: 'Entries with annotations'
filtered_tags: '根据标签筛选:' filtered_tags: '根据标签筛选:'
filtered_search: '根据搜索筛选:' filtered_search: '根据搜索筛选:'
untagged: '无标签项目' untagged: '无标签项目'

View file

@ -14,6 +14,8 @@
{{ 'entry.page_titles.untagged'|trans }} {{ 'entry.page_titles.untagged'|trans }}
{% elseif currentRoute == 'same_domain' %} {% elseif currentRoute == 'same_domain' %}
{{ 'entry.page_titles.same_domain'|trans }} {{ 'entry.page_titles.same_domain'|trans }}
{% elseif currentRoute == 'with_annotations' %}
{{ 'entry.page_titles.with_annotations'|trans }}
{% else %} {% else %}
{{ 'entry.page_titles.unread'|trans }} {{ 'entry.page_titles.unread'|trans }}
{% endif %} {% endif %}

View file

@ -40,6 +40,8 @@
{% set activeRoute = null %} {% set activeRoute = null %}
{% if currentRoute == 'all' or currentRouteFromQueryParams == 'all' %} {% if currentRoute == 'all' or currentRouteFromQueryParams == 'all' %}
{% set activeRoute = 'all' %} {% set activeRoute = 'all' %}
{% elseif currentRoute == 'with_annotations' or currentRouteFromQueryParams == 'with_annotations' %}
{% set activeRoute = 'with_annotations' %}
{% elseif currentRoute == 'archive' or currentRouteFromQueryParams == 'archive' %} {% elseif currentRoute == 'archive' or currentRouteFromQueryParams == 'archive' %}
{% set activeRoute = 'archive' %} {% set activeRoute = 'archive' %}
{% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %} {% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %}
@ -59,6 +61,9 @@
<li class="bold {% if activeRoute == 'archive' %}active{% endif %}"> <li class="bold {% if activeRoute == 'archive' %}active{% endif %}">
<a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a> <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a>
</li> </li>
<li class="bold {% if activeRoute == 'with_annotations' %}active{% endif %}">
<a class="waves-effect" href="{{ path('with_annotations') }}">{{ 'menu.left.with_annotations'|trans }} <span class="numberItems grey-text">{{ count_entries('with_annotations') }}</span></a>
</li>
<li class="bold {% if activeRoute == 'all' %}active{% endif %}"> <li class="bold {% if activeRoute == 'all' %}active{% endif %}">
<a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a> <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a>
</li> </li>

View file

@ -95,6 +95,9 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface
case 'unread': case 'unread':
$qb = $this->entryRepository->getBuilderForUnreadByUser($user->getId()); $qb = $this->entryRepository->getBuilderForUnreadByUser($user->getId());
break; break;
case 'with_annotations':
$qb = $this->entryRepository->getBuilderForAnnotationsByUser($user->getId());
break;
case 'all': case 'all':
$qb = $this->entryRepository->getBuilderForAllByUser($user->getId()); $qb = $this->entryRepository->getBuilderForAllByUser($user->getId());
break; break;