<!DOCTYPE html>
<html lang="fr">
<head>
    {% include 'AyalineEzMiniSitesCollectivitesBundle::page_head.html.twig' %}

    {% block stylesheets %}
        {# applel des css en fonction des mini-sites  #}
        {% include 'AyalineEzMiniSitesCollectivitesBundle:head_style:page_head_style_'~ezpublish.siteaccess.name~'.html.twig' %}
    {% endblock %}

    {% block javascripts %}
        {% include 'AyalineEzMiniSitesCollectivitesBundle::page_script_header.html.twig' %}
    {% endblock %}
</head>

<body>
{% set configurationGenerale = get_configuration_generale(ezpublish.rootLocation.contentInfo.mainLocationId, 'configuration_generale_minisite') %}
{% if location is defined and location is not null and location.id == ezpublish.rootLocation.contentInfo.mainLocationId %}
    {% set isHome = true %}
{% else %}
    {% set isHome = false %}
{% endif %}
{% block cookies %}
    {{ render( controller( "AyalinePrivacyBundle:Privacy:banner" ) ) }}
{% endblock %}
<div class="{% if isHome %}home{% else %}page-interne{% endif %}">
    <header>
        {% include 'AyalineEzMiniSitesCollectivitesBundle::page_header.html.twig' %}
    </header>

    {% block diaporama %}
        {{ render( controller( "AyalineEzDiaporamaCollectivitesBundle:SlideShow:slideShow", { 'rootLocationId': app.request.attributes.get( 'locationId', -1) } )) }}
    {% endblock %}
    {% if isHome and configurationGenerale.fields.afficher_agenda is defined and not ez_is_field_empty( configurationGenerale, 'afficher_agenda' ) %}
        {% block agenda_home %}
            <div id="bloc-agenda-2" class="bloc-agenda-2">
                {{ render (controller("AyalineEzAgendaCollectivitesBundle:Agenda:embedHome", {'locationId': location.id, 'template': 'AyalineEzMiniSitesCollectivitesBundle::home/agenda_mini_site.html.twig', 'remonteTimeLine': true})) }}
            </div>
        {% endblock %}
    {% endif %}
    <div class="content-wrapper" id="content">
        {% block file_ariane %}
            <div class="breadcrumbs-bloc">
                <div class="container">
                    {% block breadcrumb %}
                        {{ render ( controller( "AyalineCollectiviteBundle:PageLayout:breadcrumb", { "currentLocationId": location.id|default( ezpublish.rootLocation.id  ) } ) ) }}
                    {% endblock %}

                    {% block toolBar %}
                        <div class="tools">
                            {% include 'AyalineCollectiviteBundle:parts:toolbar.html.twig' %}
                        </div>
                    {% endblock %}
                </div>
            </div>
        {% endblock %}
        {% block content %}
            {% block presentation %}{% endblock %}
            {% block actualites_home %}{% endblock %}
            {% block grille %}{% endblock %}
            {% block reseaux_sociaux %}{% endblock %}
            {% block contact %}{% endblock %}
            {% block right_column %}
            {% endblock %}
        {% endblock content %}
    </div>
</div>

{% include 'AyalineEzMiniSitesCollectivitesBundle:parts:footer.html.twig' %}

{% block javascripts_footer %}
    {% include 'AyalineEzMiniSitesCollectivitesBundle::page_script.html.twig' %}
{% endblock %}
</body>
</html>