forked from wallabag/wallabag
Back-end hide/show of random, export and filters actions
This commit is contained in:
@ -1,5 +1,23 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% set current_route = app.request.attributes.get('_route') %}
|
||||
{% set current_route_from_query_params = app.request.query.get('currentRoute') %}
|
||||
|
||||
{% set active_route = null %}
|
||||
{% if current_route == 'all' or current_route_from_query_params == 'all' %}
|
||||
{% set active_route = 'all' %}
|
||||
{% elseif current_route == 'annotated' or current_route_from_query_params == 'annotated' %}
|
||||
{% set active_route = 'annotated' %}
|
||||
{% elseif current_route == 'archive' or current_route_from_query_params == 'archive' %}
|
||||
{% set active_route = 'archive' %}
|
||||
{% elseif current_route == 'starred' or current_route_from_query_params == 'starred' %}
|
||||
{% set active_route = 'starred' %}
|
||||
{% elseif current_route == 'unread' or current_route == 'homepage' or current_route_from_query_params == 'unread' %}
|
||||
{% set active_route = 'unread' %}
|
||||
{% elseif current_route == 'untagged' %}
|
||||
{% set active_route = 'untagged' %}
|
||||
{% endif %}
|
||||
|
||||
{% block css %}
|
||||
{{ parent() }}
|
||||
|
||||
@ -38,24 +56,6 @@
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
{% set current_route = app.request.attributes.get('_route') %}
|
||||
{% set current_route_from_query_params = app.request.query.get('currentRoute') %}
|
||||
|
||||
{% set active_route = null %}
|
||||
{% if current_route == 'all' or current_route_from_query_params == 'all' %}
|
||||
{% set active_route = 'all' %}
|
||||
{% elseif current_route == 'annotated' or current_route_from_query_params == 'annotated' %}
|
||||
{% set active_route = 'annotated' %}
|
||||
{% elseif current_route == 'archive' or current_route_from_query_params == 'archive' %}
|
||||
{% set active_route = 'archive' %}
|
||||
{% elseif current_route == 'starred' or current_route_from_query_params == 'starred' %}
|
||||
{% set active_route = 'starred' %}
|
||||
{% elseif current_route == 'unread' or current_route == 'homepage' or current_route_from_query_params == 'unread' %}
|
||||
{% set active_route = 'unread' %}
|
||||
{% elseif current_route == 'untagged' %}
|
||||
{% set active_route = 'untagged' %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('LIST_ENTRIES') %}
|
||||
<li class="bold {% if active_route == 'unread' %}active{% endif %}">
|
||||
<a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="items-number grey-text">{{ count_entries('unread') }}</span></a>
|
||||
@ -99,23 +99,7 @@
|
||||
<i class="material-icons">search</i>
|
||||
</a>
|
||||
</li>
|
||||
{% if active_route and is_granted('LIST_ENTRIES') %}
|
||||
<li id="button_random">
|
||||
<a class="waves-effect tooltipped js-random-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.random_entry'|trans }}" href="{{ path('random_entry', {'type': active_route}) }}">
|
||||
<i class="material-icons">casino</i>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="button_filters" class="button-filters">
|
||||
<a class="nav-panel-menu sidenav-trigger tooltipped js-filters-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.filter_entries'|trans }}" href="#" data-target="filters">
|
||||
<i class="material-icons">filter_list</i>
|
||||
</a>
|
||||
</li>
|
||||
<li id="button_export" class="button-export">
|
||||
<a class="nav-panel-menu sidenav-trigger tooltipped js-export-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.export'|trans }}" href="#" data-target="export">
|
||||
<i class="material-icons">file_download</i>
|
||||
</a>
|
||||
</li>
|
||||
{% block nav_panel_extra_actions '' %}
|
||||
<li class="bold">
|
||||
<a class="wave-effect tooltipped dropdown-trigger" data-covertrigger="false" data-constrainwidth="false" data-target="dropdown-account" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.account'|trans }}" href="#" id="news_menu">
|
||||
<i class="material-icons" id="news_link">account_circle</i>
|
||||
|
||||
Reference in New Issue
Block a user