Merge pull request #3490 from wallabag/fix-rss-unread-icon

Displayed the RSS icon on homepage route
This commit is contained in:
Nicolas Lœuillet 2017-12-12 20:20:52 +01:00 committed by GitHub
commit 71318d6103
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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 %}