- { 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|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: /tags/(.*).xml$, 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: ^/settings, roles: ROLE_SUPER_ADMIN }
- { path: ^/annotations, roles: ROLE_USER }
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.
*
* @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
*/
case 'archive':
$qb = $repository->getBuilderForArchiveByUser($this->getUser()->getId());
break;
+ case 'with_annotations':
+ $qb = $repository->getBuilderForAnnotationsByUser($this->getUser()->getId());
+ break;
case 'unread':
$qb = $repository->getBuilderForUnreadByUser($this->getUser()->getId());
break;
*
* @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"
+ * "category": "all|unread|starred|archive|tag_entries|untagged|search|with_annotations"
* })
*
* @return \Symfony\Component\HttpFoundation\Response
->getResult();
$title = 'Search ' . $searchTerm;
+ } elseif ('with_annotations' === $category) {
+ $entries = $repository->getBuilderForAnnotationsByUser(
+ $this->getUser()->getId()
+ )->getQuery()
+ ->getResult();
+
+ $title = 'With annotations';
} else {
$entries = $repository
->$methodBuilder($this->getUser()->getId())
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.
*
$qb->leftJoin('e.tags', 't');
$qb->andWhere('t.id is null');
break;
+ case 'with_annotations':
+ $qb->leftJoin('e.annotations', 'a');
+ $qb->andWhere('a.id is not null');
+ break;
}
$ids = $qb->getQuery()->getArrayResult();
starred: 'Favoritter'
archive: 'Arkiv'
all_articles: 'Alle artikler'
+ # with_annotations: 'With annotations'
config: 'Opsætning'
tags: 'Tags'
# internal_settings: 'Internal Settings'
# 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'
starred: 'Favoriten'
archive: 'Archiv'
all_articles: 'Alle Artikel'
+ # with_annotations: 'With annotations'
config: 'Konfiguration'
tags: 'Tags'
internal_settings: 'Interne Einstellungen'
starred: 'Favorisierte Einträge'
archived: 'Archivierte Einträge'
filtered: 'Gefilterte Einträge'
+ # with_annotations: 'Entries with annotations'
filtered_tags: 'Gefiltert nach Tags:'
filtered_search: 'Gefiltert nach Suche:'
untagged: 'Nicht getaggte Einträge'
starred: 'Starred'
archive: 'Archive'
all_articles: 'All entries'
+ with_annotations: 'With annotations'
config: 'Config'
tags: 'Tags'
internal_settings: 'Internal Settings'
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'
starred: 'Favoritos'
archive: 'Archivo'
all_articles: 'Todos los artículos'
+ # with_annotations: 'With annotations'
config: 'Configuración'
tags: 'Etiquetas'
internal_settings: 'Configuración interna'
starred: 'Artículos favoritos'
archived: 'Artículos archivados'
filtered: 'Artículos filtrados'
+ # with_annotations: 'Entries with annotations'
filtered_tags: 'Filtrado por etiquetas:'
filtered_search: 'Filtrado por búsqueda:'
untagged: 'Artículos sin etiquetas'
starred: 'برگزیده'
archive: 'بایگانی'
all_articles: 'همه'
+ # with_annotations: 'With annotations'
config: 'پیکربندی'
tags: 'برچسبها'
internal_settings: 'تنظیمات درونی'
starred: 'مقالههای برگزیده'
archived: 'مقالههای بایگانیشده'
filtered: 'مقالههای فیلترشده'
+ # with_annotations: 'Entries with annotations'
# filtered_tags: 'Filtered by tags:'
# filtered_search: 'Filtered by search:'
# untagged: 'Untagged entries'
starred: "Favoris"
archive: "Lus"
all_articles: "Tous les articles"
+ with_annotations: 'Avec annotations'
config: "Configuration"
tags: "Tags"
internal_settings: "Configuration interne"
starred: "Articles favoris"
archived: "Articles lus"
filtered: "Articles filtrés"
+ with_annotations: 'Articles avec annotations'
filtered_tags: "Articles filtrés par tags :"
filtered_search: "Articles filtrés par recherche :"
untagged: "Article sans tag"
starred: 'Preferiti'
archive: 'Archivio'
all_articles: 'Tutti'
+ # with_annotations: 'With annotations'
config: 'Configurazione'
tags: 'Etichette'
internal_settings: 'Strumenti'
starred: 'Contenuti preferiti'
archived: 'Contenuti archiviati'
filtered: 'Contenuti filtrati'
+ # with_annotations: 'Entries with annotations'
filtered_tags: 'Filtrati per etichetta:'
filtered_search: 'Filtrati per ricerca:'
untagged: 'Articoli non etichettati'
starred: 'お気に入り'
archive: 'アーカイブ済み'
all_articles: '全ての記事'
+ # with_annotations: 'With annotations'
config: '設定'
tags: 'タグ'
internal_settings: '内部設定'
starred: 'お気に入りの記事'
archived: 'アーカイブ済みの記事'
filtered: '記事の絞り込み'
+ # with_annotations: 'Entries with annotations'
filtered_tags: 'タグ検索:'
filtered_search: '単語検索:'
untagged: 'タグの無い記事'
starred: 'Favorits'
archive: 'Legits'
all_articles: 'Totes los articles'
+ # with_annotations: 'With annotations'
config: 'Configuracion'
tags: 'Etiquetas'
internal_settings: 'Configuracion intèrna'
starred: 'Articles favorits'
archived: 'Articles legits'
filtered: 'Articles filtrats'
+ # with_annotations: 'Entries with annotations'
filtered_tags: 'Articles filtrats per etiquetas :'
filtered_search: 'Articles filtrats per recèrca :'
untagged: 'Articles sens etiqueta'
starred: 'Oznaczone gwiazdką'
archive: 'Archiwum'
all_articles: 'Wszystkie'
+ # with_annotations: 'With annotations'
config: 'Konfiguracja'
tags: 'Tagi'
internal_settings: 'Wewnętrzne ustawienia'
starred: 'Wpisy oznaczone gwiazdką'
archived: 'Zarchiwizowane wpisy'
filtered: 'Odfiltrowane wpisy'
+ # with_annotations: 'Entries with annotations'
filtered_tags: 'Filtrowane po tagach:'
filtered_search: 'Filtrowanie po wyszukiwaniu:'
untagged: 'Odtaguj wpisy'
starred: 'Destacado'
archive: 'Arquivo'
all_articles: 'Todos os artigos'
+ # with_annotations: 'With annotations'
config: 'Configurações'
tags: 'Tags'
internal_settings: 'Configurações Internas'
starred: 'Artigos destacados'
archived: 'Artigos arquivados'
filtered: 'Artigos filtrados'
+ # with_annotations: 'Entries with annotations'
filtered_tags: 'Filtrar por tags:'
filtered_search: 'Filtrar por busca:'
untagged: 'Entradas sem tags'
starred: 'Cu steluță'
archive: 'Arhivă'
all_articles: 'Toate'
+ # with_annotations: 'With annotations'
config: 'Configurație'
tags: 'Tag-uri'
# internal_settings: 'Internal Settings'
# 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'
starred: 'Помеченные'
archive: 'Архивные'
all_articles: 'Все записи'
+ # with_annotations: 'With annotations'
config: 'Настройки'
tags: 'Теги'
internal_settings: 'Внутренние настройки'
starred: 'Помеченные записи'
archived: 'Архивные записи'
filtered: 'Отфильтрованные записи'
+ # with_annotations: 'Entries with annotations'
filtered_tags: 'Отфильтрованные по тегу:'
filtered_search: 'Отфильтрованные по поиску:'
untagged: 'Записи без тегов'
starred: 'ทำการแสดง'
archive: 'เอกสาร'
all_articles: 'รายการทั้งหมด'
+ # with_annotations: 'With annotations'
config: 'กำหนดค่า'
tags: 'แท็ก'
internal_settings: 'ตั้งค่าภายใน'
starred: 'รายการที่แสดง'
archived: 'รายการเอกสาร'
filtered: 'รายการที่กลั่นกรอง'
+ # with_annotations: 'Entries with annotations'
filtered_tags: 'แท็กทีกลั่นกรอง่:'
filtered_search: 'การค้นหาที่กลั่นกรอง:'
untagged: 'รายการที่ไม่ได้แท็ก'
starred: 'Favoriler'
archive: 'Arşiv'
all_articles: 'Hepsi'
+ # with_annotations: 'With annotations'
config: 'Yapılandırma'
tags: 'Etiketler'
# internal_settings: 'Internal Settings'
# 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'
starred: '星标'
archive: '存档'
all_articles: '所有项目'
+ # with_annotations: 'With annotations'
config: '配置'
tags: '标签'
internal_settings: '内部设置'
starred: '星标项目'
archived: '存档项目'
filtered: '筛选后项目'
+ # with_annotations: 'Entries with annotations'
filtered_tags: '根据标签筛选:'
filtered_search: '根据搜索筛选:'
untagged: '无标签项目'
{{ 'entry.page_titles.filtered_tags'|trans }} {{ filter }}
{% elseif currentRoute == 'untagged' %}
{{ 'entry.page_titles.untagged'|trans }}
+{% elseif currentRoute == 'with_annotations' %}
+ {{ 'entry.page_titles.with_annotations'|trans }}
{% else %}
{{ 'entry.page_titles.unread'|trans }}
{% endif %}
{% 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 == 'archive' or currentRouteFromQueryParams == 'archive' %}
{% set activeRoute = 'archive' %}
{% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %}
<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>
</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 %}">
<a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a>
</li>
case 'unread':
$qb = $this->entryRepository->getBuilderForUnreadByUser($user->getId());
break;
+ case 'with_annotations':
+ $qb = $this->entryRepository->getBuilderForAnnotationsByUser($user->getId());
+ break;
case 'all':
$qb = $this->entryRepository->getBuilderForAllByUser($user->getId());
break;