<!DOCTYPE html>
<html  class="no-js css-menubar" lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
        <meta name="description" content="bootstrap admin template">
        <meta name="author" content="">

        <title>{% block title %}{{ project_name }}{% endblock %}</title>

        <link rel="apple-touch-icon" href="/bundles/main/images/apple-touch-icon.png">
        <link rel="shortcut icon" href="/bundles/main/images/favicon.ico">
        <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />

        <!-- Stylesheets -->
        <link rel="stylesheet" href="{{ asset('/bundles/main/css/bootstrap.min.css') }}">
        <link rel="stylesheet" href="{{ asset('/bundles/main/css/bootstrap-extend.min.css') }}">

        <!-- Plugins -->


<!-- <link rel="stylesheet" href="{{ asset('/bundles/main/vendor/animsition/animsition.css') }}"> -->

        <link rel="stylesheet" href="{{ asset('/bundles/main/vendor/asscrollable/asScrollable.css') }}">
        <link rel="stylesheet" href="{{ asset('/bundles/main/vendor/switchery/switchery.css') }}">
        <link rel="stylesheet" href="{{ asset('/bundles/main/vendor/intro-js/introjs.css') }}">
        <link rel="stylesheet" href="{{ asset('/bundles/main/vendor/slidepanel/slidePanel.css') }}">
        <link rel="stylesheet" href="{{ asset('/bundles/main/vendor/flag-icon-css/flag-icon.css') }}">

        <!-- Plugins For This Page -->
        <link rel="stylesheet" href="{{ asset('/bundles/main/vendor/datatables-bootstrap/dataTables.bootstrap.css') }}">
        <link rel="stylesheet" href="{{ asset('/bundles/main/vendor/datatables-fixedheader/dataTables.fixedHeader.css') }}">
        <link rel="stylesheet" href="{{ asset('/bundles/main/vendor/datatables-responsive/dataTables.responsive.css') }}">



        <!-- Page -->
        <link rel="stylesheet" href="{{ asset('/bundles/main/fonts/font-awesome/font-awesome.css') }}">

        <!-- Fonts -->
        <link rel="stylesheet" href="{{ asset('/bundles/main/fonts/web-icons/web-icons.min.css') }}">
        <link rel="stylesheet" href="{{ asset('/bundles/main/fonts/brand-icons/brand-icons.min.css') }}">
        <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,300italic'>

    {% block stylesheets %}{% endblock %}

    <!-- Inline -->
    <link rel="stylesheet" href="{{ asset('/bundles/main/css/datatable.css') }}">


    <link rel="stylesheet" href="{{ asset('/bundles/main/css/site.css') }}">

    <link rel="stylesheet" href="{{ asset('/bundles/main/css/rtl.css') }}">


    <!--[if lt IE 9]>
      <script src="{{ asset('/bundles/main/vendor/html5shiv/html5shiv.min.js') }}"></script>
      <![endif]-->

    <!--[if lt IE 10]>
      <script src="{{ asset('/bundles/main/vendor/media-match/media.match.min.js')}}"></script>
      <script src="{{ asset('/bundles/main/vendor/respond/respond.min.js')}}"></script>
      <![endif]-->

    <!-- Scripts -->
    <script src="{{ asset('/bundles/main/assets/vendor/modernizr/modernizr.js') }}"></script>
    <script src="{{ asset('/bundles/main/assets/vendor/breakpoints/breakpoints.js') }}"></script>



    <script>
        Breakpoints();
    </script>


    <script src="{{ asset('/bundles/main/assets/vendor/jquery/jquery.js') }}"></script>


</head>

