templates/front/company/list.html.twig line 1

Open in your IDE?
  1. {% extends 'base_front.html.twig' %}
  2. {% block meta %}
  3.     <title>Les prestataires disponibles</title>
  4.     <meta name="description" content="Liste des prestataires disponibles pour votre mariage. Recherchez par département et par type de service">
  5. {% endblock %}
  6. {% block body %}
  7.     <div class="page-header" style="height: 100%;background: url({{ asset('images/background_presta_hobbiinn.jpg') }}) no-repeat center;background-size: cover">
  8.         <div class="container">
  9.             <div
  10.                 class="row">
  11.                 <!-- page caption -->
  12.                 <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 ">
  13.                     <div class="page-caption">
  14.                         <h1 class="page-title shadow">Prestataires</h1>
  15.                     </div>
  16.                 </div>
  17.                 <!-- /.page caption -->
  18.             </div>
  19.         </div>
  20.         <!-- page caption -->
  21.         <div class="page-breadcrumb">
  22.             <div class="container">
  23.                 <div class="row">
  24.                     <nav aria-label="breadcrumb">
  25.                         <ol class="breadcrumb">
  26.                             <li class="breadcrumb-item">
  27.                                 <a href="{{ path('front_home') }}" class="breadcrumb-link">Accueil</a>
  28.                             </li>
  29.                             <li class="breadcrumb-item active text-white" aria-current="page">Tous les prestataires ({{ countCompanies }}
  30.                                 {% if countCompanies > 1 %}prestataires trouvés{% else %}prestataire trouvé
  31.                                 {% endif %})</li>
  32.                         </ol>
  33.                     </nav>
  34.                 </div>
  35.             </div>
  36.         </div>
  37.         <!-- page breadcrumb -->
  38.     </div>
  39.     <!-- /.page-header -->
  40.     <!-- filter-form -->
  41.     <div class="filter-form">
  42.         <div class="container">
  43.             <div class="row">
  44.                 <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
  45.                     <form
  46.                         class="form-row" method="post" action="{{ path('front_company_search') }}" style="justify-content:center">
  47.                         <!-- venue-type -->
  48.                         <div class="col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12">
  49.                             <select class="form-control select2" style="width:100%;padding:5px 14px;height:50px!important" name="department_filter">
  50.                                 <option value="">Département</option>
  51.                                 {% for department in filter_service.getDepartments %}
  52.                                     <option value="{{ department.id }}" {% if app.session.get('department') == department.id %} selected {% endif %}>{{ department.numero }}
  53.                                         -
  54.                                         {{ department.name }}</option>
  55.                                 {% endfor %}
  56.                             </select>
  57.                         </div>
  58.                         <!-- /.venue-type -->
  59.                         <!-- distance km -->
  60.                         <div class="col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12">
  61.                             <select class="wide" name="category_filter">
  62.                                 <option value="">Type de prestation</option>
  63.                                 {% for subCategory in filter_service.getSubcategories %}
  64.                                     <option value="{{ subCategory.id }}" {% if app.session.get('department') == subCategory.id %} selected {% endif %}>{{ subCategory.name }}</option>
  65.                                 {% endfor %}
  66.                             </select>
  67.                         </div>
  68.                         <div
  69.                             class="col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12">
  70.                             <!-- select -->
  71.                             <div class="form-group">
  72.                                 <input id="user_weddingDate" name="date_filter" autocomplete="off" type="text" placeholder="Date souhaitée" class="form-control input-md" value="{{ app.session.get('date_evt') }}" required>
  73.                                 <div class="venue-form-calendar">
  74.                                     <i class="far fa-calendar-alt"></i>
  75.                                 </div>
  76.                             </div>
  77.                         </div>
  78.                         <!-- /.price -->
  79.                         <div class="col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12 ">
  80.                             <button class="btn  btn-block" type="submit" style="background:#0de8c7 " >Rechercher</button>
  81.                         </div>
  82.                     </form>
  83.                 </div>
  84.             </div>
  85.         </div>
  86.     </div>
  87.     <!-- /.filter-form -->
  88.     <div class="content">
  89.         <div class="container">
  90.             <h1 class="d-none">My new carte</h1>
  91.             <div class="row containre-all-company">
  92.                 {% for company in companies %}
  93.                     {% set mananaProdActive = filter_service.getOtherProductsCompany(company) %}
  94.                     {# {% if mananaProdActive %} #}
  95.                         {# {% for produite in company.products %}
  96.                             {% if produite.isActivated %} #}
  97.                                 <div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
  98.                                     <div class="container-block-companies">
  99.                                         <div class="container-slide-image">
  100.                                             {% if company.products is not empty %}
  101.                                                 {% for product in filter_service.getOtherProductsCompany(company) %}
  102.                                                     {% if product.photos is not empty %}
  103.                                                         <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR')) ~ product.photos.first.url }}" alt="{{ product.name }}" class="img-fluid" style="height: 213px;object-fit: cover; border-radius: .5rem .5rem 0 0;">
  104.                                                     {% else %}
  105.                                                         <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;">
  106.                                                     {% endif %}
  107.                                                 {% endfor %}
  108.                                             {% else %}
  109.                                                 <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;">
  110.                                             {% endif %}
  111.                                         </div>
  112.                                         <div class="container-info-presta">
  113.                                             <h2 class="vendor-title">
  114.                                                 <a href="{{ path('front_company_single', {'companySlug': company.companySlug, 'id': company.id}) }}" class="title">{{ company.companyName }}</a>
  115.                                             </h2>
  116.                                             <p>
  117.                                                 <strong>{{ company.products|length }}</strong>
  118.                                                 Service{% if company.products|length > 1 %}s
  119.                                                 {% endif %}
  120.                                             </p>
  121.                                             <p class="vendor-address">
  122.                                                 {% if company.category is not empty %}
  123.                                                     {% for category in company.category %}
  124.                                                         <span class="mr-2">{{ category.name }}
  125.                                                             {% if not loop.last %},
  126.                                                             {% endif %}
  127.                                                         </span>
  128.                                                     {% endfor %}
  129.                                                 {% endif %}
  130.                                             </p>
  131.                                             <p class="vendor-address">{{ company.city }}</p>
  132.                                             <i class="fa fa-star rated"></i>
  133.                                             <strong>
  134.                                                 4,9</strong>
  135.                                             Avis
  136.                                         </div>
  137.                                         <a href="{{ path('front_company_single', {'companySlug': company.companySlug, 'id': company.id}) }}" class="title">
  138.                                             <button class="btn btnVoirP" >Voir plus</button>
  139.                                         </a>
  140.                                         <div class="wishlist-sign">
  141.                                             <a href="#" class="btn-wishlist">
  142.                                                 <i class="fa fa-heart"></i>
  143.                                             </a>
  144.                                         </div>
  145.                                     </div>
  146.                                 </div>
  147.                             {# {% endif %}
  148.                         {% endfor %} #}
  149.                     {# {% endif %} #}
  150.                 {% endfor %}
  151.             </div>
  152.             {# <div class="row d-none">
  153.                 {% for company in companies %}
  154.                     <div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
  155.                         <div class="vendor-thumbnail">
  156.                             <!-- Vendor thumbnail -->
  157.                             <!-- Vendor img -->
  158.                                 <div class="row ml-0" style="width:100%"> {% for product in filter_service.getOtherProductsCompany(company) %}
  159.                                     <div class="vendor-img zoomimg" style="width:33%;{% if not loop.index %}border-left:2px solid white{% endif %}">
  160.                                         <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}) }}">
  161.                                             {% if product.photos is not empty %}<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR')) ~ product.photos.first.url }}" alt="{{ product.name }}" class="img-fluid" style="height: 113px;object-fit: cover;">
  162.                                             {% endif %}
  163.                                         </a>
  164.                                     </div>
  165.                                 {% endfor %}
  166.                             </div>
  167.                             <!-- /.Vendor img -->
  168.                             <div
  169.                                 class="vendor-content">
  170.                                 <!-- Vendor Content -->
  171.                                 <h2 class="vendor-title">
  172.                                     <a href="{{ path('front_company_single', {'companySlug': company.companySlug, 'id': company.id}) }}" class="title">{{ company.companyName }}</a>
  173.                                 </h2>
  174.                                 <p class="vendor-address">
  175.                                     {% if company.category is not empty %}
  176.                                         {% for category in company.category %}
  177.                                             <span class="mr-2">{{ category.name }}
  178.                                                 {% if not loop.last %},
  179.                                                 {% endif %}
  180.                                             </span>
  181.                                         {% endfor %}
  182.                                     {% endif %}
  183.                                 </p>
  184.                                 <p class="vendor-address">{{ company.city }}</p>
  185.                             </div>
  186.                             <div class="vendor-meta">
  187.                                 <div class="vendor-meta-item vendor-meta-item-bordered">
  188.                                     <span class="vendor-price">
  189.                                         {{ company.products|length }}
  190.                                     </span>
  191.                                     <span class="vendor-text">Service
  192.                                         {% if company.products|length > 1 %}s
  193.                                         {% endif %}
  194.                                     </span>
  195.                                 </div>
  196.                                 <div class="vendor-meta-item vendor-meta-item-bordered">
  197.                                     <span class="vendor-guest"></span>
  198.                                     <span class="vendor-text"></span>
  199.                                 </div>
  200.                                 <div class="vendor-meta-item vendor-meta-item-bordered">
  201.                                     <span class="rating-star">
  202.                                         <i class="fa fa-star rated"></i>
  203.                                         <i class="fa fa-star rated"></i>
  204.                                         <i class="fa fa-star rated"></i>
  205.                                         <i class="fa fa-star rated"></i>
  206.                                         <i class="fa fa-star rate-mute"></i>
  207.                                     </span>
  208.                                     <span class="rating-count vendor-text">(20)</span>
  209.                                 </div>
  210.                             </div>
  211.                             <!-- /.Vendor Content -->
  212.                         </div>
  213.                         <!-- /.Vendor thumbnail -->
  214.                     </div>
  215.                 {% endfor %}
  216.             </div> #}
  217.             <div class="pagination mt-5">
  218.                 <nav aria-label="Page navigation example">
  219.                     {{ knp_pagination_render(companies) }}
  220.                 </nav>
  221.             </div>
  222.         </div>
  223.     </div>
  224. {% endblock %}