templates/clientWeb/listProfessionnal/_profil_compagny.html.twig line 1

Open in your IDE?
  1. {% if compagny.user.notation.globalNote == 5 %}
  2.     {% set imgNotation = '5etoile.png' %}
  3. {% elseif compagny.user.notation.globalNote > 4.5 and compagny.user.notation.globalNote < 5 or compagny.user.notation.globalNote == 4.5 %}
  4.     {% set imgNotation = '4_5etoile.png' %}
  5. {% elseif compagny.user.notation.globalNote > 4 and compagny.user.notation.globalNote < 4.49 or compagny.user.notation.globalNote == 4 %}
  6.     {% set imgNotation = '4etoile.png' %}
  7. {% elseif compagny.user.notation.globalNote > 3.5 and compagny.user.notation.globalNote < 4 or compagny.user.notation.globalNote == 3.5 %}
  8.     {% set imgNotation = '3_5etoile.png' %}
  9. {% elseif compagny.user.notation.globalNote > 3 and compagny.user.notation.globalNote < 3.5 or compagny.user.notation.globalNote == 3 %}
  10.     {% set imgNotation = '3etoile.png' %}
  11. {% elseif compagny.user.notation.globalNote > 2.5 and compagny.user.notation.globalNote < 3 or compagny.user.notation.globalNote == 2.5 %}
  12.     {% set imgNotation = '2_5etoile.png' %}
  13. {% elseif compagny.user.notation.globalNote > 2 and compagny.user.notation.globalNote < 2.5 or compagny.user.notation.globalNote == 2 %}
  14.     {% set imgNotation = '2etoile.png' %}
  15. {% elseif compagny.user.notation.globalNote > 1.5 and compagny.user.notation.globalNote < 2 or compagny.user.notation.globalNote == 1.5 %}
  16.     {% set imgNotation = '1_5etoile.png' %}
  17. {% elseif compagny.user.notation.globalNote > 1 and compagny.user.notation.globalNote < 1.5 or compagny.user.notation.globalNote == 1 %}
  18.     {% set imgNotation = '1etoile.png' %}
  19. {% elseif compagny.user.notation.globalNote > 0.5 and compagny.user.notation.globalNote < 1 or compagny.user.notation.globalNote == 0.5 %}
  20.     {% set imgNotation = '0_5etoile.png' %}
  21. {% else %}
  22.     {% set imgNotation = 'aucuneEtoile.png' %}
  23. {% endif %}
  24. <div class="row justify-content-center mx-0 px-0">
  25.     <div class="card col-12 px-0 py-0">
  26.         {% if compagny.pictureProfilCompagny is not null and compagny.pictureProfilCompagny.pictureProfile is not null %}
  27.             <img class="card-img-top"
  28.                  src="{{ absolute_url(asset('img/profil/professionnal/' ~ compagny.user.id ~ '/' ~ compagny.pictureProfilCompagny.pictureProfile)) }}"
  29.                  alt="{{ compagny.nameCompagny }}" id="imgProfil"/>
  30.         {% else %}
  31.             {% if compagny.user.profilPicture is not null and compagny.user.profilPicture.pictureProfile is not null %}
  32.                 <img class="card-img-top"
  33.                      src="{{ absolute_url(asset('img/profil/professionnal/' ~ compagny.user.id ~ '/' ~ compagny.user.profilPicture.pictureProfile)) }}"
  34.                      alt="{{ compagny.nameCompagny }}" id="imgProfil"/>
  35.             {% else %}
  36.                 <img class="card-img-top"
  37.                      src="{{ absolute_url(asset('img/profil/imgProfilDefault.jpg')) }}"
  38.                      alt="{{ compagny.nameCompagny }}"
  39.                      id="imgProfil"/>
  40.             {% endif %}
  41.         {% endif %}
  42.         <div class="card-body">
  43.             <h5 class="card-title">{{ compagny.nameCompagny }}</h5>
  44.             <img class="img-fluid col-12 my-2 py-1"
  45.                  src="{{ absolute_url(asset('img/profil/' ~ imgNotation)) }}"/>
  46.             <p class="card-text">{{ compagny.adressCompagny }} {{ compagny.postalCodeCompagny }} {{ compagny.cityCompagny }}
  47.                 , {{ compagny.countryCompagny }}</p>
  48.             <p class="card-text"><span
  49.                         class="far fa-envelope"></span> {{ compagny.user.email }}</p>
  50.             <p class="cart-text font-weight-bold">
  51.                 <i class="fas fa-coins mr-1"></i> Prix :</p>
  52.             {% if compagny.firstPrice is not null %}
  53.                 <p class="card-text">
  54.                     &Agrave;
  55.                     partir de {{ compagny.firstPrice }} &euro;</p>
  56.             {% endif %}
  57.         </div>
  58.         {# <div class="card-footer">
  59.             <div class="row mx-0 justify-content-between px-0">
  60.                 <a href="#" class="btn btn-gen-bookpresta mx-1 px-1">Card link</a>
  61.                 <a href="#" class="btn btn-gen-bookpresta mx-1 px-1">Another link</a>
  62.             </div>
  63.         </div>#}
  64.     </div>
  65. </div>