{% extends 'base_portal.html.twig' %}
{% block meta_robot %}
{{ parent() }}
<link rel="canonical" href="{{ url('live_portal_next_sales') }}"/>
{{ source('stubs/seo/robots_noindex_nofollow.html.twig') }}
{% endblock %}
{% block meta_title %}{{ 'seo.live.nextSales.title'|trans({}, "seo") }}{% endblock %}
{% block meta_desc %}{{ 'seo.live.nextSales.desc'|trans({}, "seo") }}{% endblock %}
{% block body_content %}
<div class="live-prochaines-vente">
<div class="landing-header">
<h1 class="titre05">
<span class="block">
{% if app.request.locale == constant('App\\Twig\\Extension\\CountryExtension::LOCALE_PORTUGUESE') %}
<img src="{{ asset('bundles/vpauto/frontend/images/icones/icon-live-pt.webp') }}" alt="">
{% else %}
<img src="{{ asset('bundles/vpauto/frontend/images/icones/icon-live-fr.webp') }}" alt="">
{% endif %}
</span>
{{ 'frontend.live.next-sales.header.subtitle'|trans }}
</h1>
</div>
<div class="landing-content">
<div>
{% for item in todaysLive %}
<div class="block01">
<p class="titre01"><strong>{{ 'frontend.live.next-sales.content.sale_ended'|trans }}</strong>
</p>
<p class="titre03 marginT10"><strong>{{ item.room.code|upper }}
- {{ item.startDate|locale_date(pattern='EEEE d LLLL', locale=app.request.locale)|capitalize }}</strong>
</p>
</div>
<div class="separateur"></div>
{% endfor %}
<div>
<div>
{% for sale in sales %}
{% if loop.first %}
{% set firstDate = sale.startDate %}
{% endif %}
<div class="txtcenter">
<h2 class="titre01">
<strong>{{ sale.room.code|upper }}
- {{ sale.activeVehicles|length }} {{ 'frontend.live.next-sales.content.vehicles'|trans }}</strong>
</h2>
<h2 class="date">{{ sale.startDate|locale_date(pattern='EEEE d LLLL yyyy', locale=app.request.locale) }}</h2>
<div class="block01">
<p class="titre04 opening-in">{{ 'frontend.live.next-sales.content.open_in'|trans }}</p>
<div class="counter must-fade fade-title clearfix"
data-end="{{ get_real_starting_hour(sale)|date('Y/m/d H:i:s') }}">
<ul class="counter-block">
<li class="m-hide"><i class="icon-chrono01"></i></li>
<li>
<span class="number days">00</span>
<span>{{ 'frontend.live.next-sales.content.timer.days'|trans }}</span>
</li>
<li>
<span class="number hours">00</span>
<span>{{ 'frontend.live.next-sales.content.timer.hours'|trans }}</span>
</li>
<li>
<span class="number minutes">00</span>
<span>{{ 'frontend.live.next-sales.content.timer.minutes'|trans }}</span>
</li>
</ul>
</div>
</div>
<div class="marginT30">
{% if sale.noVehicles != true %}
<a href="{{ path('frontend_search_by_sale', {'sale': sale.room.code|lower}) }}"
class="lien09" title="">
<i class="icon-liste"></i> {{ 'frontend.live.next-sales.content.button.list'|trans }}
</a>
{% endif %}
{% if todaysLive is null and firstDate == sale.startDate %}
{% if is_suscribed_to(app.user, sale) %}
<a href="{{ path('live_portal_sale_hours', {'saleId': sale.id}) }}"
class="lien09" title="">
<i class="icon-sinscrire"></i> {{ 'frontend.live.next-sales.content.button.already_registered'|trans }}
</a>
{% else %}
<span data-o="{{ base64_encode(path('vpauto_frontend_live', {'saleId': sale.id})) }}" class="obflink lien09" role="link">
<i class="icon-sinscrire"></i> {{ 'frontend.live.next-sales.content.button.registration'|trans }}
</span>
{% endif %}
{% endif %}
{% if sale.endDate|date('U') > 'now'|date('U') and get_real_starting_hour(sale)|date('U') < 'now'|date('U') %}
<a href="{{ path('live_portal_sale_hours', {'saleId': sale.id}) }}"
class="lien07" title="">
{% if app.request.locale == constant('App\\Twig\\Extension\\CountryExtension::LOCALE_PORTUGUESE') %}
<img
src="{{ asset('bundles/vpauto/frontend/images/icones/icon-live-pt.webp') }}"
class="icon-live w-26" alt="">
{% else %}
<img
src="{{ asset('bundles/vpauto/frontend/images/icones/icon-live-fr.webp') }}"
class="icon-live w-26" alt="">
{% endif %}
{{ 'frontend.live.next-sales.content.button.running'|trans }}
</a>
{% else %}
<a href="{{ path('live_portal_sale_hours', {'saleId': sale.id}) }}"
class="lien09" title="">
<i class="icon-horaires-live"></i> {{ 'frontend.live.next-sales.content.button.hours'|trans }}
</a>
{% endif %}
</div>
</div>
<div class="separateur"></div>
{% endfor %}
</div>
<div>
<div class="txtcenter">
{% if is_suscribed_to(app.user, next_live()) == false %}
<a href="{{ path('live_portal_access') }}" class="lien04" title="">
<i class="icon-asses-seconnecter"></i> {{ 'frontend.live.next-sales.content.button.choose_access'|trans }}
</a>
{% endif %}
<a href="{{ guideUrl }}" target="_blank" class="lien08" title="">
<i class="icon-mode-emploi"></i> {{ 'frontend.live.next-sales.content.button.guide'|trans }}
</a>
</div>
<div class="txtcenter marginT20">
<img src="{{ asset('bundles/vpauto/frontend/images/logo_BNP.jpg') }}" alt="BNP Paribas">
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!--Footer -->
{% include 'frontend/footer.html.twig' %}
<!-- FIN Footer -->
{% endblock %}