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

Open in your IDE?
  1. {% block prestataireCartes %}
    <div id="prestataireCartes">
        <div class="row justify-content-center mx-0 px-0">
            <div class="col-12 px-0 mx-0">
            
                <div class="row justify-content-center align-items-start js-filter-content mx-0 px-0 my-2 py-2 " id="accordion">
                    {% for compagny in objectUserArray %}
                    {% 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 %}
                    {% if compagny is not null %}
                    <div class="card col-md-4 col-sm-10 col-10 mx-1 px-0 my-2 py-0" id="compagny-{{ compagny.id }}">
                        <a href="{{path('indexProfessionnalPackage',{id: compagny.id})}}">
                            {% if 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 }}">
                            {% elseif compagny.user.profilPicture is defined and compagny.user.profilPicture.pictureProfile is not null %}
                                <img class="img-fluid"
                                     src="{{ absolute_url(asset('img/profil/professionnal/'~ compagny.user.id ~ '/' ~ compagny.user.profilPicture.pictureProfile)) }}"
                                     alt="{{ compagny.nameCompagny }}">
                            {%  else  %}
                                <img class="card-img-top" src="/img/profil/imgProfilDefault.jpg" alt="{{ compagny.nameCompagny }}">
                            {%  endif  %}
                        </a>
    
                        <div class="card-body mx-0 px-0 pb-0">
                            <h5 class="card-title mx-0 px-0">
                                <a href="{{path('indexProfessionnalPackage',{id: compagny.id})}}">{{ compagny.nameCompagny }}</a>
                            </h5>
                            <div class="justify-content-center align-items-center">
                                {% if compagny.user.notation.globalNote %}
                                    <img class="card-note mr-2" src="{{ absolute_url(asset('img/profil/' ~ imgNotation)) }}" alt="{{ compagny.user.notation.globalNote }}"> <span>{{ compagny.user.notation.globalNote }}</span>
                                {%  else  %}
                                    <img class="card-note mr-2" src="../img/profil/3etoile.png" alt="">
                                {% endif %}
                            </div>
                            <p class="card-text">
                                {{ compagny.cityCompagny }}
                            </p>
                            <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 }}">
                                <i class="fas fa-angle-down"></i>
                            </button>
                            <div class="collapse px-2 mx-0" id="description{{ compagny.id }}" aria-labelledby="description{{ compagny.id }}" data-parent="#accordion">
                                {% if compagny.firstPrice is not null %}
                                    <p class="price">Prestation &agrave; partir de</p>
                                    <div class="justify-content-center align-items-center">
                                        <i class="fas fa-coins mx-1"></i><span>{{ compagny.firstPrice }} &euro;</span>
                                    </div>
                                {% else %}
                                    <p class="price">Montant minimum de prestation inconnue</p>
                                {% endif %}
                                <hr>
                                <p class="pb-2">
                                    {{ compagny.descriptionCompagny }}
                                </p>
                                <div class="row mx-0 px-0 justify-content-between">
                                    <a href="{{path('indexProfessionnalPackage',{id: compagny.id})}}" class="col-12 my-2 mx-0 px-0 btn-bookpresta">
                                        En savoir plus
                                    </a>
                                    {# <a href="{{path('viewProfessionnalPresentation',{id: compagny.id})}}" class="col-12 my-2 mx-0 px-0 btn-bookpresta">
                                        En savoir plus
                                    </a>#}
                                </div>
                            </div>
                        </div>
                    </div>
                    {% endif %}
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
    {% endblock %}