<body>

    <!--[if lt IE 8]>
        <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->

    <nav class="site-navbar navbar navbar-default navbar-fixed-top navbar-mega" role="navigation">

        <div class="navbar-header">
            <button type="button" class="navbar-toggle hamburger hamburger-close navbar-toggle-left hided"
                    data-toggle="menubar">
                <span class="sr-only">Toggle navigation</span>
                <span class="hamburger-bar"></span>
            </button>
            <button type="button" class="navbar-toggle collapsed" data-target="#site-navbar-collapse"
                    data-toggle="collapse">
                <i class="icon wb-more-horizontal" aria-hidden="true"></i>
            </button>


            <div class="navbar-brand navbar-brand-center " >
                <span class="navbar-brand-text hidden-xs">{{ project_name }}</span>
                <a href="{{ path('Dgcl_project_homepage') }}"><img  class="navbar-brand-logo" src="{{ asset(project_logo) }}" alt="{{ project_name }}" title="{{ project_name }}" /></a>
            </div>


            <button type="button" class="navbar-toggle collapsed"data-target="#site-navbar-search"
                    data-toggle="collapse">
                <span class="sr-only">Toggle Search</span>
                <i class="icon wb-help" aria-hidden="true"></i>
            </button>
        </div>





        <div class="navbar-container container-fluid">

            <!-- Navbar Toolbar Right -->
            <ul class="nav navbar-toolbar navbar-right navbar-toolbar-right">
                <li class="dropdown">



                    {% include "::menu.html.twig" %}



                    <a class="navbar-avatar dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false"
                       data-animation="scale-up" role="button">
                        <i class="wb-menu" aria-hidden="true"></i>
                    </a>



                    <ul class="dropdown-menu" role="menu">



                        {% if is_granted('ROLE_ADMIN') %}                
                            <li  role="presentation">
                                <a   href="{{ path('admin_users') }}" >
                                    <span class="site-menu-title">{{ 'users list' | trans}}</span>
                                    <i class=" wb-users" aria-hidden="true"></i>
                                </a>
                            </li>
                        {% endif %}

                        {% if is_granted('ROLE_COMMUNE') %}                
                            <li  role="presentation">  <a   href="{{ path('admin_indicateurs') }}" >
                                    <span class="">{{ 'dossier_indicateurs' | trans}}</span>
                                    <i class="wb-folder" aria-hidden="true"></i>
                                </a>
                            </li>
                        {% endif %}                            


                        <li role="presentation">
                            <a href="{{ path('fos_user_profile_edit') }}" role="menuitem">{{ 'Profile' | trans }}<i class="icon wb-user" aria-hidden="true"></i></a>
                        </li>
                        <li class="divider" role="presentation"></li>
                        <li role="presentation">
                            <a href="{{ path('fos_user_security_logout') }}" role="menuitem"> {{'logout' | trans }}<i class="icon wb-power" aria-hidden="true"></i></a>
                        </li>
                    </ul>
                </li>          
            </ul>
            <!-- End Navbar Toolbar Right -->
        </div>
        <!-- End Navbar Collapse -->

        <!-- Site Navbar Seach -->
        <div class="collapse navbar-search-overlap" id="site-navbar-search">
            <form role="search">
                <div class="form-group">
                    <div class="input-search">
                        <i class="input-search-icon wb-search" aria-hidden="true"></i>
                        <input type="text" class="form-control" name="site-search" placeholder="Search...">
                        <button type="button" class="input-search-close icon wb-close" data-target="#site-navbar-search"
                                data-toggle="collapse" aria-label="Close"></button>
                    </div>
                </div>
            </form>
        </div>




        <!-- End Site Navbar Seach -->
    </div>
</nav>









<div class="site-menubar">
    <div class="site-menubar-body">
        {% include "::menu.html.twig" %}
    </div>  
</div>

{% for flashMessage in app.session.flashbag.get('notice') %}
    <div class="alert alert-info">
        <a class="close">×</a>
        {{ flashMessage }}
    </div>
{% endfor %}   

{% for flashMessage in app.session.flashbag.get('error') %}
    <div class="alert alert-danger">
        <a class="close">×</a>
        {{ flashMessage }}
    </div>
{% endfor %}   

{% for flashMessage in app.session.flashbag.get('alert') %}
    <div class="alert">
        <a class="close">×</a>
        {{ flashMessage }}
    </div>
{% endfor %}   



{% block body %}
{% endblock %}

<!-- Footer -->


