templates/blocks/previews/preview-offres-logic.html.twig line 1

Open in your IDE?
  1. {% if articleContentLinkedWith is defined and articleContentLinkedWith is not empty %}
  2.     {% set articleContent = articleContentLinkedWith %}
  3. {% else %}
  4.     {% if article.content.content is defined and article.content.content is not empty %}
  5.         {% set articleContent = article.content.content %}
  6.     {% endif %}
  7. {% endif %}
  8. {% if article.excerpt.categories is defined and article.excerpt.categories is not empty %}
  9. {% set categories = article.excerpt.categories %}
  10. {% endif %}
  11. {% if articleContent.enterprise is defined and articleContent.enterprise is not empty %}
  12. {% set enterprise = articleContent.enterprise %}
  13. {% endif %}
  14. {% if articleContent.city is defined and articleContent.city is not empty %}
  15. {% set city = articleContent.city %}
  16. {% endif %}
  17. {% if articleContent.cp is defined and articleContent.cp is not empty %}
  18. {% set cp = articleContent.cp %}
  19. {% endif %}
  20. {% if articleContent.offer_type is defined and articleContent.offer_type is not empty %}
  21. {% set offer_type = articleContent.offer_type %}
  22. {% endif %}
  23. {% if articleContent.limit_date is defined and articleContent.limit_date is not empty %}
  24. {% set limit_date = articleContent.limit_date %}
  25. {% endif %}
  26. {% if block.slider_mode is defined and block.slider_mode is not empty %}
  27.     <li class="splide__slide">
  28.         <div class="preview-container offres br8 dflex fdc">
  29.         {% else %}
  30.             <div class="preview-container offres br8 dflex fdc{% if i > 2 %} not-visible-mobile-article{% endif %}{% if i > 3 %} not-visible-tablette-article{% endif %}">
  31.             {% endif %}
  32.             <div class="preview-content">
  33.                 <a href="{{ sulu_content_path(article.routePath) }}" class="cblue nodeco">
  34.                     <div class="fw500 fs20 preview-h3 lh28">{{ article.title }}</div>
  35.                 </a>
  36.                 {% if offer_type is defined and offer_type is not empty %}
  37.                     <div class="fw600 fs18 lh28">{{ offer_type }}</div>
  38.                 {% endif %}
  39.                 {% include "blocks/previews-from-controller/blocks/categories.html.twig" %}
  40.                 <div>
  41.                     {% if enterprise is defined and enterprise is not empty %}
  42.                         <div class="enterprise diblock mr-24px"><img src="/resources/img/aapami/briefcase-icon.svg" alt="Entreprise" width="16" height="16">{{ enterprise }}</div>
  43.                     {% endif %}
  44.                     {% if city is defined and city is not empty and cp is defined and cp is not empty %}
  45.                         <div class="city-cp diblock">
  46.                             <img src="/resources/img/offres/pin-icon.svg" alt="Ville" width="14" height="17">
  47.                             <span>{{ city ~ " " ~ cp }}</span>
  48.                         </div>
  49.                     {% endif %}
  50.                 </div>
  51.                 {% if limit_date is defined and limit_date is not empty %}
  52.                     <div class="limit"><img src="/resources/img/aapami/calendar-icon.svg" alt="Date" width="21" height="20">Date limite :
  53.                         {{ limit_date|format_datetime('short', 'none', locale='fr') }}</div>
  54.                 {% endif %}
  55.             </div>
  56.             <div class="mta taright">
  57.             {% if article.authored is defined and article.authored is not empty %}
  58.                 <span class="cgrey fs14 lh20">PubliĆ© le
  59.                     {{ article.authored|format_datetime('short', 'none', locale='fr') }}
  60.                 </span>
  61.             {% endif %}
  62.             </div>
  63.             {% if block.slider_mode is defined and block.slider_mode is not empty %}
  64.             </div>
  65.         </li>
  66. {% else %}
  67.     </div>
  68. {% endif %}