templates/front/formation/index.html.twig line 1
{% extends 'front_layout.html.twig' %}{% block title %}Formations{% endblock %}{% block body %}<main class="t-page">{% set mediaPoleRecherche = null %}{% for pole in poles %}{% if (selectedPole is defined and selectedPole == pole.name)or (selectedPole is not defined and pole.name == poleSearch) %}{% set mediaPoleRecherche = pole.urlPole.banniere.filepath %}{% endif %}{% endfor %}<header class="t-page__header"{% if mediaPoleRecherche is not null %}style="background-image: url('{{ asset('/uploads/medias/' ~ mediaPoleRecherche)|imagine_filter('banner') }}');"{% else %}style="background-image: url('/build/images/grey.jpg');"{% endif %}><h1 class="t-page__mainTitle">Formations</h1></header><div class="t-page__wrap">{{ render(controller('App\\Controller\\WidgetController::breadcrumb', {'request': app.request})) }}<div class="t-page__intro">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been theindustry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type andscrambled it to make a type specimen book. It has survived not only five centuries, but also the leap intoelectronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release ofLetraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software likeAldus PageMaker including versions of Lorem Ipsum.</div></div><section class="ptForm ptForm--formations"><div class="ptForm__wrap"><h2 class="ptForm__title">Je recherche ma formation</h2><form action="{{ path('app_formation_list') }}" data-controller="formation" data-formation-url-value="{{ path('change-select-ajax') }}" >{% include "front/formation/include/_recherche.html.twig" %}<div class="ptForm__row"><button class="ptForm__btn" type="submit">Rechercher<svg><use xlink:href="#caret-right"></use></svg></button></div><div class="ptForm__row"><a href="{{ path('app_formation_list') }}" class="ptForm__btnClear" id="search__clean" type="button">Effacer les filtres</a></div></form></div></section>{% if formations is not null %}{% set poleUrl = app.request.query.get('pole') %}{% set diplomeUrl = app.request.query.get('diplome') %}{% set contratUrl = app.request.query.get('contrat') %}<section class="rechercheFormations"><div class="rechercheFormations__wrap" id="resultats-recherche-formation"><div class="rechercheToolbar__top"><p class="rechercheToolbar__nbResult">Résultats de la recherche :{% if formations|length <= 1 %}{{ nbFormation }} formation{% else %}{{ nbFormation }} formations{% endif %}</p>{# Pagination #}{% set nbPaginate = app.request.query.get('page') %}{% set domaine = app.request.query.get('domaine') %}{% if nbFormation > 10 %}<div class="pagination-ligne">{# {% if nbPaginate > 1 %}<a class="pagination-fleche-gauche" href="{{ path("app_formation_list", { 'page': nbPaginate - 1 }) }}">◀</a>{% endif %} #}{% if app.request.query.get('domaine') %}{% if nbPaginate > 1 %}<a class="pagination-fleche-gauche" href="{{ path("app_formation_list", {'pole': poleUrl, 'domaine': domaine, 'page': nbPaginate - 1 }) }}">◀</a>{% endif %}{% else %}{% if nbPaginate > 1 %}<a class="pagination-fleche-gauche" href="{{ path("app_formation_list", { 'pole': poleUrl, 'domaine': domaine,'page': nbPaginate - 1 }) }}">◀</a>{% endif %}{% endif %}{{ ttskch_paginator_pager() }}{# {{ dump(app.request.query.get('page')) }} #}{% set x = (app.request.query.get('page') is null) ? 2 : 1 %}{% if app.request.query.get('domaine') %}{% if (nbFormation / 10) > nbPaginate %}<a class="pagination-fleche-droite" href="{{ path("app_formation_list", {'pole': poleUrl,'domaine': domaine,'page': nbPaginate + x}) }}">▶</a>{% endif %}{% else %}{% if (nbFormation / 10) > nbPaginate %}<a class="pagination-fleche-droite" href="{{ path("app_formation_list", {'pole': poleUrl,'domaine': domaine,'page': nbPaginate + x}) }}">▶</a>{% endif %}{% endif %}</div>{% endif %}</div><div class="rechercheFormations__grid">{# <div class="rechercheFormations__domaines"><p class="rechercheFormations__filterTitle">Métiers</p>{% for domaine in domaines %}<ahref="{{ path('app_formation_list', {'pole': poleUrl ? poleUrl : null,'domaine': domaine.titreDomaine,'diplome': diplomeUrl ? diplomeUrl : null,'contrat': contratUrl ? contratUrl : null}) }}"class="rechercheFormations__filterBtn">{{ domaine.titreDomaine }}</a>{% endfor %}</div> #}<div class="rechercheFormations__list">{% for formation in formations %}<a class="rechercheFormations__item" href="{{ path('app_formation_detail', {'formation': formation.id}) }}">{% if formation.banniere is not null %}<img class="rechercheFormations__img" src="{{ asset('/uploads/medias/' ~ formation.banniere.filepath)|imagine_filter('c250') }}" alt="{{ formation.banniere.alt }}">{% else %}<img class="rechercheFormations__img" src="https://placehold.co/250?text=*" alt="">{% endif %}<div class="rechercheFormations__content"><h3 class="rechercheFormations__title">{{ formation.titreFormation | slice(0,86) }}</h3>{% if formation.contenu is defined %}<div class="rechercheFormations__txt">{{ formation.contenu | striptags | slice(0,220) | raw }}…</div>{% endif %}{% if formation.domaineId.titreDomaine is defined %}<p class="rechercheFormations__domaine">{% if formation.domaineId is not null %}{{ formation.domaineId.titreDomaine }}{% else %}<p>Non renseigné</p>{% endif %}</p>{% endif %}</div></a>{% endfor %}{# Pagination #}{% set nbPaginate = app.request.query.get('page') %}{% set domaine = app.request.query.get('domaine') %}{% if nbFormation > 10 %}<div class="pagination-ligne">{# {% if nbPaginate > 1 %}<a class="pagination-fleche-gauche" href="{{ path("app_formation_list", { 'page': nbPaginate - 1 }) }}">◀</a>{% endif %} #}{% if app.request.query.get('domaine') %}{% if nbPaginate > 1 %}<a class="pagination-fleche-gauche" href="{{ path("app_formation_list", {'pole': poleUrl,'domaine': domaine,'page': nbPaginate - 1}) }}">◀</a>{% endif %}{% else %}{% if nbPaginate > 1 %}<a class="pagination-fleche-gauche" href="{{ path("app_formation_list", {'pole': poleUrl,'domaine': domaine,'page': nbPaginate - 1}) }}">◀</a>{% endif %}{% endif %}{{ ttskch_paginator_pager() }}{# {{ dump(app.request.query.get('page')) }} #}{% set x = (app.request.query.get('page') is null) ? 2 : 1 %}{% if app.request.query.get('domaine') %}{% if (nbFormation / 10) > nbPaginate %}<a class="pagination-fleche-droite" href="{{ path("app_formation_list", {'pole': poleUrl,'domaine': domaine,'page': nbPaginate + x}) }}">▶</a>{% endif %}{% else %}{% if (nbFormation / 10) > nbPaginate %}<a class="pagination-fleche-droite" href="{{ path("app_formation_list", {'pole': poleUrl,'domaine': domaine,'page': nbPaginate + x}) }}">▶</a>{% endif %}{% endif %}</div>{% endif %}</div></div><div class="rechercheToolbar__bottom"> {# <div class="rechercheToolbar__pagi">TODO: Pagination</div> #}</div></section>{% endif %}{% include 'front/includes/_homeActus.html.twig' %}{% include 'front/includes/_homeAnnonces.html.twig' %}</main>{% endblock %}