{% extends 'base_front.html.twig' %}{% block meta %} <title>Prestataire {{ company.companyName }}</title> <meta name="description" content="Page du prestataire {{ company.companyName }} présent dans la catégorie {% for category in company.category %}{{ category.name }}{% endfor %}. {{ avis|length }} avis disponibles sur ce prestataire">{% endblock %}{% block body %} <style> .cont_avis{ width: 92%; margin:auto; box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25); padding-bottom: 40px; border-radius: 0 0 20px 20px; margin-top: -80px; } .img_profil_presta { filter: drop-shadow(3px 3px 9px rgba(0, 0, 0, 0.25)); border-radius: 24px; width: 160px; height: 160px; background-color: violet; object-fit: cover; } .cont_notess { display: flex; column-gap: 40px; flex-direction: row; } {# image comment #} .cont_img_comment { display: flex; column-gap: 10px; margin-bottom: 10px; } .cont_img_comment img { width: 100px; height: 100px; box-shadow: 1px 1px 5px #0000005c; border-radius: 20px; object-fit: cover; } {# name product avi #} .user-meta { display: flex; justify-content: space-between; } </style> <!-- Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document" style="max-width:50%"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Conditions de vente de l'entreprise {{ company.companyName }}</h5> <a href="#" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </a> </div> <div class="modal-body"> <p>{{ company.conditionsVente }}</p> </div> <div class="modal-footer"> <a href="#" class="btn btn-secondary" data-dismiss="modal">Fermer</a> </div> </div> </div> </div> {# Variable for condition to show info or not depend of abonnement and abonnement isActive #} {% set isAbonnementPayed = false %} {% if company.abonnements.count() > 0 %} {% if company.abonnements.last.isActive %} {% set isAbonnementPayed = true %} {% endif %} {% endif %} <div class="real-wedding-single-img" style="background: url('/images/vacncance_blog.jpg')no-repeat center;background-size: cover;"> <div class="container"> <div class="row"> <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 text-center"> <div class="realwed-caption"> <h1 class="real-wedding-single-title">{{ company.companyName }}</h1> <span class="real-wedding-place ml-4 text-white"> <i class="fas fa-map-marker-alt pr-2"></i> {{ company.city }}</span> </div> </div> </div> </div> <!-- page caption --> {# <div class="realwed-addressbar"> <div class="container"> <div class="row"> <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12"> <p> <span class="ml-4" style="color: white">Prestataire de la catégorie : <strong> {% for category in company.category %} {{ category.name }} {% if not loop.last %}, {% endif %} {% endfor %} </strong> </span> </p> </div> </div> </div> </div> #} <!-- page breadcrumb --> </div> {# <img src="#" alt="" style="width:100px;height:100px;background-color:red"> #} <div class="cont_avis"> <div class="container"> {% if company.image != null %} <img src="{{asset(constant('App\\Services\\File::IMAGE_COMPANY_DIR') ~ company.image)}}" class="img_profil_presta mb-3" alt=""> {% else %} <img src="{{ asset('images/user-default.jpg') }}" class="img_profil_presta mb-3" alt=""> {% endif %} <h1>{{company.companyName}}</h1> {% if company.category.toArray() != [] %} <p>Prestataire de la catégorie : <strong> {% for category in company.category %} {{ category.name }} {% if not loop.last %}, {% endif %} {% endfor %} </strong> </p> {% endif %} {% if isAbonnementPayed %} <div class="cont_notess"> <div class="one_infos"> <strong> . Note : </strong> <p class="mb-0"> <span style="color:#ffa912"> {% if notes['globalNote']['count'] > 0 %} {% set globalNotePresta = notes['globalNote']['totalNote'] / notes['globalNote']['count'] %} {% else %} {% set globalNotePresta = 0 %} {% endif %} {{ globalNotePresta|number_format(1, '.') }} </span> {% for i in 1..5 %} {% if i <= globalNotePresta|number_format(1, '.') %} <i class="fa fa-star rated"></i> {% else %} <i class="far fa-star rated"></i> {% endif %} {% endfor %} </p> <p style="text-align: center;">({{notes['globalNote']['count']}} évaluations)</p> </div> <div class="one_infos"> <strong> . Date : </strong> {# <p> 22 Octobre 2022</p> #} <p> {{ company.createdAt ? company.createdAt|format_datetime(locale='fr',pattern="dd MMMM YYYY"):"" }}</p> </div> <div class="one_infos"> <strong> . Adresse : </strong> {# <p> Pune, Inde (adresse secondaire)</p> #} <p> {{company.city}} ({{company.adress}})</p> </div> </div> {% endif %} </div> </div> <!-- /.page-header --> <div class="content"> <div class="container"> <div class="row"> <div class="col-xl-8 col-lg-8 col-md-8 col-sm-12 col-12"> {% if isAbonnementPayed %} <div class="card border card-shadow-none"> <div class="card-header bg-white"> <h3 class="mb-0">À propos de {{ company.companyName }}</h3> </div> <div class="card-body border-top"> {{ company.description | raw }} </div> </div> {% endif %} <div class="real-wedding-content bg-white border"> <div class="row"> <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12"> <div class="card review-summary-table table-responsive"> <table class="table"> <thead> <tr> <th>Prénom</th> <th>Note</th> <th>Date</th> <th>Action</th> </tr> </thead> <tbody> {% for key,avi in avis %} {% if avi.isDesactivatedByAdmin == null and avi.isDesactivatedByAdmin == false %} <tr> <td class="review-summary-name">{{ avi.client.firstName }}</td> <td class="review-summary-rating"> <span class="rated"> {% for i in 1..5 %} {% if i <= avi.globalNote %} <i class="fa fa-star"></i> {% else %} <i class="far fa-star"></i> {% endif %} {% endfor %} </span> <span class="ml-2">{{ avi.globalNote|number_format(1, '.') }}</span> </td> <td class="review-summary-id">{{ avi.createdAt|date('d/m/Y') }}</td> <td class="review-summary-action"> <a class="btn btn-outline-pink btn-xs" data-toggle="collapse" id="example-one" data-text-swap="close" data-text-original="Details" href="#{{ avi.product.productSlug }}{{ loop.index }}" aria-expanded="false" aria-controls="collapseExample">Details </a> </td> </tr> <tr> <td colspan="12" class="expandable-info"> <div class="collapse expandable-collapse" id="{{ avi.product.productSlug }}{{ loop.index }}"> <div class="row"> <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12"> <!-- review-user --> <div class="review-user"> <div class="user-img"> {% if avi.client.image == null %} <img src="{{ asset('images/user-default.jpg') }}" alt="star rating jquery" class="rounded-circle" style="width:50px;height:50px;"></div> {% else %} <img src="{{ asset(constant('App\\Services\\File::IMAGE_CLIENT_DIR') ~ avi.client.image) }}" alt="star rating jquery" class="rounded-circle" style="width:50px;height:50px;"></div> {% endif %} <div class="user-meta"> <span class="user-name mb-2">{{ avi.client.firstName }}</span> <div class="given-review"></div> <span>{{ avi.product.name }}</span> </div> </div> <!-- /.review-user --> <!-- review-descripttions --> <div class="review-descriptions mt-4"> {% if avi.text %} <p>{{ avi.text }}</p> {% else %} <p>Aucun avis déposé</p> {% endif %} <div class="cont_img_comment" id="id_img_{{key}}"> {% for imgcomment in avi.imageComments.toArray() %} <img src={{ asset(constant('App\\Services\\File::IMAGE_COMMENT_DIR') ~ imgcomment.url) }} class="img_comment"> {% endfor %} </div> <div class="row"> <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12"> <!-- review-list --> <div class="review-list mr-1"> <div class="review-for">Qualité du service</div> <div class="review-rating"> <span class="rated"> {% for i in 1..5 %} {% if i <= avi.serviceQuality %} <i class="fa fa-star"></i> {% else %} <i class="far fa-star"></i> {% endif %} {% endfor %} </span> </div> <div class="review-number">{{ avi.serviceQuality }}</div> </div> <!-- /.review-list --> <!-- review-list --> <div class="review-list mr-1"> <div class="review-for">Fiabilité</div> <div class="review-rating"> <span class="rated"> {% for i in 1..5 %} {% if i <= avi.fiability %} <i class="fa fa-star"></i> {% else %} <i class="far fa-star"></i> {% endif %} {% endfor %} </span> </div> <div class="review-number">{{ avi.fiability }}</div> </div> <!-- /.review-list --> <!-- review-list --> <div class="review-list mr-1"> <div class="review-for">Prix</div> <div class="review-rating"> <span class="rated"> {% for i in 1..5 %} {% if i <= avi.price %} <i class="fa fa-star"></i> {% else %} <i class="far fa-star"></i> {% endif %} {% endfor %} </span> </div> <div class="review-number">{{ avi.price }}</div> </div> <!-- /.review-list --> <!-- review-list --> <div class="review-list"> <div class="review-for">Rapidité</div> <div class="review-rating"> <span class="rated"> {% for i in 1..5 %} {% if i <= avi.speed %} <i class="fa fa-star"></i> {% else %} <i class="far fa-star"></i> {% endif %} {% endfor %} </span> </div> <div class="review-number">{{ avi.speed }}</div> </div> <div class="review-list mr-1"> <div class="review-for">Description conforme</div> <div class="review-rating"> <span class="rated"> {% for i in 1..5 %} {% if i <= avi.conformDescription %} <i class="fa fa-star"></i> {% else %} <i class="far fa-star"></i> {% endif %} {% endfor %} </span> </div> <div class="review-number">{{ avi.conformDescription }}</div> </div> <div class="review-list"> <div class="review-for">Communication</div> <div class="review-rating"> <span class="rated"> {% for i in 1..5 %} {% if i <= avi.communication %} <i class="fa fa-star"></i> {% else %} <i class="far fa-star"></i> {% endif %} {% endfor %} </span> </div> <div class="review-number">{{ avi.communication }}</div> </div> <!-- /.review-list --> <!-- review-list --> </div> <!-- /.review-list --> </div> </div> <!-- /.review-descripttions --> </div> </div> </div> </td> </tr> {% endif %} {% else %} <tr> <td>Aucun avis pour le moment</td> </tr> {% endfor %} </tbody> </table> </div> <div class="pagination float-right"> <nav aria-label="Page navigation example"> {{ knp_pagination_render(avis) }} </nav> </div> </div> </div> </div> <!-- /.real-wedding-grid --> </div> <!-- sidebar --> <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12"> <div class="sidebar "> <div class="card border card-shadow-none widget-vendor-list "> <div class="card-header bg-white"> <h3 class="mb-0">Prestataire</h3> </div> <div class="card-body border-top vendor-sidebar-list"> <h5 class="vendor-list-title">Conditions de vente :</h5> <a href="#" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"> Voir </a> </div> <div class="card-body border-top vendor-sidebar-list"> <h5 class="vendor-list-title">Prestations :</h5> {% for category in company.category %} {{ category.name }} {% if not loop.last %}, {% endif %} {% endfor %} </div> <div class="card-body border-top vendor-sidebar-list"> <h5 class="vendor-list-title">Nombre de services proposés :</h5> {{ lastProducts|length }} service{% if lastProducts|length > 1 %}s{% endif %} </div> <div class="card-body border-top vendor-sidebar-list"> <h5 class="vendor-list-title">Note globale du prestataire :</h5> {% if notes['globalNote']['count'] > 0 %} {% set globalNotePresta = notes['globalNote']['totalNote'] / notes['globalNote']['count'] %} {% else %} {% set globalNotePresta = 0 %} {% endif %} <a href="#" class="vendor-list-link">{{ globalNotePresta|number_format(1, '.') }}</a> </div> </div> </div> </div> <!-- /.sidebar --> </div> <div class="row"> </div> <div class="row"> <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12"> <div class="section-block"> <h2>Produits du prestataire</h2> </div> </div> {% for otherProduct in lastProducts %} <div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12"> <div class="container-block-Pcompanies mb-3"> <div class="container-imageP zoomimg"> {% if otherProduct.photos is not empty %} <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ otherProduct.photos.first.url) }}" alt="{{ otherProduct.name }}" class="img-fluid" style="object-fit: cover; border-radius: .5rem .5rem 0 0;"> {% 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': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}" class="title">{{ otherProduct.name }}</a> </h2> <p class="vendor-address"> {% for department in otherProduct.departments %} {{ department.name }} {% if not loop.last %}, {% endif %} {% else %} Toute la France {% endfor %} </p> <p><i class="fas fa-money-bill-wave"></i> Prix <strong>{{ otherProduct.price|number_format(2, '.') }}</strong> €</p> <p><i class="fa fa-star rated"></i> 4,9 Avis</p> <p>{{ otherProduct.quantity }} Quantité restante</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': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}" class="title"> <button class="btnVoirP btn">Voir le produit</button> </a> </div> </div> {% endfor %} {# {% for otherProduct in lastProducts %} <div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12"> <div class="vendor-thumbnail"> <!-- Vendor thumbnail --> <div class="vendor-img zoomimg"> <!-- Vendor img --> <a href="{{ path('front_product_single', {'slug': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}"><img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ otherProduct.photos.first.url) }}" alt="{{ otherProduct.name }}" class="img-fluid"></a> <div class="wishlist-sign"> <a href="#" class="btn-wishlist"> <i class="fa fa-heart"></i> </a> </div> </div> <!-- /.Vendor img --> <div class="vendor-content"> <!-- Vendor Content --> <h2 class="vendor-title"> <a href="{{ path('front_product_single', {'slug': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}" class="title">{{ otherProduct.name }}</a> </h2> <p class="vendor-address"> {% for department in otherProduct.departments %} {{ department.name }} {% if not loop.last %}, {% endif %} {% else %} Toute la France {% endfor %} </p> </div> <div class="vendor-meta"> <div class="vendor-meta-item vendor-meta-item-bordered"> <span class="vendor-price"> {{ otherProduct.price|number_format(2, '.') }}€ </span> <span class="vendor-text">Prix</span> </div> <div class="vendor-meta-item vendor-meta-item-bordered"> <span class="vendor-guest"> {{ otherProduct.quantity }} </span> <span class="vendor-text">Quantité restante</span> </div> <div class="vendor-meta-item vendor-meta-item-bordered"> <span class="rating-star"> <i class="fa fa-star rated"></i> <i class="fa fa-star rated"></i> <i class="fa fa-star rated"></i> <i class="fa fa-star rated"></i> <i class="fa fa-star rate-mute"></i> </span> <span class="rating-count vendor-text">(20)</span> </div> </div> <!-- /.Vendor Content --> </div> <!-- /.Vendor thumbnail --> </div> {% endfor %} #} </div> </div> </div>{% endblock %}{% block javascript %} <script title="zoom img comment"> {% for key,avi in avis %} if ($('.img_comment').length) { console.log("tafiditra...."); $('#id_img_{{key}} .img_comment').magnificPopup({ items: [{% for imgcomment in avi.imageComments.toArray() %}{ src: "{{ asset(constant('App\\Services\\File::IMAGE_COMMENT_DIR') ~ imgcomment.url) }}", title: 'Photo ' + {{ loop.index }} },{% endfor %}], gallery: { enabled: true }, type: 'image' // this is a default type }); } {% endfor %} </script>{% endblock %}