templates/clientWeb/professionnalSearch/prestataireCartes.html.twig line 1

Open in your IDE?
  1. {% block prestataireCartes %}
  2. <div id="prestataireCartes">
  3.     <div class="row justify-content-center mx-0 px-0">
  4.         <div class="col-12 px-0 mx-0">
  5.         
  6.             <div class="row justify-content-center align-items-start js-filter-content mx-0 px-0 my-2 py-2 " id="accordion">
  7.                 {% for compagny in objectUserArray %}
  8.                 {% if compagny.user.notation.globalNote == 5 %}
  9.                 {% set imgNotation = '5etoile.png' %}
  10.                 {% elseif compagny.user.notation.globalNote > 4.5 and compagny.user.notation.globalNote < 5 or compagny.user.notation.globalNote == 4.5 %}
  11.                 {% set imgNotation = '4_5etoile.png' %}
  12.                 {% elseif compagny.user.notation.globalNote > 4 and compagny.user.notation.globalNote < 4.49 or compagny.user.notation.globalNote == 4 %}
  13.                 {% set imgNotation = '4etoile.png' %}
  14.                 {% elseif compagny.user.notation.globalNote > 3.5 and compagny.user.notation.globalNote < 4 or compagny.user.notation.globalNote == 3.5 %}
  15.                 {% set imgNotation = '3_5etoile.png' %}
  16.                 {% elseif compagny.user.notation.globalNote > 3 and compagny.user.notation.globalNote < 3.5 or compagny.user.notation.globalNote == 3 %}
  17.                 {% set imgNotation = '3etoile.png' %}
  18.                 {% elseif compagny.user.notation.globalNote > 2.5 and compagny.user.notation.globalNote < 3 or compagny.user.notation.globalNote == 2.5 %}
  19.                 {% set imgNotation = '2_5etoile.png' %}
  20.                 {% elseif compagny.user.notation.globalNote > 2 and compagny.user.notation.globalNote < 2.5 or compagny.user.notation.globalNote == 2 %}
  21.                 {% set imgNotation = '2etoile.png' %}
  22.                 {% elseif compagny.user.notation.globalNote > 1.5 and compagny.user.notation.globalNote < 2 or compagny.user.notation.globalNote == 1.5 %}
  23.                 {% set imgNotation = '1_5etoile.png' %}
  24.                 {% elseif compagny.user.notation.globalNote > 1 and compagny.user.notation.globalNote < 1.5 or compagny.user.notation.globalNote == 1 %}
  25.                 {% set imgNotation = '1etoile.png' %}
  26.                 {% elseif compagny.user.notation.globalNote > 0.5 and compagny.user.notation.globalNote < 1 or compagny.user.notation.globalNote == 0.5 %}
  27.                 {% set imgNotation = '0_5etoile.png' %}
  28.                 {% else %}
  29.                 {% set imgNotation = 'aucuneEtoile.png' %}
  30.                 {% endif %}
  31.                 {% if compagny is not null %}
  32.                 <div class="card col-md-4 col-sm-10 col-10 mx-1 px-0 my-2 py-0" id="compagny-{{ compagny.id }}">
  33.                     <a href="{{path('indexProfessionnalPackage',{id: compagny.id})}}">
  34.                         {% if compagny.pictureProfilCompagny.pictureProfile is not null %}
  35.                             <img class="card-img-top" src="{{ absolute_url(asset('img/profil/professionnal/'~ compagny.user.id ~ '/' ~ compagny.pictureProfilCompagny.pictureProfile))}}" alt="{{ compagny.nameCompagny }}">
  36.                         {% elseif compagny.user.profilPicture is defined and compagny.user.profilPicture.pictureProfile is not null %}
  37.                             <img class="img-fluid"
  38.                                  src="{{ absolute_url(asset('img/profil/professionnal/'~ compagny.user.id ~ '/' ~ compagny.user.profilPicture.pictureProfile)) }}"
  39.                                  alt="{{ compagny.nameCompagny }}">
  40.                         {%  else  %}
  41.                             <img class="card-img-top" src="/img/profil/imgProfilDefault.jpg" alt="{{ compagny.nameCompagny }}">
  42.                         {%  endif  %}
  43.                     </a>
  44.                     <div class="card-body mx-0 px-0 pb-0">
  45.                         <h5 class="card-title mx-0 px-0">
  46.                             <a href="{{path('indexProfessionnalPackage',{id: compagny.id})}}">{{ compagny.nameCompagny }}</a>
  47.                         </h5>
  48.                         <div class="justify-content-center align-items-center">
  49.                             {% if compagny.user.notation.globalNote %}
  50.                                 <img class="card-note mr-2" src="{{ absolute_url(asset('img/profil/' ~ imgNotation)) }}" alt="{{ compagny.user.notation.globalNote }}"> <span>{{ compagny.user.notation.globalNote }}</span>
  51.                             {%  else  %}
  52.                                 <img class="card-note mr-2" src="../img/profil/3etoile.png" alt="">
  53.                             {% endif %}
  54.                         </div>
  55.                         <p class="card-text">
  56.                             {{ compagny.cityCompagny }}
  57.                         </p>
  58.                         <button class="btn btn-bookpresta col-12 mx-0 px-0 mt-2 mt-0" type="button" data-toggle="collapse" data-target="#description{{ compagny.id }}" aria-expanded="false" aria-controls="description{{ compagny.id }}">
  59.                             <i class="fas fa-angle-down"></i>
  60.                         </button>
  61.                         <div class="collapse px-2 mx-0" id="description{{ compagny.id }}" aria-labelledby="description{{ compagny.id }}" data-parent="#accordion">
  62.                             {% if compagny.firstPrice is not null %}
  63.                                 <p class="price">Prestation &agrave; partir de</p>
  64.                                 <div class="justify-content-center align-items-center">
  65.                                     <i class="fas fa-coins mx-1"></i><span>{{ compagny.firstPrice }} &euro;</span>
  66.                                 </div>
  67.                             {% else %}
  68.                                 <p class="price">Montant minimum de prestation inconnue</p>
  69.                             {% endif %}
  70.                             <hr>
  71.                             <p class="pb-2">
  72.                                 {{ compagny.descriptionCompagny }}
  73.                             </p>
  74.                             <div class="row mx-0 px-0 justify-content-between">
  75.                                 <a href="{{path('indexProfessionnalPackage',{id: compagny.id})}}" class="col-12 my-2 mx-0 px-0 btn-bookpresta">
  76.                                     En savoir plus
  77.                                 </a>
  78.                                 {# <a href="{{path('viewProfessionnalPresentation',{id: compagny.id})}}" class="col-12 my-2 mx-0 px-0 btn-bookpresta">
  79.                                     En savoir plus
  80.                                 </a>#}
  81.                             </div>
  82.                         </div>
  83.                     </div>
  84.                 </div>
  85.                 {% endif %}
  86.                 {% endfor %}
  87.             </div>
  88.         </div>
  89.     </div>
  90. </div>
  91. {% endblock %}