<footer class="site-footer">
    <span class="site-footer-legal" style="float: right;">&copy; {{ "now"|date("Y") }} - <a href="http://collectiviteslocales.gov.tn" target="_blank">{{ 'DGCL' | trans }}</a></span>
    <p class="pull-left">Powered By <a href ="http://www.progress.com.tn/"  target="_blank">Progress Engineering</a></p>
</footer>

<!-- Core  -->
<script src="{{ asset('/bundles/main/assets/vendor/bootstrap/bootstrap.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/animsition/jquery.animsition.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/asscroll/jquery-asScroll.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/mousewheel/jquery.mousewheel.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/asscrollable/jquery.asScrollable.all.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/ashoverscroll/jquery-asHoverScroll.js') }}"></script>

<!-- Plugins -->
<script src="{{ asset('/bundles/main/assets/vendor/switchery/switchery.min.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/intro-js/intro.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/screenfull/screenfull.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/slidepanel/jquery-slidePanel.js') }}"></script>

<!-- Plugins For This Page -->
<script src="{{ asset('/bundles/main/assets/vendor/datatables/jquery.dataTables.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/datatables-fixedheader/dataTables.fixedHeader.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/datatables-bootstrap/dataTables.bootstrap.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/datatables-responsive/dataTables.responsive.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/datatables-tabletools/dataTables.tableTools.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/asrange/jquery-asRange.min.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/bootbox/bootbox.js') }}"></script>


<!-- Plugins For This Page -->
<script src="{{ asset('/bundles/main/assets/vendor/webui-popover/jquery.webui-popover.min.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/vendor/toolbar/jquery.toolbar.min.js') }}"></script>


<!-- Scripts -->
<script src="{{ asset('/bundles/main/assets/js/core.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/js/site.js') }}"></script>

<script src="{{ asset('/bundles/main/assets/js/sections/menu.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/js/sections/menubar.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/js/sections/gridmenu.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/js/sections/sidebar.js') }}"></script>

<script src="{{ asset('/bundles/main/assets/js/configs/config-colors.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/js/configs/config-tour.js') }}"></script>

<script src="{{ asset('/bundles/main/assets/js/components/asscrollable.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/js/components/animsition.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/js/components/slidepanel.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/js/components/switchery.js') }}"></script>


<!-- Scripts For This Page -->
<script src="{{ asset('/bundles/main/assets/js/components/webui-popover.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/js/components/toolbar.js') }}"></script>

<script src="{{ asset('/bundles/main/assets/examples/js/uikit/tooltip-popover.js') }}"></script>

<!-- Scripts For This Page -->
<script src="{{ asset('/bundles/main/assets/js/components/datatables.js') }}"></script>

<script src="{{ asset('/bundles/main/assets/examples/js/tables/datatable.js') }}"></script>
<script src="{{ asset('/bundles/main/assets/examples/js/uikit/icon.js') }}"></script>

{% block js %}{% endblock %}

<script>

        $(document).ready(function () {


            $('.close').click(function () {
                $(this).parent().fadeOut('slow');
            });


            $('.confirmation-suppression').click(function () {
                msg = $(this).attr('confirmation-message');
                return  confirm(msg);
            });

            $('.form-group input').addClass('form-control');



            $('input, select, textarea').on("invalid", function (e) {
                e.preventDefault();
            });


            $('#submitForm').click(function () {

                errorValidation = false;
                firstError = false;

                $('.form-control').each(function (index) {

                    if ($(this).attr('required') == 'required') {
                        if ($(this).val() == '') {
                            $(this).parent().addClass('has-error');

                            if (!firstError)
                                firstError = $(this)
                            errorValidation = true;

                        } else {
                            $(this).parent().removeClass('has-error');
                        }
                    }
                });

                if (errorValidation) {
                    $('.accordion').hide();
                    $(firstError).parents('.accordion').show();

                    $(firstError).focus();

                    $('html, body').animate({
                        scrollTop: $(firstError).offset().top - 100
                    }, 1000);
                }


            });

        });
</script>	

</body>
</html>