From 993d966824e2662928d7b77a149f389ea1208f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 23 Aug 2022 08:36:02 +0200 Subject: [PATCH 01/13] Enable filtering of region and city records by pid --- .../Classes/Controller/CityController.php | 3 +- .../Classes/Controller/RegionController.php | 3 +- .../Domain/Repository/CityRepository.php | 13 ++-- .../Domain/Repository/RegionRepository.php | 13 ++-- .../TypoScript/constants.typoscript | 64 +++++++++++-------- .../Configuration/TypoScript/setup.typoscript | 2 + 6 files changed, 54 insertions(+), 44 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php b/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php index 79087863..37d64929 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php @@ -85,7 +85,8 @@ class CityController extends ActionController { $regionUid = $this->settings['regionUid']; $season = $this->settings['season']; - $cities = $this->cityRepository->getTeasersByRegionAndSeason($regionUid, $season); + $citiesPid = $this->settings['citiesPid']; + $cities = $this->cityRepository->getTeasersByRegionAndSeason($regionUid, $season, $citiesPid); $data = $this->configurationManager->getContentObject()->data; $this->view->assign('data', $data); $this->view->assign('teasers', $cities); diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php b/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php index 434767dc..f32f9b8b 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php @@ -85,7 +85,8 @@ class RegionController extends ActionController { $countryUid = $this->settings['countryUid']; $season = $this->settings['season']; - $regions = $this->regionRepository->getTeasersByCountryAndSeason($countryUid, $season); + $regionsPid = $this->settings['regionsStoragePid']; + $regions = $this->regionRepository->getTeasersByCountryAndSeason($countryUid, $season, $regionsPid); $data = $this->configurationManager->getContentObject()->data; $this->view->assign('data', $data); $this->view->assign('teasers', $regions); diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php index b285bce6..e768b837 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php @@ -31,14 +31,7 @@ use EP\EpProducts\Domain\Model\AbstractDestination; class CityRepository extends AbstractRepository { - - /** - * @param int $regionUid - * @param string $season - * - * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface - */ - public function getTeasersByRegionAndSeason($regionUid, $season = 'w') + public function getTeasersByRegionAndSeason(int $regionUid, string $season = 'w', int $storagePid = 0) { if ($season === null) { $season = AbstractDestination::SEASON_WINTER; @@ -49,6 +42,10 @@ class CityRepository extends AbstractRepository $query->equals('season', $season), $query->equals('excludeFromTeasergroups', 0) ]; + if (0 < $storagePid) { + $constraints[] = $query->equals('pid', $storagePid); + } + return $query ->matching($query->logicalAnd($constraints)) ->execute() diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/RegionRepository.php b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/RegionRepository.php index a29d8456..5f3baa6c 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/RegionRepository.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/RegionRepository.php @@ -31,13 +31,7 @@ use EP\EpProducts\Domain\Model\AbstractDestination; class RegionRepository extends AbstractRepository { - - /** - * @param int $countryUid - * @param string $season - * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface - */ - public function getTeasersByCountryAndSeason($countryUid, $season = 'w') + public function getTeasersByCountryAndSeason(int $countryUid, string $season = 'w', int $storagePid = 0) { if ($season === null) { $season = AbstractDestination::SEASON_WINTER; @@ -48,6 +42,11 @@ class RegionRepository extends AbstractRepository $query->equals('season', $season), $query->equals('excludeFromTeasergroups', 0) ]; + + if (0 < $storagePid) { + $constraints[] = $query->equals('pid', $storagePid); + } + return $query ->matching($query->logicalAnd($constraints)) ->execute() diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript index 0840078d..3c472230 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript +++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript @@ -1,48 +1,58 @@ +# customsubcategory=100=Storage +# customsubcategory=110=Pages +# customsubcategory=120=Search/Filtering +# customsubcategory=130=Email +# customsubcategory=140=Misc + plugin.tx_epproducts { settings { - # cat=plugin.tx_epproducts//a; type=string; label=Products storage PID + # cat=epproducts/100/100; type=string; label=Products storage PID productsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Hotels storage PID + # cat=epproducts/100/110; type=string; label=Hotels storage PID hotelsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Concepts storage PID + # cat=epproducts/100/120; type=string; label=Concepts storage PID conceptsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Facts storage PID + # cat=epproducts/100/130; type=string; label=Facts storage PID factsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Faqs storage PID + # cat=epproducts/100/140; type=string; label=Faqs storage PID faqsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Destinations storage PID + # cat=epproducts/100/150; type=string; label=Destinations storage PID destinationsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Teammember storage PID + # cat=epproducts/100/160; type=string; label=Regions storage PID + regionsStoragePid = + # cat=epproducts/100/160; type=string; label=Cities storage PID + citiesStoragePid = + # cat=epproducts/100/170; type=string; label=Teammember storage PID teammemberStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Officetip storage PID + # cat=epproducts/100/180; type=string; label=Officetip storage PID officetipStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Snow report storage PID + # cat=epproducts/100/190; type=string; label=Snow report storage PID snowReportStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Default search page UID + # cat=epproducts/110/100; type=string; label=Default search page UID defaultSearchPageUid = - # cat=plugin.tx_epproducts//a; type=string; label=Default product detail page UID + # cat=epproducts/110/110; type=string; label=Default product detail page UID defaultDetailPageUid = - # cat=plugin.tx_epproducts//a; type=string; label=Exclude products with concept UIDs from search result (CSV) - excludedConceptUids = - # cat=plugin.tx_epproducts//a; type=string; label=Exclude regions with these UIDs from filter options (CSV) - excludedRegionUids = - # cat=plugin.tx_epproducts//a; type=string; label=Force concept UID in all search related parts (CSV) - forcedConceptUids = - # cat=plugin.tx_epproducts//a; type=string; label=Don't show availability info for products with these concept UIDs - noInfoConceptUids = - # cat=plugin.tx_epproducts//a; type=string; label=Room types for pricetables (CSV) - priceTableRoomTypes = 1,2,3,4,5,6,7,8,9,10 - # cat=plugin.tx_epproducts//a; type=string; label=Ignore following IPs in searchlog - searchLogIgnoreIps = - # cat=plugin.tx_epproducts//a; type=string; label=Page UID with reseller export plugin + # cat=epproducts/110/120; type=string; label=Page UID with reseller export plugin resellerExportPageUid = - # cat=plugin.tx_epproducts//a; type=string; label=Email recipient for groups price inquiries + # cat=epproducts/120/100; type=string; label=Exclude products with concept UIDs from search result (CSV) + excludedConceptUids = + # cat=epproducts/120/110; type=string; label=Exclude regions with these UIDs from filter options (CSV) + excludedRegionUids = + # cat=epproducts/120/120; type=string; label=Force concept UID in all search related parts (CSV) + forcedConceptUids = + # cat=epproducts/120/130; type=string; label=Don't show availability info for products with these concept UIDs + noInfoConceptUids = + # cat=epproducts/130/110; type=string; label=Email recipient for groups price inquiries groupsPriceToEmail = gruppen@ep-reisen.de - # cat=plugin.tx_epproducts//a; type=string; label=Email recipient for groups price inquiries + # cat=epproducts/130/120; type=string; label=Email recipient for groups price inquiries groupsPriceToName = EP Reisen + # cat=epproducts/140/100; type=string; label=Room types for pricetables (CSV) + priceTableRoomTypes = 1,2,3,4,5,6,7,8,9,10 + # cat=epproducts/140/110; type=string; label=Ignore following IPs in searchlog + searchLogIgnoreIps = } persistence { - # cat=plugin.tx_epproducts//a; type=string; label=Default storage PID + # cat=epproducts/100/100; type=string; label=Default storage PID storagePid = } } diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript index 9c4e4db5..17170686 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript +++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript @@ -26,6 +26,8 @@ plugin.tx_epproducts { settings { productsPid = {$plugin.tx_epproducts.settings.productsStoragePid} destinationsStoragePid = {$plugin.tx_epproducts.settings.destinationsStoragePid} + regionsStoragePid = {$plugin.tx_epproducts.settings.regionsStoragePid} + citiesStoragePid = {$plugin.tx_epproducts.settings.citiesStoragePid} snowReportStoragePid = {$plugin.tx_epproducts.settings.snowReportStoragePid} defaultSearchPageUid = {$plugin.tx_epproducts.settings.defaultSearchPageUid} defaultDetailPageUid = {$plugin.tx_epproducts.settings.defaultDetailPageUid} From adb9413d57703ca148dcf2a401270bec9affe71d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 23 Aug 2022 11:21:20 +0200 Subject: [PATCH 02/13] Fix incorrect array key, add typecasting --- .../ext/ep_products/Classes/Controller/CityController.php | 4 ++-- .../ext/ep_products/Classes/Controller/RegionController.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php b/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php index 37d64929..24478a06 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php @@ -83,9 +83,9 @@ class CityController extends ActionController public function teasergroupAction() { - $regionUid = $this->settings['regionUid']; + $regionUid = (int)$this->settings['regionUid']; $season = $this->settings['season']; - $citiesPid = $this->settings['citiesPid']; + $citiesPid = (int)$this->settings['citiesStoragePid']; $cities = $this->cityRepository->getTeasersByRegionAndSeason($regionUid, $season, $citiesPid); $data = $this->configurationManager->getContentObject()->data; $this->view->assign('data', $data); diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php b/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php index f32f9b8b..453737bf 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php @@ -83,9 +83,9 @@ class RegionController extends ActionController public function teasergroupAction() { - $countryUid = $this->settings['countryUid']; + $countryUid = (int)$this->settings['countryUid']; $season = $this->settings['season']; - $regionsPid = $this->settings['regionsStoragePid']; + $regionsPid = (int)$this->settings['regionsStoragePid']; $regions = $this->regionRepository->getTeasersByCountryAndSeason($countryUid, $season, $regionsPid); $data = $this->configurationManager->getContentObject()->data; $this->view->assign('data', $data); From 2bdf42808f4cca0df792335a03405fc84c2f7d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 23 Aug 2022 11:27:24 +0200 Subject: [PATCH 03/13] Remove concatenated title of facts block --- .../ext/ep_theme/Resources/Private/Partials/Facts.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Facts.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Facts.html index 33fe0a16..6df03a52 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Facts.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Facts.html @@ -8,7 +8,7 @@

- Skiurlaub {title} Facts + {title} Facts From 5cdace64f52a1c5d86b87d73457644ce2947e927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 23 Aug 2022 11:37:39 +0200 Subject: [PATCH 04/13] Remove Google Maps links from maps overview --- .../Private/Assets/js/controllers/osm_controller.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/osm_controller.js b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/osm_controller.js index fd36532d..47f6f49d 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/osm_controller.js +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/osm_controller.js @@ -36,15 +36,9 @@ export default class extends Controller { for (let item of this.markersValue) { const position = L.latLng(item.lat, item.lng) const marker = L.marker(position) - if (item.externalLink) { - marker.on('click', () => { - window.open(item.externalLink, '_blank') - }) - } else { - const popupContent = '
' + item.name + '
' + item.teaser + - '
zu den Details
' - marker.bindPopup(popupContent) - } + const popupContent = '
' + item.name + '
' + item.teaser + + '
zu den Details
' + marker.bindPopup(popupContent) marker.addTo(this.map) bounds.extend(position) } From e7bb19f9cdc1f34686ef9c6ac7024b06ad8b1127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 23 Aug 2022 12:09:42 +0200 Subject: [PATCH 05/13] Show inquiry form button only for selected concepts --- .../Classes/Controller/ProductController.php | 14 ++++++++------ .../Configuration/TypoScript/constants.typoscript | 2 ++ .../Configuration/TypoScript/setup.typoscript | 1 + .../Resources/Private/Partials/Hotel/Details.html | 14 ++++++++------ .../Private/Templates/Product/Detail.html | 3 ++- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php b/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php index bc7f055a..3722539f 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php @@ -161,12 +161,13 @@ class ProductController extends ActionController $enabledDates = array_keys($availableContingents); } - $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids']); - $isProductWithExcludedConcept = ($product->getConcept() !== null) && \in_array($product->getConcept()->getUid(), - $excludedConceptUids, false); - $noInfoConceptUids = GeneralUtility::trimExplode(',', $this->settings['noInfoConceptUids']); - $isProductWithNoInfoConcept = ($product->getConcept() !== null) && \in_array($product->getConcept()->getUid(), - $noInfoConceptUids, false); + $concept = $product->getConcept(); + $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'], true); + $isProductWithExcludedConcept = ($concept !== null) && \in_array($concept->getUid(), $excludedConceptUids); + $noInfoConceptUids = GeneralUtility::trimExplode(',', $this->settings['noInfoConceptUids'], true); + $isProductWithNoInfoConcept = ($concept !== null) && \in_array($concept->getUid(), $noInfoConceptUids); + $groupInquiryFormConceptUids = GeneralUtility::trimExplode(',', $this->settings['groupInquiryFormConceptUids'], true); + $isProductWithGroupInquiryForm = ($concept !== null) && \in_array($concept->getUid(), $groupInquiryFormConceptUids); // Assemble backlink $backlinkUrl = GeneralUtility::_GET('ref'); @@ -178,6 +179,7 @@ class ProductController extends ActionController 'enabledDates' => $enabledDates ?? [], 'isProductWithExcludedConcept' => $isProductWithExcludedConcept, 'isProductWithNoInfoConcept' => $isProductWithNoInfoConcept, + 'isProductWithGroupInquiryForm' => $isProductWithGroupInquiryForm, 'currentPageUid' => $GLOBALS['TSFE']->id, 'dateFrom' => $dateFrom, 'dateTo' => $dateTo, diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript index 3c472230..f62dc5c0 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript +++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript @@ -50,6 +50,8 @@ plugin.tx_epproducts { priceTableRoomTypes = 1,2,3,4,5,6,7,8,9,10 # cat=epproducts/140/110; type=string; label=Ignore following IPs in searchlog searchLogIgnoreIps = + # cat=epproducts/140/120; type=string; label=Concept UIDs to trigger inquiry form on product detail page (CSV) + groupInquiryFormConceptUids = } persistence { # cat=epproducts/100/100; type=string; label=Default storage PID diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript index 17170686..cc1bf015 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript +++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript @@ -49,6 +49,7 @@ plugin.tx_epproducts { groupsPricePopupPageUid = {$plugin.tx_eptheme.settings.groupsPricePopupPageUid} groupsPriceToEmail = {$plugin.tx_epproducts.settings.groupsPriceToEmail} groupsPriceToName = {$plugin.tx_epproducts.settings.groupsPriceToName} + groupInquiryFormConceptUids = {$plugin.tx_epproducts.settings.groupInquiryFormConceptUids} logoImage = {$plugin.tx_eptheme.settings.logoImage} themekey = {$plugin.tx_eptheme.settings.themekey} datePickerPresets { diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/Details.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/Details.html index cabb1e29..fad4b39e 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/Details.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/Details.html @@ -15,12 +15,14 @@
{hotel.description -> f:format.html()} - - - - - - + + + + + + + + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html index 070b89b1..69fbc0a1 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html @@ -170,10 +170,11 @@ +
- +
From 78469ecf512392e99f77e9eccc0e58ffefe90098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 24 Aug 2022 18:37:57 +0200 Subject: [PATCH 06/13] Extend plugin to use either country or region --- .../ext/ep_products/Classes/Controller/CityController.php | 8 +++++--- .../Classes/Domain/Repository/CityRepository.php | 8 ++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php b/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php index 24478a06..2e3c8696 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php @@ -58,7 +58,7 @@ class CityController extends ActionController /** * @param City $city */ - public function detailAction(City $city = null) + public function detailAction(City $city = null): void { if (null === $city) { $cityUid = $this->settings['cityUid']; @@ -81,12 +81,14 @@ class CityController extends ActionController ]); } - public function teasergroupAction() + public function teasergroupAction(): void { $regionUid = (int)$this->settings['regionUid']; + $countryUid = (int)$this->settings['countryUid']; $season = $this->settings['season']; $citiesPid = (int)$this->settings['citiesStoragePid']; - $cities = $this->cityRepository->getTeasersByRegionAndSeason($regionUid, $season, $citiesPid); + + $cities = $this->cityRepository->getTeasersByCountryOrRegionAndSeason($regionUid, $countryUid, $season, $citiesPid); $data = $this->configurationManager->getContentObject()->data; $this->view->assign('data', $data); $this->view->assign('teasers', $cities); diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php index e768b837..ba268ecb 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php @@ -31,17 +31,21 @@ use EP\EpProducts\Domain\Model\AbstractDestination; class CityRepository extends AbstractRepository { - public function getTeasersByRegionAndSeason(int $regionUid, string $season = 'w', int $storagePid = 0) + public function getTeasersByCountryOrRegionAndSeason(int $regionUid = 0, int $countryUid = 0, string $season = 'w', int $storagePid = 0) { if ($season === null) { $season = AbstractDestination::SEASON_WINTER; } $query = $this->createQuery(); $constraints = [ - $query->equals('region', $regionUid), $query->equals('season', $season), $query->equals('excludeFromTeasergroups', 0) ]; + if (0 < $regionUid) { + $constraints[] = $query->equals('region', $regionUid); + } elseif (0 < $countryUid) { + $constraints[] = $query->equals('country', $countryUid); + } if (0 < $storagePid) { $constraints[] = $query->equals('pid', $storagePid); } From fec72ec31e0cb306ad4a8d7b70857b8a0b629156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 30 Aug 2022 11:32:17 +0200 Subject: [PATCH 07/13] Add missing icons --- .../ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue | 2 +- .../Private/Assets/js/myep/components/AccommodationSelect.vue | 4 +--- .../Private/Assets/js/myep/components/CollapsiblePanel.vue | 4 +--- .../Assets/js/myep/components/ParticipantAddressForm.vue | 4 +--- .../Assets/js/myep/components/ParticipantSizesForm.vue | 4 +--- .../Private/Assets/js/myep/components/PickupSelect.vue | 4 +--- .../Private/Assets/js/myep/components/ServiceSelect.vue | 2 +- 7 files changed, 7 insertions(+), 17 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue index 30eb77c1..ec52600c 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue @@ -470,7 +470,7 @@ } }, computed: { - ...mapState(['config', 'loading']), + ...mapState(['config', 'loading', 'countries']), ...mapGetters(['isGroupManager']), availableContingents () { let filteredContingents = {}; diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/AccommodationSelect.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/AccommodationSelect.vue index 086dd0de..7b18e423 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/AccommodationSelect.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/AccommodationSelect.vue @@ -6,9 +6,7 @@ Zimmer - - - +
  • diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/CollapsiblePanel.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/CollapsiblePanel.vue index 47a71f45..2d71b4ef 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/CollapsiblePanel.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/CollapsiblePanel.vue @@ -5,9 +5,7 @@ {{ title }} - - - +

diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ParticipantAddressForm.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ParticipantAddressForm.vue index 215b1f53..329cc64b 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ParticipantAddressForm.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ParticipantAddressForm.vue @@ -6,9 +6,7 @@ Telefon - - - +
Größen - - - +
Zustieg - - - +
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ServiceSelect.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ServiceSelect.vue index f1456255..9d85779c 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ServiceSelect.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ServiceSelect.vue @@ -4,7 +4,7 @@ {{ subType.label }} - + From 8c2b976e29d2cfc8d67d57d2c41991fd52b34989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 30 Aug 2022 11:32:34 +0200 Subject: [PATCH 08/13] Add close button to multiple select pulldown field --- .../Private/Assets/js/myep/components/ServiceSelect.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ServiceSelect.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ServiceSelect.vue index 9d85779c..3920ebd0 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ServiceSelect.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/ServiceSelect.vue @@ -5,10 +5,13 @@ {{ subType.label }} - - -
+
+
+ +
From f5456b8385a955ae253061387cfc456099a20a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 31 Aug 2022 09:14:09 +0200 Subject: [PATCH 10/13] Replace board info with fixed text in product teaser Trello #1014 --- .../Resources/Private/Partials/Product/Teaser.html | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html index 75aefc4e..222784e0 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html @@ -71,24 +71,18 @@
  • {ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')} - - {f:if(condition: '{season} == "s"', then: 'Bergbahnticket', else: 'Skipass')} - + {f:if(condition: '{season} == "s"', then: 'Bergbahnticket', else: 'Skipass')}
  • {ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')} - - {product.feature} - + {product.feature}
  • {ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')} - - {board} - + Verpflegung
From b09996c7341c115d051cbcca67af2457fe1addd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 31 Aug 2022 09:26:44 +0200 Subject: [PATCH 11/13] Add extended description text to city entity Trello #1006 --- .../Domain/Model/AbstractDestination.php | 21 +++++++++++++++++++ .../TCA/tx_epproducts_domain_model_city.php | 17 +++++++++++++-- .../typo3conf/ext/ep_products/ext_tables.sql | 1 + .../Private/Templates/City/Detail.html | 7 ++++++- .../Private/Templates/Region/Detail.html | 2 +- 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Model/AbstractDestination.php b/public/typo3conf/ext/ep_products/Classes/Domain/Model/AbstractDestination.php index 54b8dc6f..35413e05 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/AbstractDestination.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/AbstractDestination.php @@ -93,6 +93,11 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity */ protected $description = ''; + /** + * @var string + */ + protected $descriptionExtended = ''; + /** * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> */ @@ -322,6 +327,22 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity $this->description = $description; } + /** + * @return string + */ + public function getDescriptionExtended() + { + return $this->descriptionExtended; + } + + /** + * @param string $descriptionExtended + */ + public function setDescriptionExtended($descriptionExtended) + { + $this->descriptionExtended = $descriptionExtended; + } + /** * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images */ diff --git a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php index beaa2927..17a95702 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php +++ b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php @@ -23,7 +23,9 @@ return [ ], 'types' => [ '1' => [ - 'showitem' => '--palette--;;top, name_internal, --palette--;;name, --palette--;;destinations, teaser, keywords, description, party, leisure, facts, officetip, --div--;Bilder/Dateien, teaser_images, header_images, images', + 'showitem' => '--palette--;;top, name_internal, --palette--;;name, --palette--;;destinations, teaser, + keywords, description, description_extended, party, leisure, facts, officetip, + --div--;Bilder/Dateien, teaser_images, header_images, images', ], ], 'palettes' => [ @@ -209,7 +211,18 @@ return [ ], 'description' => [ 'exclude' => 0, - 'label' => 'Der Ort', + 'label' => 'Der Ort (oben)', + 'config' => [ + 'type' => 'text', + 'cols' => 40, + 'rows' => 15, + 'eval' => 'trim', + 'enableRichtext' => true, + ], + ], + 'description_extended' => [ + 'exclude' => 0, + 'label' => 'Der Ort (unten)', 'config' => [ 'type' => 'text', 'cols' => 40, diff --git a/public/typo3conf/ext/ep_products/ext_tables.sql b/public/typo3conf/ext/ep_products/ext_tables.sql index 98f46684..5f6035df 100644 --- a/public/typo3conf/ext/ep_products/ext_tables.sql +++ b/public/typo3conf/ext/ep_products/ext_tables.sql @@ -714,6 +714,7 @@ CREATE TABLE tx_epproducts_domain_model_city header_subtitle varchar(255) DEFAULT '' NOT NULL, keywords text NOT NULL, description text NOT NULL, + description_extended text NOT NULL, party text NOT NULL, leisure text NOT NULL, teaser_images int(11) unsigned NOT NULL default '0', diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/City/Detail.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/City/Detail.html index 8077ecdf..e43e9b07 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/City/Detail.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/City/Detail.html @@ -75,7 +75,7 @@
- @@ -84,6 +84,11 @@ + +
+ {city.descriptionExtended -> f:format.html()} +
+
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Region/Detail.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Region/Detail.html index 7adc6705..ebb1591a 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Region/Detail.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Region/Detail.html @@ -32,7 +32,7 @@
+ +
+ {hotel.name} + {hotel.category} +
+
From b1eba8e684d165ecb94fd7c1b51acb7e89855da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 31 Aug 2022 16:22:17 +0200 Subject: [PATCH 13/13] Replace custom transparent colors using tailwind syntax --- package-lock.json | 16 ----- package.json | 1 - .../js/components/GroupsPriceCalculator.vue | 2 +- .../Resources/Private/Assets/js/myep/App.vue | 2 +- .../Assets/scss/base/_rte-content.scss | 2 +- .../Assets/scss/components/_tiles.scss | 2 +- .../Assets/scss/components/_topnav.scss | 2 +- .../Resources/Private/Partials/Badge.html | 2 +- .../Private/Partials/Concept/Teaser.html | 2 +- .../Private/Partials/Disrupter/Large.html | 2 +- .../Private/Partials/Disrupter/Small.html | 2 +- .../Private/Partials/Disturber/Large.html | 2 +- .../Private/Partials/Disturber/Small.html | 2 +- .../Private/Partials/EventDisturber.html | 2 +- .../Resources/Private/Partials/EventHero.html | 4 +- .../Resources/Private/Partials/Faq.html | 2 +- .../Resources/Private/Partials/Footer.html | 4 +- .../Private/Partials/HeaderSlider.html | 4 +- .../Private/Partials/HeaderSliderSmall.html | 6 +- .../Resources/Private/Partials/Mobilenav.html | 2 +- .../Private/Partials/Pricetable.html | 2 +- .../Private/Partials/Product/Details.html | 2 +- .../Partials/Product/HeaderDetail.html | 4 +- .../Private/Partials/Product/Teaser.html | 4 +- .../Private/Partials/Search/FilterPanel.html | 4 +- .../Private/Partials/SubpageHeader.html | 4 +- .../Resources/Private/Partials/Topnav.html | 2 +- .../Templates/AjaxTable/Datestable.html | 10 +-- .../Templates/AjaxTable/DaytripRooms.html | 10 +-- .../Templates/AjaxTable/Pricetable.html | 10 +-- .../FluidStyledContent/Calendar.html | 2 +- .../FluidStyledContent/DealOfTheWeek.html | 2 +- .../Private/Templates/Product/Detail.html | 2 +- .../Private/Templates/Searchbar/Index.html | 8 +-- .../Private/Templates/Snowreport/List.html | 12 ++-- .../Private/Templates/Watchlist/List.html | 2 +- tailwind.config.js | 64 ++++++------------- 37 files changed, 81 insertions(+), 126 deletions(-) diff --git a/package-lock.json b/package-lock.json index f7851422..b3b537a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,7 +53,6 @@ "smoothscroll-polyfill": "^0.4.4", "tailwindcss": "^3.1.8", "tailwindcss-alt": "^3.0.0", - "tinycolor2": "^1.4.2", "vue-custom-element": "^3.3.0", "vue-loader": "^15.9.8", "vue-template-compiler": "^2.6.14" @@ -7917,15 +7916,6 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, - "node_modules/tinycolor2": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz", - "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -14534,12 +14524,6 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, - "tinycolor2": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz", - "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==", - "dev": true - }, "tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", diff --git a/package.json b/package.json index 6e274b26..d930dc7a 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "smoothscroll-polyfill": "^0.4.4", "tailwindcss": "^3.1.8", "tailwindcss-alt": "^3.0.0", - "tinycolor2": "^1.4.2", "vue-custom-element": "^3.3.0", "vue-loader": "^15.9.8", "vue-template-compiler": "^2.6.14" diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue index 8f5c7af2..11bafa72 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue @@ -210,7 +210,7 @@
Vielen Dank für Ihre Anfrage. Wir werden diese schnellstmöglich bearbeiten.
-
+
Loading...
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/App.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/App.vue index e2a001c4..bdf3f0cf 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/App.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/App.vue @@ -21,7 +21,7 @@
-
+
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_rte-content.scss b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_rte-content.scss index 0d460060..ea9f4176 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_rte-content.scss +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_rte-content.scss @@ -64,7 +64,7 @@ tbody { } th { - @apply border-r border-overlay-white-50 px-2 py-1 md:p-2 text-left text-sm md:text-base; + @apply border-r border-white/50 px-2 py-1 md:p-2 text-left text-sm md:text-base; } td { diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_tiles.scss b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_tiles.scss index f2ce7dda..6424e150 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_tiles.scss +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_tiles.scss @@ -37,7 +37,7 @@ } &:hover:after { - @apply sbw:bg-sbw-overlay-secondary uch:bg-uch-overlay-secondary; + @apply sbw:bg-sbw-overlay/55 uch:bg-uch-overlay/55; } } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_topnav.scss b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_topnav.scss index 1496ce71..24b357d3 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_topnav.scss +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_topnav.scss @@ -7,6 +7,6 @@ } .topnav__item { - @apply flex items-center justify-center w-16 h-8 text-white hover:text-white focus:text-white hover:bg-ep-secondary border-l border-r border-overlay-white-50; + @apply flex items-center justify-center w-16 h-8 text-white hover:text-white focus:text-white hover:bg-ep-secondary border-l border-r border-white/50; @apply ser:hover:bg-ser-secondary; } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Badge.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Badge.html index 2fcb80e6..42b312ce 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Badge.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Badge.html @@ -10,7 +10,7 @@ xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" class="w-full h-full"> - +
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Concept/Teaser.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Concept/Teaser.html index 52febfd4..27cd1bfa 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Concept/Teaser.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Concept/Teaser.html @@ -33,7 +33,7 @@ -
+
{concept.name}
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Large.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Large.html index 74cad9bb..f592b760 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Large.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Large.html @@ -3,7 +3,7 @@ xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers" xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"> -
+
-
+
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disturber/Large.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disturber/Large.html index 73db184a..ca681349 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disturber/Large.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disturber/Large.html @@ -4,7 +4,7 @@ xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers" xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"> -
+
-
+
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/EventDisturber.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/EventDisturber.html index dc55413b..8a4a29c4 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/EventDisturber.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/EventDisturber.html @@ -5,7 +5,7 @@
-
+
{headline -> f:format.raw()} diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/EventHero.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/EventHero.html index fc777c06..08325b91 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/EventHero.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/EventHero.html @@ -4,7 +4,7 @@
-
+