feat: keep travel info visible event without date

This commit is contained in:
Björn Fromme
2024-12-04 12:19:48 +01:00
parent fd73cd412c
commit f473d7df33
2 changed files with 43 additions and 46 deletions
@@ -61,16 +61,7 @@ class TravelinfoController extends ActionController
/** @var Date $date */
$date = $this->dateRepository->findForProductAndDate($product, $travelDate)->getFirst();
if (null === $date) {
$response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
$GLOBALS['TYPO3_REQUEST'],
'Reiseinformationen nicht gefunden'
);
throw new ImmediateResponseException($response, 1731071856);
}
$hasCourses = 0 < count($date->getServicesGeneral('KUR'));
$hasCourses = null !== $date && 0 < count($date->getServicesGeneral('KUR'));
$this->view->assign('travelinfo', $travelinfo);
$this->view->assign('date', $date);
@@ -44,9 +44,11 @@
{travelinfo.headline}
</h1>
{travelinfo.introText -> f:format.html()}
<f:if condition="{date}">
<p>
{date.product.name} {date.dateStart -> f:format.date(format: 'd.m.Y')} - {date.dateEnd -> f:format.date(format: 'd.m.Y')}
</p>
</f:if>
</div>
</div>
<div class="container -mt-24 mb-16">
@@ -60,6 +62,7 @@
</div>
</div>
<div class="lg:w-3/4 pt-8 lg:pt-0 lg:px-8 text-white" data-rte-content>
<f:if condition="{date}">
<f:if condition="{travelinfo.hideAddress}">
<f:else>
<h3 class="text-white">
@@ -94,6 +97,7 @@
</f:else>
</f:if>
</f:if>
</f:if>
<f:if condition="{travelinfo.selfArrangedText}">
<h3 class="text-white">
Eigenanreise
@@ -196,11 +200,13 @@
<h2 class="headline--primary">
{teaser.title}
</h2>
<f:if condition="{date}">
<f:if condition="{teaser.category} == food">
<p>
{date.board}
</p>
</f:if>
</f:if>
{teaser.bodytext -> f:format.html()}
</div>
<div class="absolute left-0 bottom-0 w-full bg-gradient-to-b from-transparent via-white via-20% to-white pt-2 md:pt-0">