{% extends 'base_front.html.twig' %}
{% block meta %}
<title>Préparez votre vacance sur Hobbiinn</title>
{# <meta name="description" content="Providders permet de mettre en relation des prestataires et futurs mariés. Actuellement, {{ productsCount }} services sont disponibles parmis les évènements {% for category in categories %}{{ category.name }}{% endfor %}"> #}
{% endblock %}
{% block style %}
<link href="{{ asset('css/jquery-ui.css') }}" rel="stylesheet">
<link href="{{ asset('css/providders.css') }}" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('css/jquery.datetimepicker.min.css') }}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.css">
{# Daterangepicker style #}
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
<style>
/** DateTimePicker Style */
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default, .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current, .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current {
background: #FE7708;
box-shadow: #FE7708 1px 3px 0 inset;
color: #fff;
font-weight: 700;
}
.xdsoft_datetimepicker .xdsoft_calendar td:hover, .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:hover {
color: #fff !important;
background: #FE7708 !important;
box-shadow: none !important;
}
.alert.alert-danger {
display: none;
}
{# Custom style daterangepicker #}
.drp-buttons .btn {
height: 30px;
}
@media screen and (max-width: 563px) {
.drp-buttons .cancelBtn {
margin-bottom: 10px;
}
}
.daterangepicker td.active,
.daterangepicker td.active:hover {
background-color: #eb5b20 !important;
color: #fff;
}
.daterangepicker td.in-range {
background-color: #eb5b201c;
}
</style>
{% endblock %}
{% block body %}
<!-- hero-section -->
<div class="hero-section position-relative heor-section-style" style="">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
{% for slider in sliders %}
<li data-target="#carouselExampleIndicators" data-slide-to="{{ loop.index -1 }}" class="{% if loop.first %}active{% endif %}"></li>
{% endfor %}
</ol>
<div class="carousel-inner">
{% for slider in sliders %}
<div class="carousel-item {% if loop.first %}active{% endif %}">
<div style="background:url({{ asset(constant('App\\Services\\File::IMAGE_CATEGORY_DIR') ~ slider) }})no-repeat center;background-size:cover;height:600px"></div>
<div class="carousel-caption d-none d-md-block"></div>
</div>
{% endfor %}
</div>
{{ include('front/accueil/recherche.html.twig') }}
</div>
</div>
<!-- /.hero-section -->
<div class="bg-white space-small d-none">
<div class="container">
<div
class="row" id="block_icons">
<!-- feature-1 -->
{% for block in pagesHome %}
{% if block.name == 'Sous block 1' %}
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-4 col-12 mb20">
<div class="icon-3x mb30 text-default d-flex justify-content-center">
<i class="icon-051-wedding-arch"></i>
</div>
<div class="centerBlock">
<h3>
<strong>{{ productsCount }}
Services disponibles</strong></h3>
<p>{{ block.description1 }}</p>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-4 col-12 mb20">
<div class="icon-3x mb30 text-default d-flex justify-content-center">
<i class="icon-051-love-birds"></i>
</div>
<div class="centerBlock">
<h3>
<strong>{{ commandsCount }}
prestations réalisées</strong></h3>
<p>{{ block.description2 }}</p>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-4 col-12 mb20">
<div class="icon-3x mb30 text-default d-flex justify-content-center">
<i class="icon-017-location"></i>
</div>
<div class="centerBlock">
<h3>
<strong>{{ departmentsCount }}
Départements disponibles</strong></h3>
<p>{{ block.description3 }}</p>
</div>
</div>
{% endif %}
{% endfor %}
{% for block in pagesHome %}
{% if block.name == 'Sous block 1' %}
{% if is_granted('ROLE_ADMIN') %}
<a href="{{ path('admin_modify_block_home', {'id': block.id}) }}" style="margin:auto">
<i class="fas fa-pencil-alt" style="font-size:2em;color:blue"></i>
</a>
{% endif %}
{% endif %}
{% endfor %}
<!-- /.feature-3 -->
</div>
</div>
</div>
{{ include('front/accueil/bloc_reseauSocial.html.twig') }}
{{ include('front/accueil/rechercheParPrestataire.html.twig') }}
{# <div class="space-medium">
<div class="p-4">
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div
class="section-title text-center">
<!-- section title start-->
<h2 class="mb10">Recherche par type de service</h2>
</div>
<!-- /.section title start-->
</div>
</div>
<div class="venue-thumbnail-carousel">
<div class="owl-carousel car-one">
{% for category in subCategories %}
{% if category.isService %}
<div class="item">
<div class="venue-categories-block col-md-12">
<div class="venue-categories-img zoomimg">
<a href="{{ path('front_product_category_events', {'subCategorySlug': category.subCategorySlug}) }}"><img src="{{ asset(constant('App\\Services\\File::IMAGE_CATEGORY_DIR') ~ category.image) }}" alt="{{ category.name }}" class="img-fluid"></a>
<div class="venue-categories-overlay">
{% set nbProduct = category.products|length %}
<h3 class="mb0">
<a href="{{ path('front_product_category_events', {'subCategorySlug': category.subCategorySlug}) }}" class="venue-categories-title">{{ category.name }}
({{ nbProduct }})</a>
</h3>
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div> #}
<!-- Annonces -->
<div class="container mt-4 d-none">
<h1>
<strong>Annonces</strong>
</h1>
<div id="allProduct" class="row">
{% if productss|length > 0 %}
{# <div class="col-12">
<button type="button" class="btn btn-primary mb-2" data-toggle="modal" data-target="#modalFilter">Filter</button>
</div> #}
{% for product in productss|slice(productss|length - 6 < 0 ? 0 : productss|length, productss|length) %} {# Affiche seulement les 6 dernière produits et service #}
{# <pre>
{{ dump(product) }}
</pre> #}
{% set subCategorySlug = product.subCategories.toArray()[0].subCategorySlug %}
<div class="col-lg-4 col-sm-12 col-12" >
<div class="container-block-Pcompanies mb-3">
{# <div class="container-imageP zoomimg"> #}
<div class="container-slide-image">
{% if product.photos.first != false %}
{% for imgHebmt in product.photos.toArray() %}
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ imgHebmt.url) }}" alt="default image" class="img-fluid" style="height: 213px;object-fit: cover; border-radius: .5rem .5rem 0 0;">
{% endfor %}
{% else %}
<img src="{{ asset('images/vecteezy_vector-gear-logo-design-with-multi-colors-range_6172776.jpg') }}" alt="default image" class="img-fluid" style="height: 213px;object-fit: cover; border-radius: .5rem .5rem 0 0;">
{% endif %}
</div>
<div class="container-info-presta" style="padding-bottom: 80px;">
<h2 class="vendor-title">
{# <a href="{{ path('front_product_single', {'slug': product.subCategories[0].categories[0].slug, 'subCategorySlug': product.subCategories[0].subCategorySlug, 'product_id': product.id, 'productSlug': product.productSlug}) }}" class="title">{{ product.name }}</a> #}
</h2>
<p class="vendor-address">
{% for department in product.departments %}
{{ department.name }}
{% if not loop.last %},
{% endif %}
{% else %}
Toute la France
{% endfor %}
</p>
<p>
{% if product.typeHebergements.slugTypeHebergm is defined and product.typeHebergements.slugTypeHebergm != 'hotel' %}
<i class="fas fa-money-bill-wave"></i>
Prix :
<strong>{{ product.price|number_format(2, '.') }}</strong>€
{% else %}
{% set lengthRoomNight = 0 %}
{% set statusByNight = false %}
{% set allPriceByNight = 0 %}
{% set lengthRoomDay = 0 %}
{% set statusByDay = false %}
{% set allPriceByDay = 0 %}
{% if product.chambres is defined %}
{% for roomOption in product.chambres.toArray %}
{% if roomOption.tarifNuit is defined %}
{% set lengthRoomNight = lengthRoomNight + 1 %}
{% set statusByNight = true %}
{% set allPriceByNight = allPriceByNight + roomOption.tarifNuit %}
{% endif %}
{% if roomOption.tarifJour is not null %}
{% set lengthRoomDay = lengthRoomDay + 1 %}
{% set statusByDay = true %}
{% set allPriceByDay = allPriceByDay + roomOption.tarifJour %}
{% endif %}
{% endfor %}
{% if statusByDay or statusByNight %}
<p>Prix moyen d'une chambre:</p>
{% endif %}
{% if statusByNight %}
<p>
<i class="fas fa-money-bill-wave"></i>
par nuit
<strong>{{ (allPriceByNight / lengthRoomNight)|number_format(2, '.') }}</strong>€
</p>
{% endif %}
{% if statusByDay %}
{# <p>
<i class="fas fa-money-bill-wave"></i>
par jour
<strong>{{ (allPriceByDay / lengthRoomDay)|number_format(2, '.') }}</strong>€
</p> #}
{% endif %}
{% endif %}
{% if not statusByNight and not statusByDay %}
<p>
Prix : <strong>Prix en attente</strong>
</p>
{% endif %}
{# <i class="fas fa-money-bill-wave"></i>
Prix :
<strong>{{ product.price|number_format(2, '.') }}</strong>€ #}
{% endif %}
</p>
<p>
<i class="fa fa-star rated"></i>
{% set notes = 0 %}
{% for avi in product.avis %}
{% set notes = notes + avi.globalNote %}
{% endfor %}
{% set noteTotal = (notes > 0) ? notes / product.avis|length : 0 %}
{{ product.avis|length }} Avis</p>
</div>
<div class="wishlist-sign">
<a href="#" class="btn-wishlist">
<i class="fa fa-heart"></i>
</a>
</div>
{# <a href="{{ path('front_product_single', {'slug': product.subCategories[0].categories[0].slug, 'subCategorySlug': product.subCategories[0].subCategorySlug, 'product_id': product.id, 'productSlug': product.productSlug}) }}" class="title"> #}
{% if subCategorySlug == "hebergements"%}
<button class="btnVoirP btn">Voir l'hébergement</button>
{% endif %}
</a>
</div>
</div>
{% endfor %}
{% else %}
<div class="vendor-thumbnail list-view p-4">Aucun service correspondant</div>
{% endif %}
</div>
</div>
{{ include('front/accueil/rechercheParTypeDeProduit.html.twig') }}
{# <div class="bg-white space-medium">
<div class="p-4">
<div class="row">
<div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12">
<div
class="section-title text-center">
<!-- section title start-->
<h2 class="mb10">Recherche par type de produit</h2>
</div>
<!-- /.section title start-->
</div>
</div>
<div class="venue-thumbnail-carousel">
<div class="owl-carousel car-two">
{% for category in subCategories %}
{% if not category.isService %}
<div class="item">
<div class="venue-categories-block col-md-12">
<div class="venue-categories-img zoomimg">
<a href="{{ path('front_product_category_events', {'subCategorySlug': category.subCategorySlug}) }}"><img src="{{ asset(constant('App\\Services\\File::IMAGE_CATEGORY_DIR') ~ category.image) }}" alt="{{ category.name }}" class="img-fluid"></a>
<div class="venue-categories-overlay">
{% set nbProduct = category.products|length %}
<h3 class="mb0">
<a href="{{ path('front_product_category_events', {'subCategorySlug': category.subCategorySlug}) }}" class="venue-categories-title">{{ category.name }}
({{ nbProduct }})</a>
</h3>
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div> #}
{{ include('front/accueil/selectionDocumentaire.html.twig') }}
{# <div class="space-ex-large bg-white">
<div class="container">
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div
class="section-title text-center">
<!-- section title start-->
<h2 class="mb10">Notre sélection documentaire</h2>
<p>Astuces, conseils, organisation,.. Des articles qui vont vous aider à préparer au mieux votre mariage.</p>
</div>
<!-- /.section title start-->
</div>
</div>
<div class="row">
{% for article in articles %}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
<div
class="post-block">
<!-- post vertical block -->
<div class="meta-date-circle">
<span class="meta-date">{{ article.publishedAt|date('d') }}
<small>{{ article.publishedAt|format_date(pattern="MMM")|slice(0, 3)|capitalize }}</small>
</span>
</div>
<div class="post-img zoomimg rounded-top" style="background:url({{ asset(constant('App\\Services\\File::IMAGE_BLOG_DIR') ~ article.image) }});width:100%;height:250px;background-repeat:no-repeat;background-position: center;background-size:cover"></div>
<div class="post-content text-left rounded-0">
<div class="post-meta-category">
<a href="{{ path('front_blog_category_list', {'categorySlug': article.blogCategory.categorySlug}) }}">{{ article.blogCategory.name }}</a>
</div>
<h3 class="mb-0">
<a href="{{ path('front_blog_single', {'categorySlug': article.blogCategory.categorySlug, 'slug': article.slug}) }}" class="post-title">{{ article.title }}</a>
</h3>
<div class="post-second-footer">
<p class="meta"></p>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-6 col-sm-12 col-12 text-center mt30">
<a href="{{ path('front_blog_list') }}" class="btn btn-default">Voir tous les articles</a>
</div>
</div>
</div>
</div> #}
{# {% if packsFormule is not empty %}
<div class="space-small bg-white">
<div class="container">
<div class="row">
<div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12">
<div
class="section-title text-center">
<!-- section title start-->
<h2 class="mb10">Nos formules mariage & lune de miel</h2>
</div>
<!-- /.section title start-->
</div>
</div>
<div
class="row">
<!-- venue-categoris-block-->
{% for pack in packsFormule %}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12">
<div class="vendor-categories-block zoomimg">
<div class="vendor-categories-img">
<a href="{{ path('front_pack_single', {'slug': pack.slug}) }}"><img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ pack.image) }}" alt="{{ pack.name }}" class="img-fluid" style="min-width:100%"></a>
</div>
<div class="vendor-categories-overlay">
<div class="vendor-categories-text">
<h4 class="mb0">
<a href="{{ path('front_pack_single', {'slug': pack.slug}) }}" class="vendor-categories-title">{{ pack.name }}</a>
</h4>
</div>
</div>
</div>
<!-- /.venue-categoris-block-->
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %} #}
<!-- /.feature-section -->
{% if packsLuneMiel is not empty %}
<div class="space-medium pdb0">
<div class="container">
<div class="row">
<div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12">
<div
class="section-title text-center">
<!-- section title start-->
<h2 class="mb10">Nos sélections lune de miel</h2>
</div>
<!-- /.section title start-->
</div>
</div>
<div
class="row">
<!-- venue-categoris-block-->
{% for pack in packsLuneMiel %}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12">
<div class="vendor-categories-block zoomimg">
<div class="vendor-categories-img">
<a href="{{ path('front_pack_single', {'slug': pack.slug}) }}"><img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ pack.image) }}" alt="{{ pack.name }}" class="img-fluid" style="min-width:100%"></a>
</div>
<div class="vendor-categories-overlay">
<div class="vendor-categories-text">
<h4 class="mb0">
<a href="{{ path('front_pack_single', {'slug': pack.slug}) }}" class="vendor-categories-title">{{ pack.name }}</a>
</h4>
</div>
</div>
</div>
<!-- /.venue-categoris-block-->
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<!-- /. venue-thumbnail-section-->
<!-- /.feature-section-->
<!-- Testimonial-section -->
{% if lastAvis is not empty and lastAvis|length >= 3 %}
<div class="space-medium bg-yellow-light"> <div class="container">
<div class="row">
<div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12">
<div
class="section-title text-center">
<!-- section title start-->
<h2 class="mb10">Derniers avis déposés</h2>
</div>
<!-- /.section title start-->
</div>
</div>
<div class="row">
{% for avi in lastAvis %}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
<div
class="testimonial-block">
<!-- testimonial block -->
<div class="testimonial-icon">
<i class="fa fa-quote-right fa-default"></i>
</div>
<h3 class="testimonial-name">{{ avi.client.firstName }}</h3>
<p class="testimonial-text">“{{ avi.text }}”</p>
<div class="testimonial-pic">
{% if avi.client.image %}
<img src="{{ asset(constant('App\\Services\\File::IMAGE_CLIENT_DIR') ~ avi.client.image) }}" class="rounded-circle" alt="{{ avi.client.firstName }}" style="width:100px;height:100px">
{% else %}
<img src="{{ asset('images/user-default') }}" class="rounded-circle" alt="{{ avi.client.firstName }}" style="width:100px;height:100px">
{% endif %}
</div>
<hr>
<div class="testimonial-meta">
<h5 class="mb0">{{ avi.client.firstName }}
a choisi un produit de la catégorie
{{ avi.product.subCategories[0].name }}</h5>
<p class="testimonial-small-text mb0">
{% for department in avi.product.departments %}
Disponibilité :<br>
{{ department.name }}
{% if not loop.last %},
{% endif %}
{% else %}
Disponibilité :<br>
Toute la France
{% endfor %}
</p>
<span class="rating-star">
{% for i in 1..5 %}
{% if i < avi.globalNote %}
<i class="fa fa-star rated"></i>
{% else %}
<i class="far fa-star"></i>
{% endif %}
{% endfor %}
</span>
</div>
<!-- /.testimonial block -->
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<!-- /.Testimonial-section -->
{{ include('front/petiteAnnonce.html.twig') }}
{# <div class="venue-thumbnail-carousel"> #}
{#<div class="space-small bg-white">
<div class="container">
<div class="row">
<div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12">
<div
class="section-title text-center">
<!-- section title start-->
<h2 class="mb10">Les petites annonces</h2>
{% if clients is not empty %}
{% if (clients is not empty) and (clients | length == 1) %}
<p class="sous_titre">Le premier nouvel annonce client</p>
{% elseif(clients is not empty) and (clients | length == 2) %}
<p class="sous_titre">Les deux premiers annonces clients</p>
{% elseif(clients is not empty) and (clients | length == 3) %}
<p class="sous_titre">Les trois premiers annonces clients</p>
{% else %}
<p class="sous_titre">Les trois derniers annonces clients</p>
{% endif %}
{% else %}
<p class="sous_titre">il y a Aucune annonce pour l'instant</p>
{% endif %}
</div>
<!-- /.section title start-->
</div>
</div>
<div
class="row">
<!-- venue-categoris-block-->
{% set today = date() %}
{% set yesterday = date('-1days') %}
{% for annonce in annonces %}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12">
<div class="vendor-categories-block zoomimg">
<div class="vendor-categories-img">
<div class="total_carde">
<div class="card card_core">
<div class="card-body">
<h3 class="card-title titre_cadre">{{filter_service.limite_motsafficher(annonce.titre, 60)}}</h3>
<p class="card-text text_cadre">{{ filter_service.limite_motsafficher(annonce.description,80) | raw}}</p>
</div>
</div>
<div class="profil_card">
<div class="profil_photo">
<img src={{ asset('images/avatar.jpg') }} alt="profil" class="profil_img">
</div>
<div class="profil_core">
<h4 class="profil_core_nom">{{annonce.users.firstName}}{{annonce.users.lastName}}</h4>
{% if annonce.createdAt|date('d/m/Y') == today|date("d/m/Y") %}
<span>Aujourd'hui à {{annonce.createdAt | date('H:i')}}</span>
{% elseif annonce.createdAt|date('d/m/Y') == yesterday|date("d/m/Y") %}
<span>Hier à {{annonce.createdAt | date('H:i')}}</span>
{% else %}
<span>{{annonce.createdAt | date('d M Y')}}
à
{{annonce.createdAt | date('H:i')}}</span>
{% endif %}
</div>
</div>
</div>
</div>
</div>
<!-- /.venue-categoris-block-->
</div>
{% endfor %}
</div>
{% if clients is not empty %}
<div class="row">
<div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12">
<div class="section-title text-center">
<a href="{{ path('client_space_annonce_tous') }}" class="btn btn-default mb-3 bouton_s">
{% if (clients is not empty) and (clients | length == 1) %}
<p>Voir l' annonce du client <i class="fa fa-angle-double-right"></i></p>
{% else %}
<p>Voir les ({{clients | length}}) annonce(s) du client <i class="fa fa-angle-double-right"></i></p>
{% endif %}
</a>
</div>
<!-- /.section title start-->
</div>
</div>
{% endif %}
</div>
</div>#}
{# <div class="space-small bg-white">
<div class="container">
<div class="row">
<div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12">
<div
class="section-title text-center">
<!-- section title start-->
<h2 class="mb10">Les petites annonces du prestataire</h2>
{% if prestataires is not empty %}
{% if (prestataires is not empty) and (prestataires | length == 1) %}
<p class="sous_titre">Le premier nouvel annonce prestataire</p>
{% elseif(prestataires is not empty) and (prestataires | length == 2) %}
<p class="sous_titre">Les deux premiers annonces prestataires</p>
{% elseif(prestataires is not empty) and (prestataires | length == 3) %}
<p class="sous_titre">Les trois premiers annonces prestataires</p>
{% else %}
<p class="sous_titre">Les trois derniers annonces prestataires</p>
{% endif %}
{% else %}
<p class="sous_titre">il y a Aucune annonce pour l'instant</p>
{% endif %}
</div>
<!-- /.section title start-->
</div>
</div>
<div
class="row">
<!-- venue-categoris-block-->
{% set today = date() %}
{% set yesterday = date('-1days') %}
{% for annonce in annonce_prests %}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12">
<div class="vendor-categories-block zoomimg">
<div class="vendor-categories-img couvert_prest">
<img src={{('upload/produits/' ~ filter_service.getphotoProduit(annonce.products)) }} alt="profil" class="img-fluid image_prest">
<div class="card card_core_prest">
<div class="card-body">
<h3 class="card-title titre_cadre_prest">{{filter_service.limite_motsafficher(annonce.titre, 70)}}</h3>
<span>Prix :
{{annonce.products.price}}
€</span>
<p class="card-text text_cadre_prest">
{% if annonce.createdAt|date('d/m/Y') == today|date("d/m/Y") %}
<span>Aujourd'hui à {{annonce.createdAt | date('H:i')}}</span>
{% elseif annonce.createdAt|date('d/m/Y') == yesterday|date("d/m/Y") %}
<span>Hier à {{annonce.createdAt | date('H:i')}}</span>
{% else %}
<span>{{annonce.createdAt | date('d M Y')}}
à
{{annonce.createdAt | date('H:i')}}</span>
{% endif %}
</p>
</div>
</div>
</div>
</div>
<!-- /.venue-categoris-block-->
</div>
{% endfor %}
</div>
{% if prestataires is not empty %}
<div class="row">
<div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12">
<div class="section-title text-center">
<a href="{{ path('company_space_annonce') }}" class="btn btn-default mb-3 bouton_s">
{% if (clients is not empty) and (clients | length == 1) %}
<p>Voir l' annonce du prestataire <i class="fa fa-angle-double-right"></i></p>
{% else %}
<p>Voir les ({{prestataires | length}}) annonce(s) du prestataire <i class="fa fa-angle-double-right"></i></p>
{% endif %}
</a>
</div>
<!-- /.section title start-->
</div>
</div>
{% endif %}
</div>
</div> #}
{# {{ include('front/accueil/petiteAnnoncePrestataire.html.twig') }} #}
</div></div>{# </div> #}</div>
<button class="btn btn-default" id="btnCarte" data-url="{{ path('front_company_recherche_map') }}">Carte <i class="far fa-map"></i></button>
{% endblock %}
{% block javascript %}
{{ parent() }}
{# Pour aller voir carte et pour effacer en trois seconde addFlash message #}
<script src="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.js"></script>
<script src="{{ asset('js/btnCart.js') }}"></script>
<script src="{{ asset('js/jquery-ui.js') }}"></script>
<script>$('.carousel').carousel({interval: 3000})
$(document).ready(function () {
$('#category_master').change(function () {
var inputValue = $('#category_master').val();
const data = {
idCategory: inputValue
};
let datas = new FormData();
datas.append("data", JSON.stringify(data));
fetch("{{ path('front_search_category') }}", {
method: 'POST',
body: datas
}).then(response => response.json()).then(data => {
if (data.response === 'ok') {
document.getElementById('div_search_type').innerHTML = data.categories.content;
}
})
})
});
// $('.owl-mitapy').owlCarousel({
// items: 3,
// loop:true,
// nav:true,
// autoplay: true,
// })</script><script>
var modal = document.querySelector('.annonce-modal');
var close = document.querySelector('#modal-concel');
if(close != null){
close.addEventListener('click', closeModal);
}
function closeModal() {
modal.classList.remove('affiche');
}
function trouvePrest(event) {
// var texte = event.target;
// let message = texte.getAttribute('data-text');
// let nom = texte.getAttribute('data-cli');
// let mail = texte.getAttribute('data-mail');
modal.classList.add('affiche');
// message_content.innerText = message;
// info_content.innerHTML = nom + ' / ' + mail;
}</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.8.1/baguetteBox.min.js"></script>
<script src="{{asset('/js/jquery.datetimepicker.full.js')}}"></script>
<script>
jQuery(document).ready(function($) {
$('#datetimepickerAccueil').datetimepicker({
format: 'd/m/Y',
locale: 'fr',
minDate: "+1",
minview: 2,
timepicker: false,
// new Date()
});
})
</script>
{# daterangepicker #}
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
<script>
{# Save value of daterangepicker #}
jQuery(document).ready(function($) {
var $startDate = $('#startdatetimepickerAccueil');
var $endDate = $('#enddatetimepickerAccueil');
$('#daterangePicker').daterangepicker({
opens: 'left',
locale: {
format: 'DD/MM/YYYY', // Change date format
separator: ' - ',
applyLabel: 'Appliquer',
cancelLabel: 'Annuler',
fromLabel: 'De',
toLabel: 'À',
customRangeLabel: 'Personnalisé',
weekLabel: 'S',
daysOfWeek: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'],
monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
firstDay: 1 // Monday as the first day of the week
}
}, function(start, end, label) {
$startDate.val(start.format('DD/MM/YYYY'));
$endDate.val(end.format('DD/MM/YYYY'))
});
})
</script>
<script>
{# Handle daterange in search #}
$(document).ready(function() {
var $categorySelect = $('#persoBorder');
var $singleDateContainer = $('#singleDateContainer');
var $rangeDateContainer = $('#rangeDateContainer');
var $startDate = $('#startdatetimepickerAccueil');
var $endDate = $('#enddatetimepickerAccueil');
var $weddingDate = $('#datetimepickerAccueil');
$categorySelect.on('change', function() {
var selectedOption = $categorySelect.find('option:selected').text().toLowerCase();
console.log("Selected option:", $categorySelect.val());
if ($categorySelect.val() == 55) { // in search if subcategory selected is hebergements
$singleDateContainer.hide();
$rangeDateContainer.show();
$weddingDate.prop('required', false);
$startDate.prop('required', true);
$endDate.prop('required', true);
} else if ($categorySelect.val() == 53) { // in search if subcategory selected is vehicule
$singleDateContainer.hide();
$rangeDateContainer.show();
$weddingDate.prop('required', false);
$startDate.prop('required', true);
$endDate.prop('required', true);
} else {
$singleDateContainer.show();
$rangeDateContainer.hide();
$weddingDate.prop('required', true);
$startDate.prop('required', false);
$endDate.prop('required', false);
$startDate.val("");
$endDate.val("");
}
});
// Save value daterange picker to local storage
const form = document.getElementById('formShearch');
form.addEventListener('submit', saveDate);
function saveDate(e) {
e.preventDefault();
const saveStart = document.getElementById('startdatetimepickerAccueil').value;
const saveEnd = document.getElementById('enddatetimepickerAccueil').value;
const dateSave = {
start: saveStart,
end: saveEnd
};
localStorage.setItem('dateSave', JSON.stringify(dateSave));
form.submit();
}
});
</script>
{% endblock %}