brittany-ferries/templates/individual_route.html
2022-09-03 21:38:46 +01:00

58 lines
1.5 KiB
HTML

{% macro headings() %}
<tr>
<th>day</th>
<th>depart</th>
<th>arrive</th>
<th>ship</th>
<th>economy</th>
<th>standard</th>
<th>flexi</th>
<th></th>
</tr>
{% endmacro %}
{% macro route_table(dep, arr, days) %}
<table class="table w-auto">
{{ headings() }}
{% for day in days %}
{% set date = parse_date(day.date) %}
{% for crossing in day.prices %}
{# <tr><td colspan="7">{{ crossing }}</td></tr> #}
<tr>
<td class="text-nowrap text-end">{{ date.strftime("%a, %d %b") }}</td>
<td class="text-nowrap">
{{ crossing.departureDateTime.time }}
</td>
<td class="text-nowrap">
{{ crossing.arrivalDateTime.time }}
</td>
<td class="text-nowrap">
{{ crossing.shipName }}
</td>
<td class="text-nowrap">
<a href="{{ cabins_url(dep, arr, crossing, "ECONOMY") }}">
£{{ crossing.economyPrice.amount }}
</a>
</td>
<td class="text-nowrap">
<a href="{{ cabins_url(dep, arr, crossing, "STANDARD") }}">
£{{ crossing.standardPrice.amount }}
</a>
</td>
<td class="text-nowrap">
<a href="{{ cabins_url(dep, arr, crossing, "FLEXI") }}">
£{{ crossing.flexiPrice.amount }}
</a>
</td>
<td class="text-nowrap">
{% if crossing.full %}full |{% endif %}
{% if crossing.isCabinSpaceFull %}no cabin space |{% endif %}
</td>
</tr>
{% endfor %}
{% endfor %}
</table>
{% endmacro %}