74 lines
2.9 KiB
Twig
74 lines
2.9 KiB
Twig
{% extends "::base.html.twig" %}
|
|
|
|
{% block breadcrumb %}
|
|
<li><a href="{{ cms_path('homepage') }}">Accueil</a></li>
|
|
<li class="sep"> » </li>
|
|
<li>Recherche « <a href="{{ cms_path('search', {query: page.words}) }}">{{ page.words }}</a> »</li>
|
|
|
|
{% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %}
|
|
<li class="sep"> » </li>
|
|
<li>Page {{ page.pager.currentPage }}</li>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
|
<div id="search">
|
|
<form action="{{ path('search') }}" class="form-horizontal">
|
|
<p><input type="text" name="query" value="" class="form-control"></p>
|
|
|
|
{% if page.pager.nbResults == 0 %}
|
|
<div class="alert alert-info">Aucun article disponible.</div>
|
|
{% endif %}
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% for post in page.pager %}
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
|
<hr />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{ include('DeblanBlogBundle:Default:thePost.html.twig') }}
|
|
{% endfor %}
|
|
|
|
{% if page.pager.hasPreviousPage or page.pager.hasNextPage %}
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
|
<hr />
|
|
<ul class="pager">
|
|
{% if page.pager.hasPreviousPage %}
|
|
<li class="previous">
|
|
<a href="{{ cms_path('search', {query: page.words, page: page.pager.getPreviousPage}) }}?query={{ page.words }}">Précédent</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if page.pager.hasNextPage %}
|
|
<li class="next">
|
|
<a href="{{ cms_path('search', {query: page.words, page: page.pager.getNextPage}) }}?query={{ page.words }}">Suivant</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block main_menu_bind %}
|
|
{% if page.pager.hasPreviousPage %}
|
|
<li class="bind"><a href="{{ cms_path('search', {page: page.pager.getPreviousPage}) }}?query={{ page.words }}"><span class="glyphicon glyphicon-backward"></span></a></li>
|
|
{% endif %}
|
|
{% if page.pager.hasNextPage %}
|
|
<li class="bind"><a href="{{ cms_path('search', {page: page.pager.getNextPage}) }}?query={{ page.words }}"><span class="glyphicon glyphicon-forward"></span></a></li>
|
|
{% endif %}
|
|
{% endblock %}
|