templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5.         <title>{% block title %}Beehive{% endblock %}</title>
  6.         {% block stylesheets %}
  7.             <link href="{{ asset('css/960/reset.css') }}" type="text/css" rel="stylesheet" />
  8.             <link href="{{ asset('css/960/text.css') }}" type="text/css" rel="stylesheet" />
  9.             <link href="{{ asset('css/960/960.css') }}" type="text/css" rel="stylesheet" />
  10.             <link href="{{ asset('css/jquery/dark-hive/jquery-ui-1.8.17.custom.css') }}" type="text/css" rel="stylesheet" />
  11.             <link href="{{ asset('css/main.css?8') }}" type="text/css" rel="stylesheet" />
  12.             <link href="{{ asset('css/print.css') }}" type="text/css" rel="stylesheet" media="print" />
  13.         {% endblock %}
  14.         <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
  15.     {% include 'matomo.html' %}
  16.     </head>
  17.     <body>
  18.         {% if app.environment == 'dev' %}
  19.           <img src="{{ asset('images/dev.png') }}" alt="bleeding edge" width="100" style="position: fixed; right: 0; z-index: 999;" />
  20.         {% endif %}
  21.         <div id="site">
  22.             <div id="header">
  23.               {% if app.user %}
  24.                 <span>Hallo {{ app.user.name }}!</span>
  25.                 <div id="navigation" class="ui-widget">
  26.                   <div>Navigation</div>
  27.                   <ul id="menu" class="ui-corner-all" style="display: none;">
  28.                     {% set navigation = {
  29.                     'Berichtigungen': {'PapyrillioBeehive_CorrectionList': {'title': 'Berichtigungen ansehen', 'parameters': {}}, 
  30.                                        'PapyrillioBeehive_CorrectionNew': {'title': 'Neue Berichtigung anlegen', 'parameters': {}}, 
  31.                                        'PapyrillioBeehive_Apiary': {'title': 'Bestand durchblättern', 'parameters': {}}},
  32.                     'Editionen':      {'PapyrillioBeehive_EditionList': {'title': 'Editionen ansehen', 'parameters': {}}, 
  33.                                        'PapyrillioBeehive_EditionNew': {'title': 'Edition anlegen', 'parameters': {}}},
  34.                     'Berichte':       {'PapyrillioBeehive_Report': {'title': 'Leiden Format', 'parameters': {}},
  35.                                        'PapyrillioBeehive_ReportOverview': {'title': 'Übersicht nach Editionen*', 'parameters': {}},
  36.                                        'PapyrillioBeehive_ReportPdf': {'title': 'PDF*', 'parameters': {}},
  37.                                        'PapyrillioBeehive_ReportPrint': {'title': 'Druckvorstufe', 'parameters': {}}},
  38.                     'Index':          {'PapyrillioBeehive_IndexEntryManageAssignments': {'title': 'Indexeinträge zuordnen', 'parameters': {}}, 
  39.                                        'PapyrillioBeehive_IndexEntryNew': {'title': 'Indexeinträge nach BL (im Frontend)', 'parameters': {'compilationId': 5}}},
  40.                     'Benutzer':       {'PapyrillioBeehive_UserList': {'title': 'Alle Benutzer anzeigen', 'parameters': {}},
  41.                                        'PapyrillioBeehive_UserNew': {'title': 'Neuen Benutzer anlegen', 'parameters': {}},
  42.                                        'PapyrillioBeehive_UserShow': {'title': 'Profil', 'parameters': { 'id': app.user.id }},
  43.                                        'PapyrillioBeehive_UserPassword': {'title': 'Passwort ändern', 'parameters': {}}, 
  44.                                        'PapyrillioBeehive_Logout': {'title': 'Abmelden', 'parameters': {}}}
  45.                                        } %}
  46.                     
  47.                     {% for category, menu in navigation %}
  48.                       <li>
  49.                         {{ category }}
  50.                         <ul>
  51.                           {% for path, item in menu %}
  52.                             {% if path == app.request.attributes.get('_route') %}
  53.                               <li class="highlight">{{ item.title }}</li>
  54.                             {% else %}
  55.                               <li><a href="{{ path(path, item.parameters) }}">{{ item.title }}</a></li>
  56.                             {% endif %}
  57.                           {% endfor %}
  58.                         </ul>
  59.                       </li>
  60.                     {% endfor %}
  61.                   </ul>
  62.                   
  63.                 </div>
  64.               {% elseif app.request.attributes.get('_route') %}
  65.                 <a href="{{ path('PapyrillioBeehive_Login') }}">Login</a>
  66.               {% endif %}
  67.             </div>
  68.             <div id="content">
  69.                 {% if app.session.flashbag.peekAll() %}
  70.                   <div class="ui-widget">
  71.                     <div style="padding: 0 .7em;" class="ui-state-error ui-corner-all"> 
  72.                       {% for label, messages in app.flashes %}
  73.                         {% for message in messages %}
  74.                           <p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> <strong>{{ label|trans }}:</strong> {{ message }}</p>
  75.                         {% endfor %}
  76.                       {% endfor %}
  77.                     </div>
  78.                   </div>
  79.                 {% endif %}
  80.                 {% block body %}{% endblock %}
  81.             </div>
  82.             <div id="footer">
  83.                 <p>
  84.                     {% if app.user %}
  85.                       <a href="{{ path('PapyrillioBeehive_Logout') }}">Abmelden</a>
  86.                     {% endif %}
  87.                     <a href="{{ path('PapyrillioBeehive_Apiary') }}">Blättern</a>
  88.                     <a href="{{ path('PapyrillioBeehive_About') }}">Info</a>
  89.                     <a href="{{ path('PapyrillioBeehive_Contact') }}">Kontakt</a>
  90.                     <a href="{{ path('PapyrillioBeehive_Help') }}">Hilfe</a>
  91.                     <a href="https://www.uni-heidelberg.de/datenschutzerklaerung_web.html" target="_zde">Zentrale Datenschutzerklärung der Universität Heidelberg</a>
  92.                 </p>
  93.             </div>
  94.         </div>
  95.         {% block javascripts %}
  96.             <script src="{{ asset('js/jquery/jquery-1.7.1.min.js') }}" type="text/javascript"></script>
  97.             <script src="{{ asset('js/jquery/jquery-ui-1.8.17.custom.min.js') }}" type="text/javascript"></script>
  98.             <script src="{{ asset('js/main.js') }}" type="text/javascript"></script>
  99.             <script type="text/javascript">
  100.               $(document).ready(function(){
  101.                
  102.                $('#navigation div').click(function(event){
  103.                  $('#navigation ul#menu').toggle('slide');
  104.                  event.stopPropagation();
  105.                });
  106.                
  107.                $('body').click(function(){
  108.                  if($('#navigation ul#menu').is(':visible')){
  109.                    $('#navigation ul#menu').hide('slide');
  110.                  }
  111.                });
  112.                
  113.               });
  114.             </script>
  115.         {% endblock %}
  116.     </body>
  117. </html>