<!DOCTYPE html>
<html lang="pt-br">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{% block title %}Intranet{% endblock %}{% block apptitle %}Intranet{% if app.environment != 'prod' %} DEV{% endif %} | {{ myapp.ownerBars }}{% endblock %}</title>
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
<!--<link href="{{ asset('build/select2/css/select2.min.css') }}" type="text/css">-->
{% endblock %}
{% include('google-analytics.html.twig') %}
</head>
<body class="{% block body_class %}{% endblock %}">
<div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 border-bottom shadow bg-ufmg d-print-none">
<h5 class="my-0 mr-md-auto font-weight-normal">
<a class="text-white" href="{{ path('homepage') }}">
Intranet{%if app.environment != 'prod' %} <i class="fa fa-warning-triangle"></i> DEV{%endif%} | <span class="hidden-xs"> {{ myapp.ownerFull }}</span><span class="visible-xs"> {{ myapp.ownerShort }}</span>
</a>
</h5>
{% block top_links %}{% endblock %}
{% if app.user %}
<div class="dropdown">
<a class="dropdown-toggle text-white" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Olá,
{% if is_granted(ROLE_ADMIN) %}
Administrador(a)
{% elseif is_granted(ROLE_COORDENACAO) %}
Coordenador(a)
{% elseif is_granted(ROLE_PROFESSOR) %}
Professor(a)
{% endif %}
{{ app.user.primeiroNome }}
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="{{ path('perfil') }}">Meus Dados</a>
<a class="dropdown-item" href="{{ path('change_pass') }}">Trocar senha</a>
<a class="dropdown-item" href="{{ path('change_email') }}">Trocar e-mail</a>
{% if is_granted('IS_IMPERSONATOR') %}
<a class="dropdown-item" href="{{ path('homepage', {'_impersonar': '_exit'}) }}">Sair</a>
{% else %}
<a class="dropdown-item" href="{{ path('logout') }}">Sair</a>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% block outer_body %}{% endblock %}
{% block container %}
<div class="{% block container_class %}container{% endblock %}">
{% block body %}{% endblock %}
</div>
{% endblock %}
<div id="footer-spacer" class="my-5"></div>
<footer class="fixed-bottom">
<div class="bg-secondary p-2 d-flex justify-content-between">
<span class="text-center my-auto text-white">{{ myapp.name }} © {{ ''|date('Y') }} <strong>{{ myapp.ownerLong }}</strong></span>
<span class="text-center my-auto text-white small">Versão {{myapp.version}} - Desenvolvido por <strong>{% if myapp.makerSite is not empty %}<a href="{{myapp.makerSite}}" rel="noopener" target="_blank" class="text-white font-weight-bold">{{myapp.makerName}}</a>{% else %}{{ myapp.makerName }}{% endif %}</strong></span>
</div>
</footer>
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
<script src="{{ asset('build/select2/js/select2.min.js') }}"></script>
<script src="{{ asset('build/select2/js/i18n/pt-BR.js') }}"></script>
{% for msg in app.flashes('success') %}
<script>
swal({
title: "Sucesso!",
text: "{{ msg }}",
icon: "success",
});
</script>
{% endfor %}
{% for msg in app.flashes('error') %}
<script>
swal({
title: "Erro!",
text: "{{ msg }}",
icon: "error",
});
</script>
{% endfor %}
{% for msg in app.flashes('warning') %}
<script>
swal({
title: "Atenção!",
text: "{{ msg }}",
icon: "warning",
});
</script>
{% endfor %}
{% endblock %}
</body>
</html>