diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-03 19:09:28 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-03 19:09:28 +0200 |
commit | 59ddb9ae99b97a1a8fa3aa3770a4a2afef333699 (patch) | |
tree | 284253835f947c2e7ffefc9b8c09d95bd324f154 /src/Wallabag/CoreBundle/Resources | |
parent | 543da3e0b7592b1a00a7c5baec1554460609d63f (diff) | |
download | wallabag-59ddb9ae99b97a1a8fa3aa3770a4a2afef333699.tar.gz wallabag-59ddb9ae99b97a1a8fa3aa3770a4a2afef333699.tar.zst wallabag-59ddb9ae99b97a1a8fa3aa3770a4a2afef333699.zip |
Remove Twig globals
Twig Global function are called globally. This means even on a query to the api.
Using a function we can decide when we want to call it.
Also, remove previous `COUNT(e.id)` since it doesn't work on PostgreSQL ...
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | 8 |
1 files changed, 4 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 f64c3da2..06ecbf3d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -35,16 +35,16 @@ | |||
35 | {% set currentRoute = app.request.attributes.get('_route') %} | 35 | {% set currentRoute = app.request.attributes.get('_route') %} |
36 | 36 | ||
37 | <li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}"> | 37 | <li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}"> |
38 | <a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="numberItems grey-text">{{ unreadEntries }}</span></a> | 38 | <a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="numberItems grey-text">{{ count_entries('unread') }}</span></a> |
39 | </li> | 39 | </li> |
40 | <li class="bold {% if currentRoute == 'starred' %}active{% endif %}"> | 40 | <li class="bold {% if currentRoute == 'starred' %}active{% endif %}"> |
41 | <a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }} <span class="numberItems grey-text">{{ starredEntries }}</span></a> | 41 | <a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }} <span class="numberItems grey-text">{{ count_entries('starred') }}</span></a> |
42 | </li> | 42 | </li> |
43 | <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"> | 43 | <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"> |
44 | <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ archivedEntries }}</span></a> | 44 | <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a> |
45 | </li> | 45 | </li> |
46 | <li class="bold border-bottom {% if currentRoute == 'all' %}active{% endif %}"> | 46 | <li class="bold border-bottom {% if currentRoute == 'all' %}active{% endif %}"> |
47 | <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ allEntries }}</span></a> | 47 | <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a> |
48 | </li> | 48 | </li> |
49 | <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"> | 49 | <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"> |
50 | <a class="waves-effect" href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }}</a> | 50 | <a class="waves-effect" href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }}</a> |