templates/home/recherches.html.twig line 1
{% extends 'base.html.twig' %}
{% block title %}Recherche{% endblock %}
{% block body %}
<div class="breadcrumb"><div class="container">
<a href="{{ path('home_page') }}">Accueil</a></div>
</div>
<h1>Votre recherche « {{ texte }} »</h1>
<div class="container-main resultats">
{% if categories|length > 0 %}
<h2>Catégories</h2>
<ul>
{% for child in categories %}
{% set typecategorie = 1 %}
{% if child.url|slice(0,9) == "materiels"%} {% set typecategorie = 2 %} {% endif %}
<li><a href="{{ path('categoriefiltre_page', {'type': typecategorie, 'code': child.id}) }}"><b>{{ child.titre|replace({(texte): "<mark>"~texte~"</mark>"}) |raw }}</b></a>
<br/> {{ child.resume|replace({(texte): "<mark>"~texte~"</mark>"}) |raw }}</li>
{% endfor %}
</ul>
{% endif %}
{% if materiels1|length > 0 %}
<h2 class="color-materiel">Matériels</h2>
<ul>
{% for child in materiels1 %}
<li><a href="{{ path('materiel_page', {'id': child.id}) }}"><b>{{ child.nom|replace({(texte): "<mark>"~texte~"</mark>"}) |raw}}</b></a>
<br/> {{ child.presentation | striptags | slice(0, 130) }} ... </li>
{% endfor %}
</ul>
{% endif %}
{% if protocoles1|length > 0 %}
<h2 class="color-protocole">Protocoles</h2>
<ul>
{% for child in protocoles1 %}
<li><a href="{{ path('protocole_page', {'id': child.id, 'nom': child.titre}) }}"><b>{{ child.titre|replace({(texte): "<mark>"~texte~"</mark>"}) |raw }}</b></a>
<br/> {{ child.resume|replace({(texte): "<mark>"~texte~"</mark>"}) |raw }}</li>
{% endfor %}
</ul>
{% endif %}
{% if protocoles2|length > 0 %}
<h2 class="color-protocole">Autres protocoles</h2>
<ul>
{% for child in protocoles2 %}
<li><a href="{{ path('protocole_page', {'id': child.id, 'nom': child.titre}) }}"><b>{{ child }}</b></a>
<br/> {{ child.resume|replace({(texte): "<mark>"~texte~"</mark>"}) |raw }}</li>
{% endfor %}
</ul>
{% endif %}
{% if materiels2|length > 0 %}
<h2 class="color-materiel">Autres matériels</h2>
<ul>
{% for child in materiels2 %}
<li><a href="{{ path('materiel_page', {'id': child.id}) }}"><b>{{ child.nom }}</b></a>
{# <br/> {{ child.presentation | striptags | slice(0, 130) }} ... </li> #}
<br/> {{ child.presentation|replace({(texte): "<mark>"~texte~"</mark>"}) |raw }}</li>
{% endfor %}
</ul>
{% endif %}
{% if articles|length > 0 %}
<h2>Articles</h2>
<ul>
{% for child in articles %}
<li><a href="{{ path('article_page', { 'url' : child.url }) }}"><b>{{ child.titre|replace({(texte): "<mark>"~texte~"</mark>"}) |raw }}</b></a>
<br/> {{ child.description|replace({(texte): "<mark>"~texte~"</mark>"}) |raw }} </li>
{% endfor %}
</ul>
{% endif %}
<br/><br/>
</div>
{% endblock %}