]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Displayed the RSS icon on homepage route 3490/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 12 Dec 2017 14:42:49 +0000 (15:42 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 12 Dec 2017 14:42:49 +0000 (15:42 +0100)
src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig

index 2bf9b2bd735d1852ac32f13c5a7a8831d206b635..eb26054cb84aa85eead5b2905c232363fa19015e 100644 (file)
@@ -1,6 +1,11 @@
 {% if tag is defined %}
     <a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
-{% elseif currentRoute in ['unread', 'starred', 'archive', 'all'] %}
-    <a rel="alternate" type="application/rss+xml" href="{{ path(currentRoute ~ '_rss', {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
-{% endif %}
+{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
+    {% set rssRoute = currentRoute %}
+    {% if currentRoute == 'homepage' %}
+        {% set rssRoute = 'unread' %}
+    {% endif %}
+    {% set rssRoute = rssRoute ~ '_rss' %}
 
+    <a rel="alternate" type="application/rss+xml" href="{{ path(rssRoute, {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
+{% endif %}