{{ form_start(form, {'attr': {'id': 'search_form'}}) }}
{{ form_row(form.depart)}}
{{ form_row(form.arrivee)}}
{{ form_row(form.date)}}
{{ form_end(form) }}
{{ titre }}
{{ app.session.get('nbVisite') }}.
{%do schedules.setPageRange(3)%}{{knp_pagination_render(schedules, 'pagination.html.twig')}}
{% for schedule in schedules %}
{{ schedule.scheduleDate ? schedule.scheduleDate|format_datetime('full', 'none', locale='fr') }}
|
{% set maxMontant = 0 %}
{% set tabTarifs=[] %}
{% set tabTarifName=[] %}
{% for tarif in tarifs %}
{% if ((tarif.depart.id == schedule.depart.id) and (tarif.arrivee.id == schedule.arrivee.id) and (tarif.company == schedule.company) and (tarif.typeTarif == schedule.typeTarif)) %}
{% set tabTarifs = tabTarifs|merge([{ 'name' : tarif.name, 'amount' : tarif.amount }]) %}
{% set tabTarifName=tabTarifName|merge([tarif.name]) %}
{% set maxMontant = max(tarif.amount, maxMontant) %}
{% endif %}
{% endfor %}
{% set buttonDisabled = '' %}
{% set buttonClass = 'btn btn-warning' %}
{% if ((maxMontant == 0) or (schedule.seats<=0)) %}
{% set buttonDisabled = 'disabled' %}
{% set buttonClass = 'btn btn-primary' %}
{% endif %}
|
{{ schedule.departureTime ? schedule.departureTime|date('H:i') : '' }}
|
|
{{ schedule.depart }}
|
{{ maxMontant }}
CFA
(
{% for tarif in tabTarifs %}
{{tarif.name}}:{{tarif.amount}}
{% endfor %})
|
{{ schedule.estimatedArrivalTime ? schedule.estimatedArrivalTime|date('H:i') : '' }}
|
|
{{ schedule.arrivee }}
|
|
{{ schedule.company }}
{% if schedule.company.image is null %}
{% else %}
{% endif %}
|
{% for conf in schedule.bus.conforts %}
{{conf.description}}
{% endfor %}
|
|
{% endfor %}