<table class="prices">
<thead>
<tr>
<th><i class="icon-bus"></i><span>{{'result.company' | trans}}</span></th>
<th><i class="icon-departure"></i><span>{{'result.departure' | trans}}</span></th>
<th><i class="icon-arrival"></i><span>{{'result.arrival' | trans}}</span></th>
<th><i class="icon-hourglass"></i><span>{{'result.duration' | trans}}</span></th>
<th><i class="icon-price"></i><span>{{'result.price' | trans}}</span></th>
</tr>
</thead>
<tbody>
{# @var \App\Entity\Price[] prices #}
{# @var \App\Entity\Price p #}
{% for i,p in prices %}
<tr>
{% set carrier = p.carrierName | default(p.companyName) %}
<td class="companyName">
<img src="{{ app_cdn }}{{ path('getimage', { id: p.companyId, type: p.typeName, name: p.carrierName }) }}" alt="{{carrier}}" />
<span>{{ carrier }}</span>
</td>
<td>
{{p.depDatetime | date("d/m - G:i") }} <br />
{{ p.depStop is defined ? p.depStop.name : p.stopNameDep }}
</td>
<td>
{{p.arrDatetime | date("G:i") }} <br />
{{ p.arrStop is defined ? p.arrStop.name : p.stopNameArr }}
</td>
<td class="duration">{{ p.duration | cb_niceduration }}</td>
<td class="cents">
<a rel="nofollow"
class="redirect primary small"
target="_blank"
href="{{ path('redirectA', {
'companyId': p.companyId,
'depStopExt': p.stopExtDep,
'depStopId': p.depStop.id,
'arrStopExt': p.stopExtArr,
'arrStopId': p.arrStop.id,
'dateFrom': p.depDatetime | date("Y-m-d"),
'link': p.link,
'cents': p.cents,
'currency': p.currency,
}) }}">
{{ p.cents | cb_niceprice(p.currency) }}
<i class="icon-arrow-right"></i>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>