]>
Commit | Line | Data |
---|---|---|
53e12188 AD |
1 | {% extends "WallabagCoreBundle::base.html.twig" %} |
2 | ||
3 | {% block css %} | |
4 | {{ parent() }} | |
64f81bc3 | 5 | {% if not app.debug %} |
9ff628ca | 6 | <link rel="stylesheet" href="{{ asset('wallassets/material.css') }}"> |
64f81bc3 | 7 | {% endif %} |
53e12188 AD |
8 | {% endblock %} |
9 | ||
10 | {% block scripts %} | |
11 | {{ parent() }} | |
9ff628ca | 12 | <script src="{{ asset('wallassets/material' ~ (app.debug ? '.dev' : '') ~ '.js') }}"></script> |
53e12188 AD |
13 | {% endblock %} |
14 | ||
15 | {% block header %} | |
16 | {% endblock %} | |
17 | ||
a6523cfe AD |
18 | {% block messages %} |
19 | {% for flashMessage in app.session.flashbag.get('notice') %} | |
20 | <script> | |
8e417206 | 21 | Materialize.toast('{{ flashMessage|trans }}', 4000); |
a6523cfe AD |
22 | </script> |
23 | {% endfor %} | |
24 | {% endblock %} | |
25 | ||
26 | {% block menu %} | |
27 | <nav class="cyan darken-1"> | |
28 | <ul id="slide-out" class="side-nav fixed"> | |
29 | {% block logo %} | |
30 | <li class="logo border-bottom"> | |
0d42217e | 31 | <a title="{{ 'menu.left.back_to_unread'|trans }}" href="{{ path('unread') }}"> |
e93f3720 | 32 | <img src="{{ asset('wallassets/themes/_global/img/logo-square.svg') }}" alt="wallabag logo" /> |
a6523cfe AD |
33 | </a> |
34 | </li> | |
35 | {% endblock %} | |
36 | ||
37 | {% set currentRoute = app.request.attributes.get('_route') %} | |
7d9a67de | 38 | {% set currentRouteFromQueryParams = app.request.query.get('currentRoute') %} |
a6523cfe | 39 | |
7d9a67de KD |
40 | {% set activeRoute = null %} |
41 | {% if currentRoute == 'all' or currentRouteFromQueryParams == 'all' %} | |
42 | {% set activeRoute = 'all' %} | |
43 | {% elseif currentRoute == 'archive' or currentRouteFromQueryParams == 'archive' %} | |
44 | {% set activeRoute = 'archive' %} | |
45 | {% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %} | |
46 | {% set activeRoute = 'starred' %} | |
47 | {% elseif currentRoute == 'unread' or currentRoute == 'homepage' or currentRouteFromQueryParams == 'unread' %} | |
48 | {% set activeRoute = 'unread' %} | |
50f35f0d JB |
49 | {% elseif currentRoute == 'untagged' %} |
50 | {% set activeRoute = 'untagged' %} | |
7d9a67de KD |
51 | {% endif %} |
52 | ||
53 | <li class="bold {% if activeRoute == 'unread' %}active{% endif %}"> | |
59ddb9ae | 54 | <a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="numberItems grey-text">{{ count_entries('unread') }}</span></a> |
0d42217e | 55 | </li> |
7d9a67de | 56 | <li class="bold {% if activeRoute == 'starred' %}active{% endif %}"> |
59ddb9ae | 57 | <a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }} <span class="numberItems grey-text">{{ count_entries('starred') }}</span></a> |
0d42217e | 58 | </li> |
7d9a67de | 59 | <li class="bold {% if activeRoute == 'archive' %}active{% endif %}"> |
59ddb9ae | 60 | <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a> |
0d42217e | 61 | </li> |
7d9a67de | 62 | <li class="bold {% if activeRoute == 'all' %}active{% endif %}"> |
59ddb9ae | 63 | <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a> |
0d42217e JB |
64 | </li> |
65 | <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"> | |
429d86f3 | 66 | <a class="waves-effect" href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }} <span class="numberItems grey-text">{{ count_tags() }}</span></a> |
0d42217e JB |
67 | </li> |
68 | <li class="bold {% if currentRoute == 'config' %}active{% endif %}"> | |
69 | <a class="waves-effect" href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a> | |
70 | </li> | |
b8427f22 JB |
71 | {% if craue_setting('restricted_access') %} |
72 | <li class="bold {% if currentRoute starts with 'site_credentials_' %}active{% endif %}"> | |
73 | <a class="waves-effect" href="{{ path('site_credentials_index') }}">{{ 'menu.left.site_credentials'|trans }}</a> | |
74 | </li> | |
75 | {% endif %} | |
63e40f2d | 76 | {% if is_granted('ROLE_SUPER_ADMIN') %} |
152fcccd JB |
77 | <li class="bold {% if currentRoute starts with 'user_' %}active{% endif %}"> |
78 | <a class="waves-effect" href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a> | |
79 | </li> | |
80 | ||
0d42217e JB |
81 | <li class="bold border-bottom {% if currentRoute == 'craue_config_settings_modify' %}active{% endif %}"> |
82 | <a class="waves-effect" href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a> | |
83 | </li> | |
63e40f2d | 84 | {% endif %} |
0d42217e JB |
85 | <li class="bold {% if currentRoute == 'import' %}active{% endif %}"> |
86 | <a class="waves-effect" href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a> | |
87 | </li> | |
88 | <li class="bold {% if currentRoute == 'developer' %}active{% endif %}"> | |
89 | <a class="waves-effect" href="{{ path('developer') }}">{{ 'menu.left.developer'|trans }}</a> | |
90 | </li> | |
91 | <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"> | |
92 | <a class="waves-effect" href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a> | |
93 | </li> | |
d010bdd4 JB |
94 | <li class="bold {% if currentRoute == 'quickstart' %}active{% endif %}"> |
95 | <a class="waves-effect" href="{{ path('quickstart') }}">{{ 'menu.left.quickstart'|trans }}</a> | |
96 | </li> | |
0d42217e | 97 | <li class="bold"> |
c5e4293e | 98 | <a class="waves-effect icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a> |
0d42217e | 99 | </li> |
a6523cfe | 100 | </ul> |
2831e77c S |
101 | <div class="nav-panels"> |
102 | <div class="nav-panel-actions nav-panel-item"> | |
103 | <div class="nav-panel-top"> | |
104 | <button data-activates="slide-out" class="nav-panel-menu button-collapse"><i class="material-icons">menu</i></button> | |
105 | <h1 class="left action"> | |
106 | {% block title %} | |
107 | {% endblock %} | |
108 | </h1> | |
109 | </div> | |
110 | <ul class="input-field nav-panel-buttom"> | |
111 | <li class="bold"> | |
112 | <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"> | |
113 | <i class="material-icons">add</i> | |
114 | </a> | |
115 | </li> | |
116 | <li> | |
117 | <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"> | |
118 | <i class="material-icons">search</i> | |
119 | </a> | |
120 | </li> | |
50f35f0d JB |
121 | {% if activeRoute %} |
122 | <li id="button_random"> | |
123 | <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': activeRoute }) }}"> | |
fe5850d6 | 124 | <i class="material-icons">casino</i> |
50f35f0d JB |
125 | </a> |
126 | </li> | |
127 | {% endif %} | |
2831e77c S |
128 | <li id="button_filters"> |
129 | <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"> | |
130 | <i class="material-icons">filter_list</i> | |
131 | </a> | |
132 | </li> | |
133 | <li id="button_export"> | |
134 | <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"> | |
135 | <i class="material-icons">file_download</i> | |
136 | </a> | |
137 | </li> | |
138 | </ul> | |
053b9568 | 139 | </div> |
50f35f0d | 140 | {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': currentRoute})) }} |
2831e77c | 141 | {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} |
a6523cfe AD |
142 | </div> |
143 | </nav> | |
144 | {% endblock %} | |
4e9f656e NL |
145 | |
146 | {% block footer %} | |
e77cde45 NL |
147 | <footer class="page-footer cyan darken-2"> |
148 | <div class="footer-copyright"> | |
149 | <div class="container"> | |
1264029c | 150 | <div class="row"> |
a6beec1b S |
151 | <div class="col m12 l8"> |
152 | <p class="footer-text" title="{{ display_stats() | raw | striptags }}"> | |
1264029c JB |
153 | {{ display_stats() }} |
154 | </p> | |
155 | </div> | |
d56d416d | 156 | <div class="col s12 l4"> |
a6beec1b | 157 | <p class="footer-text"> |
a22b8043 | 158 | {{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" rel="noopener" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a> – |
1264029c JB |
159 | <a class="grey-text text-lighten-4" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans|lower }}</a> |
160 | </p> | |
161 | </div> | |
162 | </div> | |
e77cde45 NL |
163 | </div> |
164 | </div> | |
165 | </footer> | |
4e9f656e | 166 | {% endblock %} |