feat: render pickups as table, add print button to travel info page

This commit is contained in:
Björn Fromme
2024-11-08 10:15:07 +01:00
parent ff80786ae6
commit d2554fadee
2 changed files with 30 additions and 11 deletions
@@ -1,5 +1,6 @@
<html data-namespace-typo3-fluid="true" lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<div class="container bg-white flex items-center justify-between">
@@ -10,12 +11,11 @@
class="block w-auto {ep:themeClasses(classes: '{ep: \'h-10 lg:h-12\', sbw: \'h-14 lg:h-24\', snz: \'h-14 lg:h-24\', suz: \'h-14 lg:h-24\', uch: \'h-12 lg:h-20\', ser: \'h-10 lg:h-12\'}', key: settings.themekey)}"
alt="{settings.defaultTitle}"/>
</f:link.typolink>
<f:link.typolink parameter="{settings.myEpPageUid}"
title="My E&P"
class="block px-4 py-3 lg:px-8 lg:py-4 bg-badge-gradient text-white uppercase text-center">
<div class="text-xl lg:text-2xl font-light leading-none">Login</div>
<div class="text-lg lg:text-xl font-medium leading-none">My E&P</div>
</f:link.typolink>
<a href="javascript:window.print()" title="Drucken" class="block px-4 py-3 lg:px-8 lg:py-4 bg-badge-gradient text-white">
<svg fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="w-8 h-8">
<path stroke-linecap="round" stroke-linejoin="round" d="M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0 1 10.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0 .229 2.523a1.125 1.125 0 0 1-1.12 1.227H7.231c-.662 0-1.18-.568-1.12-1.227L6.34 18m11.318 0h1.091A2.25 2.25 0 0 0 21 15.75V9.456c0-1.081-.768-2.015-1.837-2.175a48.055 48.055 0 0 0-1.913-.247M6.34 18H5.25A2.25 2.25 0 0 1 3 15.75V9.456c0-1.081.768-2.015 1.837-2.175a48.041 48.041 0 0 1 1.913-.247m10.5 0a48.536 48.536 0 0 0-10.5 0m10.5 0V3.375c0-.621-.504-1.125-1.125-1.125h-8.25c-.621 0-1.125.504-1.125 1.125v3.659M18 10.5h.008v.008H18V10.5Zm-3 0h.008v.008H15V10.5Z"></path>
</svg>
</a>
</div>
<f:render section="Content"/>
<f:render partial="Footer" arguments="{_all}"/>
@@ -69,13 +69,32 @@
<h3 class="text-white">
Bus-Zustiege
</h3>
<ul>
<table class="w-full mb-4 bg-zinc-200 text-zinc-800 text-xs md:text-base">
<tr>
<th class="border-r border-white/50 px-2 py-1 md:p-2 text-left text-sm md:text-base">
Zustieg
</th>
<th class="border-r border-white/50 px-2 py-1 md:p-2 text-sm md:text-base">
Datum
</th>
<th class="border-r border-white/50 px-2 py-1 md:p-2 text-sm md:text-base">
Uhrzeit
</th>
</tr>
<f:for each="{travelinfo.traveldate.pickups}" as="pickup">
<li>
{pickup.city} ({pickup.street}): {pickup.date}, {pickup.time} Uhr
</li>
<tr class="odd:bg-zinc-50 align-top">
<td class="border-r border-zinc-200 px-2 py-1 md:p-2">
{pickup.city}<br><span class="text-xs">{pickup.street}</span>
</td>
<td class="border-r border-zinc-200 px-2 py-1 md:p-2">
{pickup.date}
</td>
<td class="border-r border-zinc-200 px-2 py-1 md:p-2">
{pickup.time} Uhr
</td>
</tr>
</f:for>
</ul>
</table>
</f:if>
<f:if condition="{travelinfo.selfArrangedText}">
<h3 class="text-white">