diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | 78 |
1 files changed, 42 insertions, 36 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 f1ef01df..3c169c04 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -19,8 +19,6 @@ | |||
19 | Materialize.toast('{{ flashMessage|trans }}', 4000); | 19 | Materialize.toast('{{ flashMessage|trans }}', 4000); |
20 | </script> | 20 | </script> |
21 | {% endfor %} | 21 | {% endfor %} |
22 | |||
23 | {{ render(controller("WallabagImportBundle:Import:checkQueue")) }} | ||
24 | {% endblock %} | 22 | {% endblock %} |
25 | 23 | ||
26 | {% block menu %} | 24 | {% block menu %} |
@@ -35,17 +33,29 @@ | |||
35 | {% endblock %} | 33 | {% endblock %} |
36 | 34 | ||
37 | {% set currentRoute = app.request.attributes.get('_route') %} | 35 | {% set currentRoute = app.request.attributes.get('_route') %} |
36 | {% set currentRouteFromQueryParams = app.request.query.get('currentRoute') %} | ||
37 | |||
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 %} | ||
38 | 48 | ||
39 | <li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}"> | 49 | <li class="bold {% if activeRoute == 'unread' %}active{% endif %}"> |
40 | <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> |
41 | </li> | 51 | </li> |
42 | <li class="bold {% if currentRoute == 'starred' %}active{% endif %}"> | 52 | <li class="bold {% if activeRoute == 'starred' %}active{% endif %}"> |
43 | <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> |
44 | </li> | 54 | </li> |
45 | <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"> | 55 | <li class="bold {% if activeRoute == 'archive' %}active{% endif %}"> |
46 | <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> |
47 | </li> | 57 | </li> |
48 | <li class="bold {% if currentRoute == 'all' %}active{% endif %}"> | 58 | <li class="bold {% if activeRoute == 'all' %}active{% endif %}"> |
49 | <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> |
50 | </li> | 60 | </li> |
51 | <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"> | 61 | <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"> |
@@ -82,37 +92,33 @@ | |||
82 | {% block title %} | 92 | {% block title %} |
83 | {% endblock %} | 93 | {% endblock %} |
84 | </div> | 94 | </div> |
85 | <div class="input-field nav-panel-buttom"> | 95 | <ul class="input-field nav-panel-buttom"> |
86 | <ul> | 96 | <li class="bold"> |
87 | <li class="bold"> | 97 | <a class="waves-effect tooltipped" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.add_new_entry'|trans }}" href="{{ path('new') }}" id="nav-btn-add"> |
88 | <a class="waves-effect tooltipped" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.add_new_entry'|trans }}" href="{{ path('new') }}" id="nav-btn-add"> | 98 | <i class="material-icons">add</i> |
89 | <i class="material-icons">add</i> | 99 | </a> |
90 | </a> | 100 | </li> |
91 | </li> | 101 | <li> |
92 | <!--<li> | 102 | <a class="waves-effect tooltipped" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.search'|trans }}" href="javascript: void(null);" id="nav-btn-search"> |
93 | <a title="{{ 'menu.top.search'|trans }}" class="waves-effect" href="javascript: void(null);" id="nav-btn-search"> | 103 | <i class="material-icons">search</i> |
94 | <i class="material-icons">search</i> | 104 | </a> |
95 | </a> | 105 | </li> |
96 | </li>--> | 106 | <li id="button_filters"> |
97 | <li id="button_filters"> | 107 | <a class="nav-panel-menu button-collapse-right tooltipped js-filters-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.filter_entries'|trans }}" href="#" data-activates="filters"> |
98 | <a class="nav-panel-menu button-collapse-right tooltipped" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.filter_entries'|trans }}" href="#" data-activates="filters"> | 108 | <i class="material-icons">filter_list</i> |
99 | <i class="material-icons">filter_list</i> | 109 | </a> |
100 | </a> | 110 | </li> |
101 | </li> | 111 | <li id="button_export"> |
102 | <li id="button_export"> | 112 | <a class="nav-panel-menu button-collapse-right tooltipped js-export-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.export'|trans }}" href="#" data-activates="export"> |
103 | <a class="nav-panel-menu button-collapse-right tooltipped" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.export'|trans }}" href="#" data-activates="export"> | 113 | <i class="material-icons">file_download</i> |
104 | <i class="material-icons">file_download</i> | 114 | </a> |
105 | </a> | 115 | </li> |
106 | </li> | 116 | </ul> |
107 | </ul> | 117 | <div class="input-field nav-panel-search" style="display: none"> |
118 | {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }} | ||
119 | <label for="search" class="active"><i class="material-icons search">search</i></label> | ||
120 | <i class="material-icons close">clear</i> | ||
108 | </div> | 121 | </div> |
109 | <form method="get" action="index.php"> | ||
110 | <div class="input-field nav-panel-search" style="display: none"> | ||
111 | <input name="search" id="searchfield" type="search" required placeholder="{{ 'menu.search_form.input_label'|trans }}"> | ||
112 | <label for="search"><i class="material-icons search">search</i></label> | ||
113 | <i class="material-icons close">clear</i> | ||
114 | </div> | ||
115 | </form> | ||
116 | <div class="input-field nav-panel-add" style="display: none"> | 122 | <div class="input-field nav-panel-add" style="display: none"> |
117 | {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} | 123 | {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} |
118 | <label for="add" class="active"><i class="material-icons add">add</i></label> | 124 | <label for="add" class="active"><i class="material-icons add">add</i></label> |