{% extends '::base.html.twig' %}

{% block stylesheets %}
    {{ parent() }}
    <link href="{{ asset('bundles/vgmwo/css/vgm_styles.css') }}" rel="stylesheet">
    <style>.navbar-inverse {border-radius: 0px;}</style>
{% endblock %}

{% block javascripts %}
    {{ parent() }}
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.0/knockout-min.js"></script>
    <script type="text/javascript" src="{{ asset('bundles/vgmwo/js/customized/utils/Utils.js') }}"></script>
    {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_OTS_CORDINATOR')
    or is_granted('ROLE_SUPER_SUPERVISOR') or is_granted('ROLE_SUPERVISOR') %}
        <script type="text/javascript">
            function getURLNewLoopNotices(){
                return '{{ path("theres_new_loop_notices") }}';
            }
        </script>
        <script type="text/javascript" src="{{ asset('bundles/vgmwo/js/customized/MainMenu/MainMenu.js') }}"></script>
        <script type="text/javascript">
            // Activates knockout.js
            ko.applyBindings(baseViewModel, document.getElementById("menu-bar"));
        </script>
    {% endif %}
{% endblock %}

{% block body %}
    <!-- Static navbar -->
    <nav class="navbar-inverse menu-bar" role="navigation" id="menu-bar">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapsable-menu">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a href="{{ path('homepage') }}">
                    <img class="image-brand" src="{{ asset('bundles/vgmwo/images/logo/Navy Blue/Navy Blue-48px.png') }}"
                         onmouseover="this.src='{{ asset('bundles/vgmwo/images/logo/Gray/full-48px.png') }}'"
                         onmouseout="this.src='{{ asset('bundles/vgmwo/images/logo/Navy Blue/Navy Blue-48px.png') }}'"/>
                    <span class="navbar-brand">Aeroservicios USA</span>
                </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar-collapsable-menu">
                <ul class="nav navbar-nav navbar-right">
                    {% block menu_items %}
                        {% block menu_user_content %}
                            {% include "VGMWOBundle:Menu_parts:menu_user.html.twig" %}
                        {% endblock menu_user_content %}
                        {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_OTS_CORDINATOR')
                            or is_granted('ROLE_SUPER_SUPERVISOR') or is_granted('ROLE_SUPERVISOR')
                            or is_granted('ROLE_HUMAN_RESOURCES') or is_granted('ROLE_GENERAL_SUPERVISOR')%}
                            {% block menu_managment_content %}
                                {% include "VGMWOBundle:Menu_parts:menu_managment.htm.twig" %}
                            {% endblock menu_managment_content %}
                            {% if is_granted('ROLE_GENERAL_SUPERVISOR') or is_granted('ROLE_OTS_CORDINATOR')
                            or is_granted('ROLE_SUPER_SUPERVISOR') or is_granted('ROLE_SUPERVISOR') %}
                                {% block menu_report_content %}
                                    {% include "VGMWOBundle:Menu_parts:menu_report.html.twig" %}
                                {% endblock menu_report_content %}

                                {% block menu_notifications_content %}
                                    {% include "VGMWOBundle:Menu_parts:menu_notifications.html.twig" %}
                                {% endblock menu_notifications_content %}
                            {% endif %}
                            {% if is_granted('ROLE_ADMIN') %}
                                {% block menu_security_content %}
                                    {% include "VGMWOBundle:Menu_parts:menu_security.html.twig" %}
                                {% endblock menu_security_content %}
                            {% endif %}
                        {% endif %}
                    {% endblock %}
                </ul>
            </div>
        </div>
    </nav>
    <div id="content-body" style="padding-top: 10px;">
        {% block jumbotron_content %}{% endblock %}
        {% block content %}{% endblock %}
    </div>
{% endblock %}