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

Open in your IDE?
  1. {% if compagny.user.notation.globalNote == 5 %}
        {% set imgNotation = '5etoile.png' %}
    {% elseif compagny.user.notation.globalNote > 4.5 and compagny.user.notation.globalNote < 5 or compagny.user.notation.globalNote == 4.5 %}
        {% set imgNotation = '4_5etoile.png' %}
    {% elseif compagny.user.notation.globalNote > 4 and compagny.user.notation.globalNote < 4.49 or compagny.user.notation.globalNote == 4 %}
        {% set imgNotation = '4etoile.png' %}
    {% elseif compagny.user.notation.globalNote > 3.5 and compagny.user.notation.globalNote < 4 or compagny.user.notation.globalNote == 3.5 %}
        {% set imgNotation = '3_5etoile.png' %}
    {% elseif compagny.user.notation.globalNote > 3 and compagny.user.notation.globalNote < 3.5 or compagny.user.notation.globalNote == 3 %}
        {% set imgNotation = '3etoile.png' %}
    {% elseif compagny.user.notation.globalNote > 2.5 and compagny.user.notation.globalNote < 3 or compagny.user.notation.globalNote == 2.5 %}
        {% set imgNotation = '2_5etoile.png' %}
    {% elseif compagny.user.notation.globalNote > 2 and compagny.user.notation.globalNote < 2.5 or compagny.user.notation.globalNote == 2 %}
        {% set imgNotation = '2etoile.png' %}
    {% elseif compagny.user.notation.globalNote > 1.5 and compagny.user.notation.globalNote < 2 or compagny.user.notation.globalNote == 1.5 %}
        {% set imgNotation = '1_5etoile.png' %}
    {% elseif compagny.user.notation.globalNote > 1 and compagny.user.notation.globalNote < 1.5 or compagny.user.notation.globalNote == 1 %}
        {% set imgNotation = '1etoile.png' %}
    {% elseif compagny.user.notation.globalNote > 0.5 and compagny.user.notation.globalNote < 1 or compagny.user.notation.globalNote == 0.5 %}
        {% set imgNotation = '0_5etoile.png' %}
    {% else %}
        {% set imgNotation = 'aucuneEtoile.png' %}
    {% endif %}
    
    <div class="row justify-content-center mx-0 px-0">
        <div class="card col-12 px-0 py-0">
            {% if compagny.pictureProfilCompagny is not null and compagny.pictureProfilCompagny.pictureProfile is not null %}
                <img class="card-img-top"
                     src="{{ absolute_url(asset('img/profil/professionnal/' ~ compagny.user.id ~ '/' ~ compagny.pictureProfilCompagny.pictureProfile)) }}"
                     alt="{{ compagny.nameCompagny }}" id="imgProfil"/>
            {% else %}
                {% if compagny.user.profilPicture is not null and compagny.user.profilPicture.pictureProfile is not null %}
                    <img class="card-img-top"
                         src="{{ absolute_url(asset('img/profil/professionnal/' ~ compagny.user.id ~ '/' ~ compagny.user.profilPicture.pictureProfile)) }}"
                         alt="{{ compagny.nameCompagny }}" id="imgProfil"/>
                {% else %}
                    <img class="card-img-top"
                         src="{{ absolute_url(asset('img/profil/imgProfilDefault.jpg')) }}"
                         alt="{{ compagny.nameCompagny }}"
                         id="imgProfil"/>
                {% endif %}
            {% endif %}
            <div class="card-body">
                <h5 class="card-title">{{ compagny.nameCompagny }}</h5>
                <img class="img-fluid col-12 my-2 py-1"
                     src="{{ absolute_url(asset('img/profil/' ~ imgNotation)) }}"/>
                <p class="card-text">{{ compagny.adressCompagny }} {{ compagny.postalCodeCompagny }} {{ compagny.cityCompagny }}
                    , {{ compagny.countryCompagny }}</p>
                <p class="card-text"><span
                            class="far fa-envelope"></span> {{ compagny.user.email }}</p>
                <p class="cart-text font-weight-bold">
                    <i class="fas fa-coins mr-1"></i> Prix :</p>
                {% if compagny.firstPrice is not null %}
                    <p class="card-text">
                        &Agrave;
                        partir de {{ compagny.firstPrice }} &euro;</p>
                {% endif %}
            </div>
            {# <div class="card-footer">
                <div class="row mx-0 justify-content-between px-0">
                    <a href="#" class="btn btn-gen-bookpresta mx-1 px-1">Card link</a>
                    <a href="#" class="btn btn-gen-bookpresta mx-1 px-1">Another link</a>
                </div>
            </div>#}
        </div>
    </div>