private\formations\PageLeft.twig line 1
<div class="leftsearch">{% include '/formations/search.twig' %}</div>
<div class="titre mt-2">
<h1>
<b>Découvrez notre catalogue de formations</b>
</h1>
</div>
<div class="left col col-12 col-lg-8">
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% for formation in formations %}
{% if formation.formations__url %}
<a href="/formations/{{ formation.formations__url }}">
{% else %}
<a href="/formations/detail?id={{ formation.formations__id_action_de_formation }}">
{% endif %}
<div class="icard {{ formation.formations__rubrique }} bgcover">
{% if formation.formations__rubrique is not empty %}
{% for item in formation.rubrique_formatee %}
{% for tag in tagsList %}
{% if item == tag.tags__num %}
<div class="bouton">{{ tag.tags__intitule|raw }}</div>
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
<div class="text-container">
{% if formation.formations__intitule %}
<div class="titre">{{ formation.formations__intitule|raw }}</div>
{% endif %}
{% if formation.formations__diffusion == 1 and formation.formations__date_fin|date('Y/m/d') < 'NOW'|date('Y/m/d') %}
<div class="date-subtitle">
<p>
Formation à venir
</p>
</div>
{% else %}
<div class="date-subtitle">
<p>
{{ formation.formations__date_debut|date('d/m/Y') }} - {{ formation.formations__date_fin|date('d/m/Y')}}
</p>
</div>
{% endif %}
</div>
{% if formation.formations__visuel is not empty %}
<div class="photo bgcover" style="background-image: url('{{ formation.formations__visuel }}')"></div>
{% else %}
{% set backgrounds = [
'images/crete_bleue.svg',
'images/fleur_jaune.svg',
'images/etoile_violette.svg',
'images/pois_gris.svg',
] %}
{% set index = loop.index0 % backgrounds|length %}
{% set color_classes = ['bleu', 'jaune','violet', 'gris'] %}
<div class="visuel bgcover {{ color_classes[index % color_classes|length] }}" style="background-image: url('{{ backgrounds[index % backgrounds|length] }}')"></div>
{% endif %}
</div>
</a>
{% endfor %}
</div>
</div>