Fix: Show non-bookable infobox also without accessing dates tables

This commit is contained in:
Björn Fromme
2023-06-30 13:07:15 +02:00
parent c8dc15168e
commit a3ea0127c5
2 changed files with 7 additions and 1 deletions
@@ -177,6 +177,7 @@ class ProductController extends ActionController
$isProductWithNoInfoConcept = ($concept !== null) && \in_array($concept->getUid(), $noInfoConceptUids); $isProductWithNoInfoConcept = ($concept !== null) && \in_array($concept->getUid(), $noInfoConceptUids);
$groupInquiryFormConceptUids = GeneralUtility::trimExplode(',', $this->settings['groupInquiryFormConceptUids'], true); $groupInquiryFormConceptUids = GeneralUtility::trimExplode(',', $this->settings['groupInquiryFormConceptUids'], true);
$isProductWithGroupInquiryForm = ($concept !== null) && \in_array($concept->getUid(), $groupInquiryFormConceptUids); $isProductWithGroupInquiryForm = ($concept !== null) && \in_array($concept->getUid(), $groupInquiryFormConceptUids);
$nonBookableInfo = $product->getNonBookableInfo();
// Assemble backlink // Assemble backlink
$backlinkUrl = GeneralUtility::_GET('ref'); $backlinkUrl = GeneralUtility::_GET('ref');
@@ -194,6 +195,7 @@ class ProductController extends ActionController
'dateTo' => $dateTo, 'dateTo' => $dateTo,
'referringUrl' => $backlinkUrl, 'referringUrl' => $backlinkUrl,
'backlinkLabel' => $backLinkLabel, 'backlinkLabel' => $backLinkLabel,
'nonBookableInfo' => $nonBookableInfo,
]); ]);
} }
@@ -246,5 +248,4 @@ class ProductController extends ActionController
$this->view->assign('dateTo', $dateTo); $this->view->assign('dateTo', $dateTo);
$this->view->assign('nonBookableInfo', $nonBookableInfo); $this->view->assign('nonBookableInfo', $nonBookableInfo);
} }
} }
@@ -128,6 +128,11 @@
<div class="mb-4{f:if(condition: settings.hotelOnTop, then: ' hidden')}" <div class="mb-4{f:if(condition: settings.hotelOnTop, then: ' hidden')}"
data-tabs-target="tab" data-tabs-target="tab"
data-tab="dates"> data-tab="dates">
<f:if condition="{hotel.groupsPriceConfigs} && {nonBookableInfo}">
<div class="alert alert-info mb-4" data-rte-content>
{nonBookableInfo.text -> f:format.html()}
</div>
</f:if>
<f:if condition="{isProductWithExcludedConcept}"> <f:if condition="{isProductWithExcludedConcept}">
<f:if condition="{product.region.season} == 'w'"> <f:if condition="{product.region.season} == 'w'">
<div class="bg-ep-primary-light text-white p-4"> <div class="bg-ep-primary-light text-white p-4">