{% extends 'base.html.twig' %}
{% block title %}Hebergements{% endblock %}
{% block body %}
{% block block_navstart %} {% include "_partials/_nav.html.twig" %} {% endblock %}
<!-- detail-immobilier -->
<section class="hebergements">
<div class="container">
<!-- -->
<div class="row justify-content-center">
<div class="col-lg-5">
{{ form_start(form, {'attr': {'class': 'form-inline ml-3'}}) }}
<div class="input-group">
<a class="mt-4 mx-2" href="{{ path('app_hebergements_index') }}"><i class="fa-solid fa-rotate-right fa-2x bg-light"></i></a>
{{ form_row(form.q, {'attr': {'class': 'form-control W-500'}}) }}
<div class="input-group-append">
<button type="submit" class="btn btn-light mt-4">
<i class="fas fa-search text-muted"></i>
</button>
</div>
</div>
{{ form_end(form) }}
</div>
</div>
<!-- -->
<div class="row">
<h2 class="bg-light " style="color:#808000;">HOTELS et HEBERGEMENTS disponibles</h2>
<p>Disponibles à travers le monde: Complexe Hotelière, Hotels, Motels, Auberges, Appartements Meublés,...etc.</p>
{% for hebergement in allHebergements %}
<div class="col-md-6 col-lg-3 my-1">
<article class="card p-1">
<h1 class="h5"><strong>{{ hebergement.name | slice (0, 30) }}</strong></h1>
<img src="{{ asset('uploads/images/' ~ hebergement.imageFileName) }}"
alt="{{ hebergement.name }}" class="img-fluid" style="width: 300px; height: 300px;" />
<div>{{ hebergement.description | slice (0, 50) }}...</div>
<div><strong>{{ hebergement.categorieshebergements.name }}</strong></div>
<div style="color:#808000;"><strong>{{ hebergement.city }}--{{ hebergement.country }}</strong></div>
<div>
<a href="{{ path('app_hebergements_details', {slug: hebergement.slug, id: hebergement.id}) }}" class="btn btn-primary btn-sm">Voir les détails</a>
<a href="{{ path('app_hebergements_similars', {catego: hebergement.categorieshebergements.id}) }}" class="btn btn-secondary btn-sm">Hebergements similaires</a>
{% set i = 0 %}
{% for statElem in allStatistiques %}
{% if hebergement.id == statElem.idElement and statElem.page == 'DETAIL_HEBERGEMENT' %}
{% set i = i + 1 %}
{% endif %}
{% endfor %}
{% include '_partials/_compteur_vues.html.twig' %} {## COMPTEUR_VUES ##}
</div>
</article>
</div>
{% endfor %}
</div>
{% if isPaginated is defined %}
<div class="row mt-3">
<nav aria-label="Page navigation example">
<ul class="pagination">
{% if page != 1 %}
<li class="page-item">
<a class="page-link" href="{{ path('app_hebergements_index', {page: page - 1, nbre: nbre}) }}">
Previous
</a>
</li>
{% endif %}
{% for i in range(1, nbrePage) %}
<li class="page-item">
<a class="page-link" href="{{ path('app_hebergements_index', {page: i, nbre: nbre}) }}">
{{ i }}
</a>
</li>
{% endfor %}
{% if page != nbrePage %}
<li class="page-item">
<a class="page-link" href="{{ path('app_hebergements_index', {page: page + 1, nbre: nbre}) }}">
Next
</a>
</li>
{% endif %}
</ul>
</nav>
</div>
{% endif %}
</div>
</section>
{% endblock %}