mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-16 10:22:14 +01:00
Show active list in the left menu during search
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
5397d820fe
commit
7d9a67de14
@ -33,17 +33,29 @@
|
||||
{% endblock %}
|
||||
|
||||
{% set currentRoute = app.request.attributes.get('_route') %}
|
||||
{% set currentRouteFromQueryParams = app.request.query.get('currentRoute') %}
|
||||
|
||||
<li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}">
|
||||
{% set activeRoute = null %}
|
||||
{% if currentRoute == 'all' or currentRouteFromQueryParams == 'all' %}
|
||||
{% set activeRoute = 'all' %}
|
||||
{% elseif currentRoute == 'archive' or currentRouteFromQueryParams == 'archive' %}
|
||||
{% set activeRoute = 'archive' %}
|
||||
{% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %}
|
||||
{% set activeRoute = 'starred' %}
|
||||
{% elseif currentRoute == 'unread' or currentRoute == 'homepage' or currentRouteFromQueryParams == 'unread' %}
|
||||
{% set activeRoute = 'unread' %}
|
||||
{% endif %}
|
||||
|
||||
<li class="bold {% if activeRoute == 'unread' %}active{% endif %}">
|
||||
<a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="numberItems grey-text">{{ count_entries('unread') }}</span></a>
|
||||
</li>
|
||||
<li class="bold {% if currentRoute == 'starred' %}active{% endif %}">
|
||||
<li class="bold {% if activeRoute == 'starred' %}active{% endif %}">
|
||||
<a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }} <span class="numberItems grey-text">{{ count_entries('starred') }}</span></a>
|
||||
</li>
|
||||
<li class="bold {% if currentRoute == '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>
|
||||
</li>
|
||||
<li class="bold {% if currentRoute == '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>
|
||||
</li>
|
||||
<li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}">
|
||||
|
Loading…
Reference in New Issue
Block a user