aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2017-02-04 22:48:34 +0100
committerKevin Decherf <kevin@kdecherf.com>2017-02-05 15:19:52 +0100
commit7d9a67de14bd49db96d87058b7bdfc26bdd53f6e (patch)
tree2ee78755d17f402c89b65dffd3dd1bec49348f22
parent5397d820fe94f1687bb2542e6ffd4b81461c6265 (diff)
downloadwallabag-7d9a67de14bd49db96d87058b7bdfc26bdd53f6e.tar.gz
wallabag-7d9a67de14bd49db96d87058b7bdfc26bdd53f6e.tar.zst
wallabag-7d9a67de14bd49db96d87058b7bdfc26bdd53f6e.zip
Show active list in the left menu during search
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
index d9fb5d73..3c169c04 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -33,17 +33,29 @@
33 {% endblock %} 33 {% endblock %}
34 34
35 {% set currentRoute = app.request.attributes.get('_route') %} 35 {% set currentRoute = app.request.attributes.get('_route') %}
36 {% set currentRouteFromQueryParams = app.request.query.get('currentRoute') %}
36 37
37 <li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}"> 38 {% set activeRoute = null %}
39 {% if currentRoute == 'all' or currentRouteFromQueryParams == 'all' %}
40 {% set activeRoute = 'all' %}
41 {% elseif currentRoute == 'archive' or currentRouteFromQueryParams == 'archive' %}
42 {% set activeRoute = 'archive' %}
43 {% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %}
44 {% set activeRoute = 'starred' %}
45 {% elseif currentRoute == 'unread' or currentRoute == 'homepage' or currentRouteFromQueryParams == 'unread' %}
46 {% set activeRoute = 'unread' %}
47 {% endif %}
48
49 <li class="bold {% if activeRoute == 'unread' %}active{% endif %}">
38 <a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="numberItems grey-text">{{ count_entries('unread') }}</span></a> 50 <a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="numberItems grey-text">{{ count_entries('unread') }}</span></a>
39 </li> 51 </li>
40 <li class="bold {% if currentRoute == 'starred' %}active{% endif %}"> 52 <li class="bold {% if activeRoute == 'starred' %}active{% endif %}">
41 <a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }} <span class="numberItems grey-text">{{ count_entries('starred') }}</span></a> 53 <a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }} <span class="numberItems grey-text">{{ count_entries('starred') }}</span></a>
42 </li> 54 </li>
43 <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"> 55 <li class="bold {% if activeRoute == 'archive' %}active{% endif %}">
44 <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a> 56 <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a>
45 </li> 57 </li>
46 <li class="bold {% if currentRoute == 'all' %}active{% endif %}"> 58 <li class="bold {% if activeRoute == 'all' %}active{% endif %}">
47 <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a> 59 <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a>
48 </li> 60 </li>
49 <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"> 61 <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}">