From bd40f1af88979cb5257206d178d26819e350a24c Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 20 Jun 2017 18:29:46 +0200 Subject: [PATCH] Add all entries RSS feed and put links on tag page itself and baggy too Signed-off-by: Thomas Citharel --- .../CoreBundle/Controller/RssController.php | 23 ++++++++++++++++--- .../CoreBundle/Controller/TagController.php | 2 +- .../Resources/translations/messages.da.yml | 7 +++--- .../Resources/translations/messages.de.yml | 1 + .../Resources/translations/messages.en.yml | 7 +++--- .../Resources/translations/messages.es.yml | 1 + .../Resources/translations/messages.fa.yml | 1 + .../Resources/translations/messages.fr.yml | 9 ++++---- .../Resources/translations/messages.it.yml | 7 +++--- .../Resources/translations/messages.oc.yml | 9 ++++---- .../Resources/translations/messages.pl.yml | 7 +++--- .../Resources/translations/messages.pt.yml | 7 +++--- .../Resources/translations/messages.ro.yml | 7 +++--- .../Resources/translations/messages.tr.yml | 7 +++--- .../views/themes/baggy/Config/index.html.twig | 11 +++++---- .../themes/baggy/Entry/entries.html.twig | 13 +++++++++-- .../views/themes/baggy/Tag/tags.html.twig | 7 +++++- .../themes/common/Entry/_rss_link.html.twig | 6 +++++ .../themes/material/Config/index.html.twig | 1 + .../themes/material/Entry/entries.html.twig | 16 ++++++++++--- .../views/themes/material/Tag/tags.html.twig | 2 +- 21 files changed, 106 insertions(+), 45 deletions(-) create mode 100644 src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 090eccab2..e87dd9a1f 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php @@ -26,7 +26,7 @@ class RssController extends Controller * * @return \Symfony\Component\HttpFoundation\Response */ - public function showUnreadAction(Request $request, User $user) + public function showUnreadRSSAction(Request $request, User $user) { return $this->showEntries('unread', $user, $request->query->get('page', 1)); } @@ -39,7 +39,7 @@ class RssController extends Controller * * @return \Symfony\Component\HttpFoundation\Response */ - public function showArchiveAction(Request $request, User $user) + public function showArchiveRSSAction(Request $request, User $user) { return $this->showEntries('archive', $user, $request->query->get('page', 1)); } @@ -52,11 +52,24 @@ class RssController extends Controller * * @return \Symfony\Component\HttpFoundation\Response */ - public function showStarredAction(Request $request, User $user) + public function showStarredRSSAction(Request $request, User $user) { return $this->showEntries('starred', $user, $request->query->get('page', 1)); } + /** + * Shows all entries for current user. + * + * @Route("/{username}/{token}/all.xml", name="all_rss", defaults={"_format"="xml"}) + * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_rsstoken_converter") + * + * @return \Symfony\Component\HttpFoundation\Response + */ + public function showAllRSSAction(Request $request, User $user) + { + return $this->showEntries('all', $user, $request->query->get('page', 1)); + } + /** * Shows entries associated to a tag for current user. * @@ -143,6 +156,10 @@ class RssController extends Controller $qb = $repository->getBuilderForUnreadByUser($user->getId()); break; + case 'all': + $qb = $repository->getBuilderForAllByUser($user->getId()); + break; + default: throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); } diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index 728224797..a8b1eaddb 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -144,7 +144,7 @@ class TagController extends Controller 'form' => null, 'entries' => $entries, 'currentPage' => $page, - 'tag' => $tag->getSlug(), + 'tag' => $tag, ]); } } diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index a91a0ce4e..52904d257 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -90,9 +90,10 @@ config: token_reset: 'Nulstil token' rss_links: 'RSS-Links' rss_link: - unread: 'ulæst' - starred: 'favoritter' - archive: 'arkiv' + unread: 'Ulæst' + starred: 'Favoritter' + archive: 'Arkiv' + # all: 'All' # rss_limit: 'Number of items in the feed' form_user: # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index e77cdca30..481b5d054 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -93,6 +93,7 @@ config: unread: 'Ungelesene' starred: 'Favoriten' archive: 'Archivierte' + # all: 'All' rss_limit: 'Anzahl der Einträge pro Feed' form_user: two_factor_description: "Wenn du die Zwei-Faktor-Authentifizierung aktivierst, erhältst du eine E-Mail mit einem Code bei jeder nicht vertrauenswürdigen Verbindung" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 50edab3a0..98888d057 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -90,9 +90,10 @@ config: token_reset: 'Regenerate your token' rss_links: 'RSS links' rss_link: - unread: 'unread' - starred: 'starred' - archive: 'archived' + unread: 'Unread' + starred: 'Starred' + archive: 'Archived' + all: 'All' rss_limit: 'Number of items in the feed' form_user: two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connection." diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 6fbf00eb4..310a00deb 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -93,6 +93,7 @@ config: unread: 'sin leer' starred: 'favoritos' archive: 'archivados' + # all: 'All' rss_limit: 'Límite de artículos en feed RSS' form_user: two_factor_description: "Con la autenticación en dos pasos recibirá código por e-mail en cada nueva conexión que no sea de confianza." diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index ad7d6cd98..d5247fc36 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -93,6 +93,7 @@ config: unread: 'خوانده‌نشده' starred: 'برگزیده' archive: 'بایگانی' + # all: 'All' rss_limit: 'محدودیت آر-اس-اس' form_user: two_factor_description: "با فعال‌کردن تأیید ۲مرحله‌ای هر بار که اتصال تأییدنشده‌ای برقرار شد، به شما یک کد از راه ایمیل فرستاده می‌شود" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index c4b029c3c..b338eba4a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -88,11 +88,12 @@ config: no_token: "Aucun jeton généré" token_create: "Créez votre jeton" token_reset: "Réinitialisez votre jeton" - rss_links: "Adresse de vos flux RSS" + rss_links: "Adresses de vos flux RSS" rss_link: - unread: "non lus" - starred: "favoris" - archive: "lus" + unread: "Non lus" + starred: "Favoris" + archive: "Lus" + all: "Tous" rss_limit: "Nombre d’articles dans le flux" form_user: two_factor_description: "Activer l’authentification double-facteur veut dire que vous allez recevoir un code par courriel à chaque nouvelle connexion non approuvée." diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 4bd04aadb..a3ff5495b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -90,9 +90,10 @@ config: token_reset: 'Rigenera il tuo token' rss_links: 'Collegamenti RSS' rss_link: - unread: 'non letti' - starred: 'preferiti' - archive: 'archiviati' + unread: 'Non letti' + starred: 'Preferiti' + archive: 'Archiviati' + # all: 'All' rss_limit: 'Numero di elementi nel feed' form_user: two_factor_description: "Abilitando l'\autenticazione a due fattori riceverai una e-mail con un codice per ogni nuova connesione non verificata" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index a6dd4dcd0..a6566a12d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -88,11 +88,12 @@ config: no_token: 'Pas cap de geton generat' token_create: 'Creatz vòstre geton' token_reset: 'Reïnicializatz vòstre geton' - rss_links: 'URL de vòstres fluxes RSS' + rss_links: 'URLs de vòstres fluxes RSS' rss_link: - unread: 'pas legits' - starred: 'favorits' - archive: 'legits' + unread: 'Pas legits' + starred: 'Favorits' + archive: 'Legits' + # all: 'All' rss_limit: "Nombre d'articles dins un flux RSS" form_user: two_factor_description: "Activar l'autentificacion doble-factor vòl dire que recebretz un còdi per corrièl per cada novèla connexion pas aprovada." diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 7312abd79..8e1276d9c 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -90,9 +90,10 @@ config: token_reset: 'Zresetuj swojego tokena' rss_links: 'RSS links' rss_link: - unread: 'nieprzeczytane' - starred: 'oznaczone gwiazdką' - archive: 'archiwum' + unread: 'Nieprzeczytane' + starred: 'Oznaczone gwiazdką' + archive: 'Archiwum' + # all: 'All' rss_limit: 'Link do RSS' form_user: two_factor_description: "Włączenie autoryzacji dwuetapowej oznacza, że będziesz otrzymywał maile z kodem przy każdym nowym, niezaufanym połączeniu" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 18090352d..953c86bb0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml @@ -90,9 +90,10 @@ config: token_reset: 'Gerar novamente seu token' rss_links: 'Links RSS' rss_link: - unread: 'não lido' - starred: 'destacado' - archive: 'arquivado' + unread: 'Não lido' + starred: 'Destacado' + archive: 'Arquivado' + # all: 'All' rss_limit: 'Número de itens no feed' form_user: two_factor_description: 'Habilitar autenticação de dois passos significa que você receberá um e-mail com um código a cada nova conexão desconhecida.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index f8866fdc1..51dbbcafc 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -90,9 +90,10 @@ config: token_reset: 'Resetează-ți token-ul' rss_links: 'Link-uri RSS' rss_link: - unread: 'unread' - starred: 'starred' - archive: 'archived' + unread: 'Unread' + starred: 'Starred' + archive: 'Archived' + # all: 'All' rss_limit: 'Limită RSS' form_user: # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 4d01e7f75..ff19e9d91 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -90,9 +90,10 @@ config: token_reset: 'Belirteci (token) sıfırla' rss_links: 'RSS akış bağlantıları' rss_link: - unread: 'okunmayan' - starred: 'favoriler' - archive: 'arşiv' + unread: 'Okunmayan' + starred: 'Favoriler' + archive: 'Arşiv' + # all: 'All' rss_limit: 'RSS içeriğinden talep edilecek makale limiti' form_user: two_factor_description: "İki adımlı doğrulamayı aktifleştirdiğinizde, her yeni güvenilmeyen bağlantılarda size e-posta ile bir kod alacaksınız." diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index 01f63a7b2..2bf64cd6a 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -82,7 +82,7 @@

{{ 'config.form_settings.android_configuration'|trans }}

- Touch here to prefill your Android application + Touch here to prefill your Android application