templates/front/Promos/liste.html.twig line 1

Open in your IDE?
  1.     {% trans_default_domain 'app' %}
  2.     {% if promos is empty %}
  3.     <div class="text-center margin-bottom-20">
  4.         {{ ('promos.error.empty')|trans | raw }}
  5.     </div>
  6.     {% else %}
  7.         {% set count = 0 %}
  8.         {% for promo in promos %}
  9.             {% if promo is not null %}
  10.                 {%  set interval = promo.dateDebut|date_interval(promo.dateFin, app.request.locale)  %} 
  11.                 
  12.                 {% if count % 3 == 0 %}
  13.                 <div class="clear">
  14.                 {% endif %}
  15.                     {% set slug = promo.nom|replace({"*": " "})|slugify %}
  16.                     <div class="col-md-4 col-sm-6 col-xs-12 promo ">
  17.                         <a href="{{ path('ac_platform_produit', {'slug': slug, 'id': promo.idLieuHebergement, 'datearrivee': promo.dateDebut|date('Y-m-d'), 'duree': promo.duree}) }}">
  18.                             <div class="productItem col-md-12 col-sm-12 col-xs-12 block-list-blanc padding-off">
  19.                                 <div class="col-md-12 padding-top-10 header-liste-resultat">
  20.                                     <span class="h3">
  21.                                         {{ promo.ville}} | {{ promo.region }} ({{ promo.departement }})
  22.                                     </span>
  23.                                     <div class="ville-plus-type">
  24.                                         <span class="ville">{{ promo.nom | replace({"*": " <i class='glyphicon glyphicon-star star'></i>"})|raw }} </span>
  25.                                         
  26.                                             <span class="dot">.</span>
  27.                                             {#<span class="typo"> {{ promo.ListFiches.zero.famille |raw }}</span>#}
  28.                                     </div>
  29.                                 </div>
  30.                                 <div class="col-md-12 padding-off">
  31.                                     {% if photoProfil[promo.id] is defined  %}
  32.                                         <img src="{{  photoProfil[promo.id] }}" alt="{{ promo.nom }}" />
  33.                                     {% endif %}
  34.                                 </div>
  35.                                 {% if page_code is defined and page_code == "home" %}
  36.                                 <div class="clear">
  37.                                     <div class="col-lg-1 col-sm-12"></div>
  38.                                     <div class="col-lg-10 col-sm-12 padding-5 category text-center">
  39.                                         {% if promo.category is not null %}
  40.                                             <strong>{{ ('promos.category.' ~ promo.category )|trans | raw }}</strong>
  41.                                         {% else %}
  42.                                             <strong>{{ ('promos.category.' ~ category)|trans | raw }}</strong>
  43.                                         {% endif %}
  44.                                     </div>
  45.                                     <div class="col-lg-1 col-sm-12"></div>
  46.                                 </div>
  47.                                 {% endif %}
  48.                                 <div class="clear">
  49.                                     <div class="col-lg-1 col-sm-12"></div>
  50.                                     <div class="col-lg-10 col-sm-12 padding-5 text-center"></div>
  51.                                     <div class="col-lg-1 col-sm-12"></div>
  52.                                 </div>
  53.                                 <div class="clear">
  54.                                     <div class="col-lg-3 col-sm-12"></div>
  55.                                     <div class="col-lg-6 col-sm-12 text-center">
  56.                                         <div class="pourcentage-reduc bleu txt-blanc">{{ 'promotion' |trans({}, 'global') |capitalize }}
  57.                                             <b>-{{ promo.montantTauxPromo|round }}% </b>
  58.                                         </div>
  59.                                     </div>
  60.                                     <div class="col-lg-3 col-sm-12"></div>
  61.                                 </div>
  62.                                 <div class="clear">
  63.                                     <div class="col-lg-1 col-sm-12 "></div>
  64.                                     <div class="col-lg-10 col-sm-12 padding-5 text-center">
  65.                                             {{ 'pour-un-sejour'|trans({'duree': promo.duree }, 'global') }}
  66.                                             {% if page_code is defined and page_code == 'home' %}<br /> {{ interval }}{% endif %}
  67.                                     </div>
  68.                                     <div class="col-lg-1 col-sm-12"></div>
  69.                                 </div>
  70.                                 <!-- Séparateur -->
  71.                                 <div>
  72.                                     <div class="col-md-12 col-sm-12 col-xs-12 fiche-filet2"></div>
  73.                                 </div>
  74.                                 <!-- -->
  75.                                 <div class="footer-liste-resultat">
  76.                                     <div class="col-md-7 col-sm-7 col-xs-12 block-prix block-prix-liste">
  77.                                         
  78.                                         <div class="prix-mention">{{ 'a_partir_de' |trans({}, 'global') |capitalize }}</div>
  79.                                         <span class="prix-barre">{{ promo.prixBrut |round }}€</span>&nbsp;
  80.                                         <span class="prix">
  81.                                             <span class="link tooltip-link prix">{{ promo.prixTotal |round }}€</span>
  82.                                         </span>
  83.                                         <div class="prix-mention">{{ 'lesejour' |trans({}, 'global') }}</div>
  84.                                     </div>
  85.                                     <div class="col-md-5 col-sm-5 col-xs-12 pull-right text-right">
  86.                                         <span class="btn-ateya width-100">{{ 'ancre.reserver' |trans({},'app') |raw }}</span>
  87.                                     </div>
  88.                                 </div>
  89.                             </div>
  90.                         </a>
  91.                     </div>
  92.                 {% if count % 3 == 2 %}
  93.                 </div>
  94.                 {% endif %}
  95.                 {% set count = count + 1 %}
  96.             {% endif %}
  97.         {% endfor %}
  98.     {% endif %}
  99.     <div class="clear"></div>