<div class="my-container">
<div class="row">
<div class="col-md-12" style="margin-bottom: 7px;">
<div class="step-indicator" style="display: inline-block; width: 100%; margin: 0px; background: #f9f9f9;">
<a class="stepcard completed" href="" style="display: inline-block; width: 22%;"><div class="coustom-my-text">{{ site }}</div></a>
<a class="stepcard completed" href="" style="display: inline-block; width: 22%;"><div class="coustom-my-text">À propos</div></a>
<a class="stepcard" href="#!" style="display: inline-block; width: 22%;"><div class="coustom-my-text">Le Blog</div></a>
</div>
</div>
</div>
</div>
<div style="background: #f5f7f8; padding-top: 20px;">
<div class="my-container">
<div class="row">
<div class="col-md-4">
{{ render(controller("App\\Controller\\Produit\\Service\\ServiceController:menuarticle", {'position': position})) }}
</div>
<div class="col-md-8">
<div class="menu-ui "style="border-radius: 0px; margin-bottom: 10px;">
<div class="menu-wrapper">
<div class="menu-content">
{% for article in liste_article %}
<div class="topic">
<div class="open">
<span class="faq-t" style="top: 40px;"></span>
<h2 class="question">
<img src="{% if article.imgservice != null %}{{ asset(article.imgservice.getwebpath) }}{% else %}{{ asset('template/images/boost2.png') }}{% endif %}" alt="{{ article.keyword }}" style="width: 100px; height: 100px; float: left; margin-right: 7px; background: #ddd; margin-top: -20px;" >
<span style="font-size: 25px;">{{ article.nom }}</span>
<div style="color: #333; margin-top: 10px;">
{{ article.breve }} <span class="badge" style="float: right; color: #222">{{ article.evenements|length + 1 }}</span>
</div>
</h2>
</div>
<div class="answer">
{{ article.description|rewriteLink|raw }}</br>
<div class="row">
{% for partie in article.evenements %}
<div class="col s12" style="margin-top: 20px; padding: 5px 20px; border-top: 1px solid #ddd; display: block!important;">
<h2 style="font-size: 25px; margin: 0px;">{{ partie.nom }}</h2>
{% if partie.imgevenement != null %}
<div>
<img src="{{ asset(partie.imgevenement.getWebPath) }}" alt="{{ article.keyword }}" style="width: 100%; margin: 7px 0px;">
</div>
{% endif %}
{{ partie.description|rewriteLink|raw }}
</div>
{% endfor %}
<div class="clearfix"></div>
</div>
</div>
</div>
{% endfor %}
<span class="clearfix"></span>
{% if nombrepage > 0 %}
{% if page > 1 and page <= nombrepage %}
{% set pagepre = page - 1 %}
{% else %}
{% set pagepre = nombrepage %}
{% endif %}
{% if page < nombrepage %}
{% set pagesuiv = page + 1 %}
{% else %}
{% set pagesuiv = 1 %}
{% endif %}
{% if nombrepage < 5 %}
{% set debut = 1 %}
{% set fin = nombrepage %}
{% else %}
{% if page > 2 and page < (nombrepage - 2) %}
{% set debut = page - 2 %}
{% if page + 2 >= nombrepage %}
{% set fin = nombrepage %}
{% else %}
{% set fin = page + 2 %}
{% endif %}
{% else %}
{% if page <= 2 %}
{% if page == 1 %}
{% set debut = 1 %}
{% set fin = page + 3 %}
{% else %}
{% set debut = 1 %}
{% set fin = page + 2 %}
{% endif %}
{% else %}
{% set debut = page - 2 %}
{% if page + 2 >= nombrepage %}
{% set fin = nombrepage %}
{% else %}
{% set fin = page + 2 %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
<div>
<ul class="pagination" style="margin-top: 20px; display: block;">
<li><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': 1 }) }}" title="Première page" style=" width: 34px; height: 34px; border-radius: 17px; padding-top: 5px; margin: 2px; text-align: center; line-height: 8px;"><span class="fa fa-fast-backward" style="font-size: 13px;"></span></a></li>
<li><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': pagepre }) }}" title="Page précedente" style=" width: 34px; height: 34px; border-radius: 17px; padding-top: 5px; margin: 2px; text-align: center;"><span class="fa fa-step-backward" style="font-size: 13px;"></span></a></li>
{% for p in debut..fin %}
<li value="{{ p }}"><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': p }) }}" class="{% if p == page %}activepage{% endif %}" style="margin: 4px 0px;">{{ p }}</a></li>
{% endfor %}
<li><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': pagesuiv }) }}" title="Page suivante" style=" width: 34px; height: 34px; border-radius: 17px; padding-top: 5px; margin: 2px; text-align: center;"><span class="fa fa-step-forward" style="font-size: 13px;"></span></a></li>
<li><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': nombrepage }) }}" title="Dernière page" style=" width: 34px; height: 34px; border-radius: 17px; padding-top: 5px; margin: 2px; text-align: center; line-height: 8px;"><span class="fa fa-fast-forward" style="font-size: 13px;"></span></a></li>
</ul>
<div class="clearfix"></div>
</div>
{% else %}
<div>
<ul class="pagination" style="margin-top: 20px; display: block;">
<li><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': page }) }}" title="Première page" style=" width: 34px; height: 34px; border-radius: 17px; padding-top: 5px; margin: 2px; text-align: center; line-height: 8px;"><span class="fa fa-fast-backward" style="font-size: 13px;"></span></a></li>
<li><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': page }) }}" title="Page précedente" style="width: 34px; height: 34px; border-radius: 17px; padding-top: 5px; margin: 2px; text-align: center;"><span class="fa fa-step-backward" style="font-size: 13px;"></span></a></li>
<li><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': page }) }}" class="activepage" style="margin: 4px 0px;">0</a></li>
<li><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': page }) }}" title="Page suivante" style="width: 34px; height: 34px; border-radius: 17px; padding-top: 5px; margin: 2px; text-align: center;"><span class="fa fa-step-forward" style="font-size: 13px;"></span></a></li>
<li><a href="{{ path('produit_service_afh_sps', {'position': position, 'page': page }) }}" title="Dernière page" style=" width: 34px; height: 34px; border-radius: 17px; padding-top: 5px; margin: 2px; text-align: center; line-height: 8px;"><span class="fa fa-fast-forward" style="font-size: 13px;"></span></a></li>
</ul>
<div class="clearfix"></div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>