templates/front/actualite/index.html.twig line 1
{% extends 'front_layout.html.twig' %}{% block title %}Actualités{% endblock %}{% block body %}<main class="t-page">{% set mediaPoleRecherche = null %}{% for pole in poles %}{% if 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">Découvrez toute l'actualité</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--actualite"><div class="ptForm__wrap"><h2 class="ptForm__title">Rechercher une actu ?</h2><form action="{{ path('app_actualite_list') }}"><div class="ptForm__row"><input type="text" name="pole" value="{{ app.request.get('pole') }}" hidden><select class="ptForm__select js-tomselect" id="search__pole" name="pole"><option value="">Pôle</option>{% for pole in poles %}<option value="{{ pole.name }}"{% if poleSearch == pole.name %}selected{% endif %}>{{ pole.name }}</option>{% endfor %}</select><select class="ptForm__select js-tomselect" id="search__categorie" name="categorie"><option value="">Catégorie</option>{% for categorie in categories %}<option value="{{ categorie.titre }}"{% if categorieSearch == categorie.titre %}selected{% endif %}>{{ categorie.titre }}</option>{% endfor %}</select></div><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_actualite_list') }}" class="ptForm__btnClear" id="search__clean" type="button">Effacer les filtres</a></div></form></div></section>{% if actualites is not null %}{% set nbPaginate = app.request.query.get('page') %}<section class="rechercheActu"><div class="rechercheActu__wrap"><div class="rechercheToolbar__top"><p class="rechercheToolbar__nbResult">Résultats de la recherche :{% if actualites|length <= 1 %}{{ actualites|length }} événement{% else %}{{ actualites|length }} événements{% endif %}</p></div>{% if actualites is empty %}<p>Aucune actualité pour le moment. </p>{% else %}{# Pagination haute#}<div class="pagination-ligne">{% if nbPaginate > 1 %}<a class="pagination-fleche-gauche" href="{{ path("app_actualite_list", { 'page': nbPaginate - 1 }) }}">◀</a>{% endif %}{{ ttskch_paginator_pager() }}{% set x = (app.request.query.get('page') is null) ? 2 : 1 %}{% if (nbActus/10) > nbPaginate %}<a class="pagination-fleche-droite" href="{{ path("app_actualite_list", {'page': nbPaginate + x}) }}">▶</a></div>{% endif %}<div class="rechercheActu__grid">{% for actualite in actualites %}<a class="rechercheActu__item" href="{{ path('app_actualite_detail', {'actualite': actualite.id}) }}" style="background-image: url({{ asset('/uploads/medias/' ~ actualite.banniere.filepath)|imagine_filter('c350') }});"><h3 class="rechercheActu__title">{{ actualite.titre }}</h3><div class="rechercheActu__txt">{{ actualite.description | raw }}</div></a>{% endfor %}</div>{# Pagination basse#}<div class="pagination-ligne">{% if nbPaginate > 1 %}<a class="pagination-fleche-gauche" href="{{ path("app_actualite_list", { 'page': nbPaginate - 1 }) }}">◀</a>{% endif %}{{ ttskch_paginator_pager() }}{% set x = (app.request.query.get('page') is null) ? 2 : 1 %}{% if (nbActus/10) > nbPaginate %}<a class="pagination-fleche-droite" href="{{ path("app_actualite_list", {'page': nbPaginate + x}) }}">▶</a>{% endif %}</div>{% endif %}<div class="rechercheToolbar__bottom"> {# <div class="rechercheToolbar__pagi">TODO: Pagination</div> #}</div></div></section>{% endif %}</main>{% endblock %}