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