WIP Migrate product detail page
This commit is contained in:
@@ -147,15 +147,21 @@ class AjaxTableController extends ActionController
|
||||
'paCode' => $paCode,
|
||||
]);
|
||||
$hasSurchargeOrDiscount = $this->dateService->checkSurcharcheOrDiscount($datesTable);
|
||||
$noInfoConceptUids = GeneralUtility::trimExplode(',', $this->settings['noInfoConceptUids']);
|
||||
$isProductWithNoInfoConcept = ($product->getConcept() !== null) && \in_array($product->getConcept()->getUid(),
|
||||
$noInfoConceptUids, false);
|
||||
|
||||
$this->view->assignMultiple([
|
||||
'dates' => $datesTable,
|
||||
'bookable' => $product->getBookable(),
|
||||
'unavailable' => count($datesTable) === 0,
|
||||
'product' => $product,
|
||||
'hotel' => $hotel,
|
||||
'altProductLink' => $altProductLink,
|
||||
'altLabel' => $altLabel,
|
||||
'hasSurcharge' => $hasSurchargeOrDiscount['surcharge'],
|
||||
'hasDiscount' => $hasSurchargeOrDiscount['discount'],
|
||||
'isProductWithNoInfoConcept' => $isProductWithNoInfoConcept,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -196,13 +202,20 @@ class AjaxTableController extends ActionController
|
||||
$dateEnd = $date ? $date->getDateEnd()->format('d.m.Y') : '';
|
||||
$dateRange = sprintf('%s - %s', $dateStart, $dateEnd);
|
||||
|
||||
$noInfoConceptUids = GeneralUtility::trimExplode(',', $this->settings['noInfoConceptUids']);
|
||||
$isProductWithNoInfoConcept = ($product->getConcept() !== null) && \in_array($product->getConcept()->getUid(),
|
||||
$noInfoConceptUids, false);
|
||||
|
||||
$this->view->assignMultiple([
|
||||
'dateRange' => $dateRange,
|
||||
'product' => $product,
|
||||
'hotel' => $hotel,
|
||||
'servicesIncluded' => $date->getServicesIncluded(),
|
||||
'prices' => $priceTable,
|
||||
'unavailable' => count($priceTable) === 0,
|
||||
'hasSurcharge' => $hasSurchargeOrDiscount['surcharge'],
|
||||
'hasDiscount' => $hasSurchargeOrDiscount['discount'],
|
||||
'isProductWithNoInfoConcept' => $isProductWithNoInfoConcept,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="space-y-2">
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
<div class="headline--3 headline--underlined">
|
||||
@@ -18,7 +18,7 @@
|
||||
<f:render partial="ImageGallery" arguments="{images: city.images, id: 'city-{city.uid}', thumbnails: 1}"/>
|
||||
</f:if>
|
||||
<f:if condition="{city.party}">
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
<div class="headline--3 headline--underlined">
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
</f:if>
|
||||
<f:if condition="{city.leisure}">
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
<div class="headline--3 headline--underlined">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{namespace ep=EP\EpTheme\ViewHelpers}
|
||||
<f:variable name="hotelTitle">{hotel.name -> f:format.raw()}{f:if(condition: hotel.categoryLabel, then: ' ({hotel.categoryLabel -> f:format.raw()})')}</f:variable>
|
||||
<div class="space-y-2">
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
<div class="headline--3 headline--underlined">
|
||||
@@ -54,7 +54,7 @@
|
||||
<f:if condition="{hotel.images -> f:count()} > 0">
|
||||
<f:render partial="ImageGallery" arguments="{images: hotel.images, id: 'hotel-{hotel.uid}', thumbnails: 1}"/>
|
||||
</f:if>
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
<div class="headline--3 headline--underlined">
|
||||
@@ -70,7 +70,7 @@
|
||||
{hotel.features -> f:format.html()}
|
||||
</div>
|
||||
<f:if condition="{hotel.isApartment} || hotel.isHolidayFlat || hotel.isOther">
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{hotel.isApartment}">
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
@@ -115,7 +115,7 @@
|
||||
</div>
|
||||
</f:if>
|
||||
<f:if condition="{hotel.additionalInformation}">
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
<div class="headline--3 headline--underlined">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<h3>
|
||||
Eigenanreise
|
||||
</h3>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{namespace ep=EP\EpTheme\ViewHelpers}
|
||||
<div class="space-y-2">
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
<div class="headline--3 headline--underlined">
|
||||
@@ -20,7 +20,7 @@
|
||||
</h2>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<div class="grid grid-cols-3 gap-4 bg-gray-50 p-2 mb-4">
|
||||
<div class="grid grid-cols-3 gap-4 mb-4">
|
||||
<div class="flex items-center space-x-2"
|
||||
data-cooltipz-dir="top-left" aria-label="Pisten" role="tooltip">
|
||||
<svg class="w-4 h-4 md:w-6 md:h-6">
|
||||
@@ -92,7 +92,7 @@
|
||||
<f:render partial="ImageGallery" arguments="{images: region.images, id: 'region-{region.uid}', thumbnails: 1}"/>
|
||||
</f:if>
|
||||
</f:if>
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
<div class="headline--3 headline--underlined">
|
||||
@@ -113,7 +113,7 @@
|
||||
</f:if>
|
||||
</div>
|
||||
<f:if condition="{region.news}">
|
||||
<div class="even:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<div class="odd:bg-ep-primary-bg p-4" data-rte-content>
|
||||
<f:if condition="{bars}">
|
||||
<f:then>
|
||||
<div class="headline--3 headline--underlined">
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
|
||||
<div class="mb-4" data-controller="pricetable">
|
||||
|
||||
<f:if condition="{isProductWithNoInfoConcept}">
|
||||
<f:else>
|
||||
<f:if condition="{unavailable}">
|
||||
<f:render partial="NotBookable" arguments="{_all}"/>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<table class="w-full mb-4">
|
||||
<thead>
|
||||
<tr class="bg-ep-primary-dark text-white">
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
<div class="mb-4" data-controller="pricetable"
|
||||
data-pricetable-show-all-rows-value="true">
|
||||
|
||||
<f:if condition="{isProductWithNoInfoConcept}">
|
||||
<f:else>
|
||||
<f:if condition="{unavailable}">
|
||||
<f:render partial="NotBookable" arguments="{_all}"/>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<table class="w-full mb-4">
|
||||
<thead>
|
||||
<tr class="bg-ep-primary-dark text-white">
|
||||
|
||||
@@ -70,20 +70,20 @@
|
||||
Termine/Preise
|
||||
</span>
|
||||
</button>
|
||||
<div class="absolute z-20 top-100 left-0 w-full flex flex-col items-start divide-y divide-overlay-white bg-ep-primary-light text-white uppercase shadow hidden"
|
||||
<div class="absolute z-20 top-100 left-0 w-full flex flex-col items-start divide-y divide-overlay-white bg-ep-primary-light text-white shadow hidden"
|
||||
data-tabs-target="pulldown">
|
||||
<f:if condition="{settings.hotelOnTop}">
|
||||
<f:then>
|
||||
<button type="button"
|
||||
data-action="tabs#select"
|
||||
data-tab="hotel"
|
||||
class="w-full text-left p-2 pl-10">
|
||||
class="w-full text-left uppercase p-2 pl-10">
|
||||
Unterkunft
|
||||
</button>
|
||||
<button type="button"
|
||||
data-action="tabs#select"
|
||||
data-tab="dates"
|
||||
class="w-full text-left p-2 pl-10">
|
||||
class="w-full text-left uppercase p-2 pl-10">
|
||||
Termine/Preise
|
||||
</button>
|
||||
</f:then>
|
||||
@@ -91,13 +91,13 @@
|
||||
<button type="button"
|
||||
data-action="tabs#select"
|
||||
data-tab="dates"
|
||||
class="w-full text-left p-2 pl-10">
|
||||
class="w-full text-left uppercase p-2 pl-10">
|
||||
Termine/Preise
|
||||
</button>
|
||||
<button type="button"
|
||||
data-action="tabs#select"
|
||||
data-tab="hotel"
|
||||
class="w-full text-left p-2 pl-10">
|
||||
class="w-full text-left uppercase p-2 pl-10">
|
||||
Unterkunft
|
||||
</button>
|
||||
</f:else>
|
||||
@@ -105,20 +105,20 @@
|
||||
<button type="button"
|
||||
data-action="tabs#select"
|
||||
data-tab="region"
|
||||
class="w-full text-left p-2 pl-10">
|
||||
class="w-full text-left uppercase p-2 pl-10">
|
||||
Gebiet
|
||||
</button>
|
||||
<button type="button"
|
||||
data-action="tabs#select"
|
||||
data-tab="city"
|
||||
class="w-full text-left p-2 pl-10">
|
||||
class="w-full text-left uppercase p-2 pl-10">
|
||||
Ort
|
||||
</button>
|
||||
<f:if condition="{product.journey}">
|
||||
<button type="button"
|
||||
data-action="tabs#select"
|
||||
data-tab="journey"
|
||||
class="w-full text-left p-2 pl-10">
|
||||
class="w-full text-left uppercase p-2 pl-10">
|
||||
Anreise
|
||||
</button>
|
||||
</f:if>
|
||||
@@ -185,29 +185,20 @@
|
||||
<f:render section="DaytripDateSelect" arguments="{_all}"/>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="mb-4 hidden"
|
||||
data-product-details-target="loadingIndicator">
|
||||
<div class="flex items-center space-x-4 bg-ep-secondary text-white text-lg p-4 rounded">
|
||||
<svg class="w-6 h-6">
|
||||
<use href="#icon-spinner"></use>
|
||||
</svg>
|
||||
<span data-product-details-target="loadingMessage">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden" data-product-details-target="datesTableContainer"></div>
|
||||
<div class="hidden" data-product-details-target="priceTableContainer"></div>
|
||||
<f:if condition="{isProductWithNoInfoConcept}">
|
||||
<f:else>
|
||||
<f:if condition="{product.available}">
|
||||
<f:else>
|
||||
<f:render partial="NotBookable" arguments="{_all}"/>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:render partial="Product/Details" arguments="{_all}"/>
|
||||
<div class="p-4 hidden"
|
||||
data-product-details-target="loadingIndicator">
|
||||
<div class="flex items-center space-x-4 bg-ep-secondary text-white text-lg p-4 rounded">
|
||||
<svg class="w-6 h-6">
|
||||
<use href="#icon-spinner"></use>
|
||||
</svg>
|
||||
<span data-product-details-target="loadingMessage">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user