templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="pt-br">
  3. <head>
  4.     <!-- Required meta tags -->
  5.     <meta charset="utf-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.     <title>{% block title %}Intranet{% endblock %}{% block apptitle %}Intranet{% if app.environment != 'prod' %} DEV{% endif %} | {{ myapp.ownerBars }}{% endblock %}</title>
  8.     {% block stylesheets %}
  9.         {{ encore_entry_link_tags('app') }}
  10.         <!--<link href="{{ asset('build/select2/css/select2.min.css') }}" type="text/css">-->
  11.     {% endblock %}
  12.     {% include('google-analytics.html.twig') %}
  13. </head>
  14. <body class="{% block body_class %}{% endblock %}">
  15. <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">
  16.     <h5 class="my-0 mr-md-auto font-weight-normal">
  17.         <a class="text-white" href="{{ path('homepage') }}">
  18.             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>
  19.         </a>
  20.     </h5>
  21.     {% block top_links %}{% endblock %}
  22.     {% if app.user %}
  23.         <div class="dropdown">
  24.             <a class="dropdown-toggle text-white" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  25.                 Olá,
  26.                 {% if is_granted(ROLE_ADMIN) %}
  27.                     Administrador(a)
  28.                 {% elseif is_granted(ROLE_COORDENACAO) %}
  29.                     Coordenador(a)
  30.                 {% elseif is_granted(ROLE_PROFESSOR) %}
  31.                     Professor(a)
  32.                 {% endif %}
  33.                 {{ app.user.primeiroNome }}
  34.             </a>
  35.             <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
  36.                 <a class="dropdown-item" href="{{ path('perfil') }}">Meus Dados</a>
  37.                 <a class="dropdown-item" href="{{ path('change_pass') }}">Trocar senha</a>
  38.                 <a class="dropdown-item" href="{{ path('change_email') }}">Trocar e-mail</a>
  39.                 {% if is_granted('IS_IMPERSONATOR') %}
  40.                     <a class="dropdown-item" href="{{ path('homepage', {'_impersonar': '_exit'}) }}">Sair</a>
  41.                 {% else %}
  42.                     <a class="dropdown-item" href="{{ path('logout') }}">Sair</a>
  43.                 {% endif %}
  44.             </div>
  45.         </div>
  46.     {% endif %}
  47. </div>
  48. {% block outer_body %}{% endblock %}
  49. {% block container %}
  50.     <div class="{% block container_class %}container{% endblock %}">
  51.         {% block body %}{% endblock %}
  52.     </div>
  53. {% endblock %}
  54. <div id="footer-spacer" class="my-5"></div>
  55. <footer class="fixed-bottom">
  56.     <div class="bg-secondary p-2 d-flex justify-content-between">
  57.         <span class="text-center my-auto text-white">{{ myapp.name }} &copy; {{ ''|date('Y') }} <strong>{{ myapp.ownerLong }}</strong></span>
  58.         <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>
  59.     </div>
  60. </footer>
  61. {% block javascripts %}
  62.     {{ encore_entry_script_tags('app') }}
  63.     <script src="{{ asset('build/select2/js/select2.min.js') }}"></script>
  64.     <script src="{{ asset('build/select2/js/i18n/pt-BR.js') }}"></script>
  65.     {% for msg in app.flashes('success') %}
  66.     <script>
  67.         swal({
  68.             title: "Sucesso!",
  69.             text: "{{ msg }}",
  70.             icon: "success",
  71.         });
  72.     </script>
  73.     {% endfor %}
  74.     {% for msg in app.flashes('error') %}
  75.     <script>
  76.         swal({
  77.             title: "Erro!",
  78.             text: "{{ msg }}",
  79.             icon: "error",
  80.         });
  81.     </script>
  82.     {% endfor %}
  83.     {% for msg in app.flashes('warning') %}
  84.     <script>
  85.         swal({
  86.             title: "Atenção!",
  87.             text: "{{ msg }}",
  88.             icon: "warning",
  89.         });
  90.     </script>
  91.     {% endfor %}
  92. {% endblock %}
  93. </body>
  94. </html>