{% set count = 0 %}
{#
Itération sur tous les hébergements remontés
#}
{% for reponse in reponses %}
{% set affproduit = 1 %}
{% set duree = reponse.Duree|default(3) %}
{% set tomorrow = date().modify('+1 day') %}
{% set datearrivee = reponse.DateDebut|default(tomorrow|date('d/m/Y')) %}
{% set nbadultes = nbadultes|default(1) %}
{% set nbenfants = nbenfants|default(0) %}
{% set numHebergement = loop.index0 %}
{% if affproduit == 1 %}
{% if count % 3 == 0 %}
<div class="clear">
{% endif %}
{% set slug = reponse.nom |replace({"*": " "})|slugify %}
<div class=" col-md-4 col-sm-6 col-xs-12 promo lienHebergement{{ reponse.IdLieuHebergement }}">
{% if page_code is defined and page_code == "theme" %}
<a href="{{ path('ac_platform_produit', {'slug': slug, 'id': reponse.IdLieuHebergement, 'datearrivee': reponse.DateDebut, 'duree': reponse.Duree }) }}" >
{% else %}
<a href="{{ path('ac_platform_produit', {'slug': slug, 'id': reponse.IdLieuHebergement, 'datearrivee': datearrivee, 'duree': duree, 'nbadultes': nbadultes, 'nbenfants': nbenfants }) }}" >
{% endif %}
<div class="productItem col-md-12 col-sm-12 col-xs-12 block-list-blanc padding-off">
<div class="col-md-12 padding-top-10 header-liste-resultat">
<span class="h3">
{{ reponse.res_lieu |raw }}
</span>
<div class="ville-plus-type">
<span class="ville">{{ reponse.nom |replace({"*": " <i class='glyphicon glyphicon-star star'></i>"}) |raw }}</span>
{#<span class="dot">.</span>#}
{#{% if mod is defined and mod == "destination" %}#}
{% if mod is defined and mod == "destination" %}
{% set travellers = app.session.get('travellers') %}
{% if travellers is not null %}
{% set affdatedebut = travellers['actdatearrivee'] %}
{% set affdatefin = travellers['actdatedepart'] %}
{% if datearrivee |date("d/m/Y") != affdatedebut %}
{% set affdatedebut = datearrivee |date("d/m/Y") %}
{% set affdatefin = datearrivee |date_modify("+" ~ duree ~ " day") |date("d/m/Y") %}
{% endif %}
{#<span class="domaine">{{ hebergement.ListFiches.zero.nom |replace({"*": ""}) |raw }}</span>#}
{% if aff_date %}
<span class="date">{{ 'du' |trans({}, 'global') |capitalize }} {{ affdatedebut }} {{ 'au' |trans({}, 'global') }} {{ affdatefin }}</span>
{% endif %}
{% endif %}
{% else %}
<span class="dot">.</span>
<span class="typo"> {{ reponse.famille |raw }}</span>
{% if mod is defined and mod == "promo" and deboffre is defined %}
{% if aff_date %}
<span class="date">{{ 'du' |trans({}, 'global') |capitalize }} {{ deboffre }} {{ 'au' |trans({}, 'global') }} {{ finoffre }}</span>
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
<div class="col-md-12 padding-off">
{% if photoProfil[count] is defined %}
<img src="{{ photoProfil[count] }}" alt="{{ reponse.nom }}" />
{% endif %}
</div>
{% if reponse.res_shortdesc is not empty %}
<div class="col-md-12">
<div class="short-desc" style="float:left">
<span>{{ reponse.res_shortdesc|striptags |truncate(230)|default("") |raw }}</span>
</div>
</div>
{% endif %}
<div class="col-md-12 col-sm-12 col-xs-12 picto-presta-height">
{% if reponse.presta_inc | length > 0 %}
{% set filteredPresta = reponse.presta_inc|filter(tpresta => tpresta == 1) %}
{% for key, tpresta in filteredPresta %}
{% if loop.index < 11 %}
{% set pr = key|replace({'presta_inc_': ''}) %}
<abbr title="{{ pr|trans({}, 'presta')|raw }}" rel="tooltip">
<div class="{{ pr }}-b"></div>
</abbr>
{% endif %}
{% endfor %}
{% endif %}
</div>
<!-- Séparateur -->
<div class="col-md-12 col-sm-12 col-xs-12 liste-resultat">
<div class="col-md-12 col-sm-12 col-xs-12 fiche-filet2"></div>
</div>
<!-- -->
<div class="footer-liste-resultat">
<div class="col-md-7 col-sm-7 col-xs-12 block-prix block-prix-liste">
{% if mod is not defined or mod != 'promo' %}
{#{% set nb = 0 %}#}
{% set tprixtotal = null %}
{% set tprixtotal = reponse.PrixTotal %}
{% set ispromo = false %}
{% set var_test = 'TEST' %}
{% if reponse.MontantTauxPromo > 0 %}
{% set ispromo = true %}
{% endif %}
{% set cssprix = "prix" %}
{% include "/front/Produit/tarif.html.twig" with {'reponse': reponse, 'ispromo': ispromo, 'duree': duree } %}
{% endif %}
</div>
<div class="col-md-5 col-sm-5 col-xs-12 pull-right text-right">
{% if page_code is defined and page_code == "theme" %}
<span class="btn-ateya width-100 page_code_theme">
{% else %}
<span class="btn-ateya width-100 page_code_destination">
{% endif %}
{% if btname is defined %}
{{ ('ancre.' ~ btname) |trans({},'app') |raw }}
{% else %}
{{ 'ancre.reserver' |trans({},'app') |raw }}
{% endif %}
</span>
</div>
</div>
</div></a>
{% if count % 3 == 2 %}
</div>
{% endif %}
{% set count = count + 1 %}
</div>
{% endif %}
{% endfor %}