<div class="header-top">

    <div class="container">

        <div class="header-top-in">

            <div class="bloc-left">
                {% if configurationGenerale is defined and configurationGenerale.fields.logo_principal is defined and not ez_is_field_empty(configurationGenerale, "logo_principal") %}
                    <div class="main-logo">
                        <a class="logo" href="/">
                            <img src="{{ configurationGenerale.getFieldValue('logo_principal').uri }}" alt="logo-e-interco">
                        </a>
                    </div>
                {% endif %}
                {% if configurationGenerale.fields.titre_site_haut_page is defined and not ez_is_field_empty(configurationGenerale, "titre_site_haut_page") %}
                    <div class="subtitle-header">
                        <p>{{ configurationGenerale.getFieldValue("titre_site_haut_page")|raw }}</p>
                    </div>
                {% endif %}
            </div>

            <div class="bloc-right">
                {% if configurationGenerale.fields.activer_recherche is defined and not ez_is_field_empty(configurationGenerale, "activer_recherche") %}
                    <ul class="bloc-right-top">

                        {% if configurationGenerale.fields.menu_haut_liens is defined and not ez_is_field_empty(configurationGenerale, "menu_haut_liens") %}
                            {{ render (controller("AyalineCollectiviteBundle:Home:getBlocHome",{'type': 'menu_haut_liens', 'template': 'AyalineCollectiviteBundle:embed:link_menu.html.twig'})) }}
                        {% endif %}

                        <li class="recherche">
                            <form class="form-search yui3-skin-sam ez-autocomplete" action="/content/search">
                                <input  type="text" placeholder="Rechercher" name="SearchText">
                                <input class="loupe" type="submit" value="rechercher" name="SearchButton">
                            </form>
                        </li>
                    </ul>
                {% endif %}
                <ul class="bloc-right-bottom">

                    {% if configurationGenerale.fields.afficher_reseaux_header is defined and not ez_is_field_empty(configurationGenerale, "afficher_reseaux_header") %}
                        <li class="social-media visible-lg visible-md">
                            {{ render (controller("AyalineCollectiviteBundle:PageLayout:getSocialNetworks")) }}
                        </li>
                    {% endif %}
                    {% if configurationGenerale.fields.activer_barre_langue is defined and not ez_is_field_empty(configurationGenerale, "activer_barre_langue") %}
                        <div id="google_translate_element"></div>

                        {% if configurationGenerale is defined and configurationGenerale.fields.barre_langues is defined and not ez_is_field_empty(configurationGenerale, "barre_langues") %}
                            <li class="langue" id="google_translate">
                                <a href="#" title="langues" class="selected-lang notranslate"><span class="title-nav">FR</span><span class="arrow"></span></a>
                                <ul class="translation-links notranslate">
                                    {% set langues = ez_field_value(configurationGenerale, "barre_langues")|split(',') %}
                                    {% for langue in langues %}
                                        {% set langue = langue|split(':') %}
                                        <li><a href="" class="{{ langue.0 }} selected" data-lang="{{ langue.1 }}" onclick="loadGoogleTranslate('{{ langue.0 }}', '{{ langue.1 }}'); return false;">{{ langue.0|upper }}</a></li>
                                    {% endfor %}
                                </ul>
                            </li>
                        {% endif %}

                    {% endif %}
                </ul>
            </div>
        </div>
    </div>
</div>

{% block header_bottom %}
    {{ render (controller("AyalineCollectiviteBundle:Home:getBlocHome", {'type': 'focus_racine', 'template': 'AyalineEzMiniSitesCollectivitesBundle:home:header_bottom.html.twig'})) }}
{% endblock %}