<h2 class="h2-home-theme"><span>{{ rootTitle|raw }}</span></h2>
<div class="row">
    <section class="dates-retenir">
        <div id="slideDates" class="flexslider bloc-agenda-style2">
            <div class="flex-viewport">
                <ul class="slides">
                    {% for locationId,event in eventsList %}
                        <li class="fitted">
                            <a href="{{ path('ez_urlalias', {'locationId': locationId }) }}"></a>
                            {{ ez_render_field( event, "vignette", { 'template': 'AyalineEzAgendaCollectivitesBundle:fields:event_ezobjectrelation.html.twig', 'parameters': { 'alias': 'home_event_agenda_4' } } ) }}
                            <div class="caption">
                                <h3>{{ ez_render_field(event, 'thematiques') }}</h3>

                                    {% if event.fields.date_debut is defined and not ez_is_field_empty( event, "date_debut" ) and event.fields.date_fin is defined and not ez_is_field_empty( event, "date_fin" )
                                    and event.getFieldValue('date_debut').date != event.getFieldValue('date_fin').date %}
                                        <span class="date"> Du {{ ez_field_value(event, "date_debut")|localizeddate('none', 'none', app.request.locale, null, "d/MM") }} au {{ ez_field_value(event, "date_fin")|localizeddate('none', 'none', app.request.locale, null, "d/MM") }}</span>
                                    {% else %}
                                            <span class="date">{{ ez_field_value(event, "date_debut")|localizeddate('none', 'none', app.request.locale, null, "cccc dd LLLL")|capitalize }}</span>
                                    {% endif %}
                                <p>{{ ez_render_field(event, 'titre') }}</p></div>
                        </li>
                    {% endfor %}
                </ul>
            </div>
            <ul class="flex-direction-nav">
                <li><a class="flex-prev" href="#" tabindex="-1"></a></li>
                <li><a class="flex-next flex-disabled" href="#" tabindex="-1"></a></li>
            </ul>
        </div>
    </section>
</div>
<a href="{{ path('ez_urlalias', {'locationId': rootID }) }}" class="voir-plus"> Voir tous les événements</a>
