wallabag/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig

155 lines
8.3 KiB
Twig
Raw Normal View History

2015-08-04 14:18:15 +00:00
{% extends "WallabagCoreBundle::base.html.twig" %}
{% block css %}
{{ parent() }}
{% if not app.debug %}
<link rel="stylesheet" href="{{ asset('wallassets/material.css') }}">
{% endif %}
2015-08-04 14:18:15 +00:00
{% endblock %}
{% block scripts %}
{{ parent() }}
<script src="{{ asset('wallassets/material' ~ (app.debug ? '.dev' : '') ~ '.js') }}"></script>
2015-08-04 14:18:15 +00:00
{% endblock %}
{% block header %}
{% endblock %}
2015-08-07 21:16:14 +00:00
{% block messages %}
{% for flashMessage in app.session.flashbag.get('notice') %}
<script>
2015-09-30 16:17:40 +00:00
Materialize.toast('{{ flashMessage|trans }}', 4000);
2015-08-07 21:16:14 +00:00
</script>
{% endfor %}
{% endblock %}
{% block menu %}
<nav class="cyan darken-1">
<ul id="slide-out" class="side-nav fixed">
{% block logo %}
<li class="logo border-bottom">
<a title="{{ 'menu.left.back_to_unread'|trans }}" href="{{ path('unread') }}">
<img src="{{ asset('wallassets/themes/_global/img/logo-square.svg') }}" alt="wallabag logo" />
2015-08-07 21:16:14 +00:00
</a>
</li>
{% endblock %}
{% set currentRoute = app.request.attributes.get('_route') %}
{% set currentRouteFromQueryParams = app.request.query.get('currentRoute') %}
2015-08-07 21:16:14 +00:00
{% set activeRoute = null %}
{% if currentRoute == 'all' or currentRouteFromQueryParams == 'all' %}
{% set activeRoute = 'all' %}
{% elseif currentRoute == 'archive' or currentRouteFromQueryParams == 'archive' %}
{% set activeRoute = 'archive' %}
{% elseif currentRoute == 'starred' or currentRouteFromQueryParams == 'starred' %}
{% set activeRoute = 'starred' %}
{% elseif currentRoute == 'unread' or currentRoute == 'homepage' or currentRouteFromQueryParams == 'unread' %}
{% set activeRoute = 'unread' %}
{% endif %}
<li class="bold {% if activeRoute == 'unread' %}active{% endif %}">
<a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="numberItems grey-text">{{ count_entries('unread') }}</span></a>
</li>
<li class="bold {% if activeRoute == 'starred' %}active{% endif %}">
<a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }} <span class="numberItems grey-text">{{ count_entries('starred') }}</span></a>
</li>
<li class="bold {% if activeRoute == 'archive' %}active{% endif %}">
<a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a>
</li>
<li class="bold {% if activeRoute == 'all' %}active{% endif %}">
<a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a>
</li>
<li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}">
<a class="waves-effect" href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }} <span class="numberItems grey-text">{{ count_tags() }}</span></a>
</li>
<li class="bold {% if currentRoute == 'config' %}active{% endif %}">
<a class="waves-effect" href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a>
</li>
{% if craue_setting('restricted_access') %}
<li class="bold {% if currentRoute starts with 'site_credentials_' %}active{% endif %}">
<a class="waves-effect" href="{{ path('site_credentials_index') }}">{{ 'menu.left.site_credentials'|trans }}</a>
</li>
{% endif %}
2016-01-21 07:53:09 +00:00
{% if is_granted('ROLE_SUPER_ADMIN') %}
<li class="bold {% if currentRoute starts with 'user_' %}active{% endif %}">
<a class="waves-effect" href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a>
</li>
<li class="bold border-bottom {% if currentRoute == 'craue_config_settings_modify' %}active{% endif %}">
<a class="waves-effect" href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a>
</li>
2016-01-21 07:53:09 +00:00
{% endif %}
<li class="bold {% if currentRoute == 'import' %}active{% endif %}">
<a class="waves-effect" href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a>
</li>
<li class="bold {% if currentRoute == 'developer' %}active{% endif %}">
<a class="waves-effect" href="{{ path('developer') }}">{{ 'menu.left.developer'|trans }}</a>
</li>
<li class="bold {% if currentRoute == 'howto' %}active{% endif %}">
<a class="waves-effect" href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a>
</li>
<li class="bold">
2016-10-09 01:37:21 +00:00
<a class="waves-effect icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a>
</li>
2015-08-07 21:16:14 +00:00
</ul>
<div class="nav-panels">
<div class="nav-panel-actions nav-panel-item">
<div class="nav-panel-top">
<button data-activates="slide-out" class="nav-panel-menu button-collapse"><i class="material-icons">menu</i></button>
<h1 class="left action">
{% block title %}
{% endblock %}
</h1>
</div>
<ul class="input-field nav-panel-buttom">
<li class="bold">
<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">
<i class="material-icons">add</i>
</a>
</li>
<li>
<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">
<i class="material-icons">search</i>
</a>
</li>
<li id="button_filters">
<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">
<i class="material-icons">filter_list</i>
</a>
</li>
<li id="button_export">
<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">
<i class="material-icons">file_download</i>
</a>
</li>
</ul>
2015-08-12 06:22:30 +00:00
</div>
{{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }}
{{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }}
2015-08-07 21:16:14 +00:00
</div>
</nav>
{% endblock %}
2015-10-01 09:38:59 +00:00
{% block footer %}
2016-09-15 09:11:24 +00:00
<footer class="page-footer cyan darken-2">
<div class="footer-copyright">
<div class="container">
2016-10-01 13:58:26 +00:00
<div class="row">
2017-12-06 21:46:24 +00:00
<div class="col m12 l8">
<p class="footer-text" title="{{ display_stats() | raw | striptags }}">
2016-10-01 13:58:26 +00:00
{{ display_stats() }}
</p>
</div>
<div class="col s12 l4">
2017-12-06 21:46:24 +00:00
<p class="footer-text">
2016-10-01 13:58:26 +00:00
{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a>
<a class="grey-text text-lighten-4" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans|lower }}</a>
</p>
</div>
</div>
2016-09-15 09:11:24 +00:00
</div>
</div>
</footer>
2015-10-01 09:38:59 +00:00
{% endblock %}