<div class="space-small bg-white"> <div class="container" style="margin: -7em auto -6em;"> <div class="row"> <div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12"> <div class="section-title text-center"> <!-- section title start--> <h1 class="text-center"> <strong>Les Bons plans de dernières minutes </strong> </h1> <p class="sous_titre"> Retrouvez les annonces et les offres de dernières minutes. </p> </div> <!-- /.section title start--> </div> </div> <div class="row"> <!-- venue-categoris-block--> {% set today = date() %} {% set yesterday = date('-1days') %} {% for annonce in annonces %} {% if app.user %} {% if app.user is instanceof('App\\Entity\\Company') %} {% if app.user.abonnements|length > 0 %} {% set lastSubscription = app.user.abonnements|last %} {% if lastSubscription.isActive %} <div class="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12"> <div class="card" style="border-bottom: 5px solid #A066F2; box-shadow: 10px 10px 10px gainsboro;height: 15rem;"> <div class="d-flex"> {% if annonce.users.image is not empty %} <img src={{ asset(constant('App\\Services\\File::IMAGE_CLIENT_DIR') ~ annonce.users.image) }} alt="profil" class="profil_img"> {% else %} <img src={{ asset('images/avatar.jpg') }} alt="profil" class="profil_img"> {% endif %} <div class="ml-3"> <p class="mt-3">{{annonce.users.firstName}}{{annonce.users.lastName}}</p> <p style="margin-top: -1.5em;"> {% if annonce.createdAt|date('d/m/Y') == today|date("d/m/Y") %} <span>Aujourd'hui à {{annonce.createdAt | date('H:i')}}</span> {% elseif annonce.createdAt|date('d/m/Y') == yesterday|date("d/m/Y") %} <span>Hier à {{annonce.createdAt | date('H:i')}}</span> {% else %} <span>{{annonce.createdAt | date('d M Y')}} à {{annonce.createdAt | date('H:i')}}</span> {% endif %} </p> </div> </div> <div class="card-body"> <p class="card-title font-weight-bold"><a href="{{path('client_detail_annonce', {'id': annonce.id})}}">{{filter_service.limite_motsafficher(annonce.titre, 60)}}</a></p> <p class="card-text">{{ filter_service.limite_motsafficher(annonce.description,60) | raw}}</p> </div> </div> </div> {% endif %} {% endif %} {% elseif annonce.users.id == app.user.id %} <div class="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12"> <div class="card" style="border-bottom: 5px solid #A066F2; box-shadow: 10px 10px 10px gainsboro;height: 15rem;"> <div class="d-flex"> {% if annonce.users.image is not empty %} <img src={{ asset(constant('App\\Services\\File::IMAGE_CLIENT_DIR') ~ annonce.users.image) }} alt="profil" class="profil_img"> {% else %} <img src={{ asset('images/avatar.jpg') }} alt="profil" class="profil_img"> {% endif %} <div class="ml-3"> <p class="mt-3">{{annonce.users.firstName}}{{annonce.users.lastName}}</p> <p style="margin-top: -1.5em;"> {% if annonce.createdAt|date('d/m/Y') == today|date("d/m/Y") %} <span>Aujourd'hui à {{annonce.createdAt | date('H:i')}}</span> {% elseif annonce.createdAt|date('d/m/Y') == yesterday|date("d/m/Y") %} <span>Hier à {{annonce.createdAt | date('H:i')}}</span> {% else %} <span>{{annonce.createdAt | date('d M Y')}} à {{annonce.createdAt | date('H:i')}}</span> {% endif %} </p> </div> </div> <div class="card-body"> <p class="card-title font-weight-bold"><a href="{{path('client_detail_annonce', {'id': annonce.id})}}">{{filter_service.limite_motsafficher(annonce.titre, 60)}}</a></p> <p class="card-text">{{ filter_service.limite_motsafficher(annonce.description,60) | raw}}</p> </div> </div> </div> {% endif %} {% endif %} {% endfor %} </div> {% if clients is not empty %} <div class="row"> <div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12"> <div class="text-center mt-5"> <a class="btn btn-default" style="bg-color: #A066F2; border-radius: 22px; font-size: 20px; text-transform: none;" href="{{ path('client_space_annonce_tous') }}"> {% if (clients is not empty) and (clients | length == 1) %} <p class="text-white">Voir l' annonce du client</p> {% else %} <p class="text-white">Voir les ({{clients | length}}) annonce(s) des client(s)</p> {% endif %} </a> </div> </div> </div> {% endif %} </div></div>