From 618f8bba97da5be771ebdff1d80feb66a999597d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Sun, 8 Sep 2019 13:09:57 +0200 Subject: [PATCH 1/3] Properly order image sources --- .../Assets/js/components/SearchResultItem.vue | 4 +- .../Private/Partials/Hotel/TeaserWide.html | 28 +++++----- .../Private/Partials/TeaserImage.html | 56 +++++++++---------- .../Private/Partials/TeaserWideImage.html | 14 ++--- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResultItem.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResultItem.vue index d2951a88..5ab7a32a 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResultItem.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResultItem.vue @@ -5,9 +5,9 @@ - - + + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/TeaserWide.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/TeaserWide.html index e87fd161..bf7515cf 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/TeaserWide.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/TeaserWide.html @@ -109,15 +109,15 @@ - - + + {image.alternative} @@ -126,18 +126,18 @@ - - + + - - - - + + + + {image.alternative} @@ -23,26 +23,26 @@ - - - - + + + + - - - +
- diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Search/Searchbox.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Search/Searchbox.html index 21aa2b4c..9ce9bf56 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Search/Searchbox.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Search/Searchbox.html @@ -16,7 +16,7 @@ :date-presets='{settings.datePickerPresets -> v:format.json.encode()}' inline-template>
- From e828aea16933b46f878769fbcfae83893a71322a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Sun, 8 Sep 2019 13:12:23 +0200 Subject: [PATCH 3/3] Implement dynamic backlink, remove session storage --- .../Classes/Controller/ProductController.php | 1 - .../Resources/Private/Assets/js/_app.js | 4 +- .../Private/Assets/js/components/BackLink.vue | 31 +++++++++++++ .../Assets/js/components/HotelList.vue | 4 +- .../Assets/js/components/ProductDetail.vue | 4 +- .../Assets/js/components/ReferrerLink.vue | 28 ------------ .../Assets/js/components/SearchResult.vue | 3 -- .../Assets/js/components/SearchResultItem.vue | 35 ++++++--------- .../Private/Partials/Hotel/TeaserWide.html | 43 +++++++++++++------ .../Partials/Product/HeaderDetail.html | 4 +- 10 files changed, 82 insertions(+), 75 deletions(-) create mode 100644 public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/BackLink.vue delete mode 100644 public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ReferrerLink.vue diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php b/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php index 7be5cbca..148cf5a5 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php @@ -173,7 +173,6 @@ class ProductController extends ActionController $this->view->assignMultiple([ 'hotels' => $hotels, 'product' => $product, - 'currentPageUid' => $GLOBALS['TSFE']->id, 'linkHotel' => true, ]); } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js index baa96e25..059117b3 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js @@ -30,8 +30,8 @@ import ContactForm from './components/ContactForm.vue' import WatchlistToggle from './components/WatchlistToggle.vue' import Watchlist from './components/Watchlist.vue' import HotelList from './components/HotelList.vue' -import ReferrerLink from './components/ReferrerLink.vue' import FacebookPixel from './components/FacebookPixel.vue' +import BackLink from './components/BackLink.vue' // Define global constants const $window = $(window); @@ -64,7 +64,7 @@ new Vue({ WatchlistToggle, Watchlist, HotelList, - ReferrerLink, + BackLink, MyEp: () => import('./myep/components/App.vue'), FacebookPixel }, diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/BackLink.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/BackLink.vue new file mode 100644 index 00000000..d7c482e0 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/BackLink.vue @@ -0,0 +1,31 @@ + + + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/HotelList.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/HotelList.vue index 2667052d..d6dad1a4 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/HotelList.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/HotelList.vue @@ -1,13 +1,11 @@ diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResult.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResult.vue index 900198c0..78731a80 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResult.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResult.vue @@ -204,14 +204,11 @@ }, updateFilterSettings (settings) { this.filterSettings = { ...this.filterSettings, ...settings }; - sessionStorage.setItem('filterSettings', JSON.stringify(this.filterSettings)); } }, created () { if (!$.isEmptyObject(this.initialFilterSettings)) { this.updateFilterSettings(this.initialFilterSettings) - } else if (sessionStorage.getItem('filterSettings')) { - this.updateFilterSettings(JSON.parse(sessionStorage.getItem('filterSettings'))) } }, mounted () { diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResultItem.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResultItem.vue index 5ab7a32a..d1817b37 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResultItem.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/SearchResultItem.vue @@ -2,8 +2,7 @@
@@ -45,21 +44,21 @@
{{ item.dates.length > 1 ? 'Zeitraum' : 'Termin' }} {{ dateRange }} - + {{ item.dates.length }} Termin{{ item.dates.length > 1 ? 'e' : '' }} - +
{{ item.daytrip ? 'Tageweise buchbar' : nightsOptions }}
ab {{ item.minPrice }} € - + Details & Buchen - +
@@ -70,12 +69,10 @@ import dayjs from 'dayjs' import 'dayjs/locale/de' import WatchlistToggle from './WatchlistToggle.vue' - import ReferrerLink from './ReferrerLink.vue' export default { components: { - WatchlistToggle, - ReferrerLink + WatchlistToggle }, props: { item: { @@ -85,15 +82,11 @@ section: { type: Object, required: true - }, - referringPage: { - type: Object, - default () { - return { - url: null, - label: null - } - } + } + }, + methods: { + getUrl () { + return this.item.detailPageUri + '?ref=' + window.location.pathname; } }, computed: { diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/TeaserWide.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/TeaserWide.html index bf7515cf..d0fac703 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/TeaserWide.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Hotel/TeaserWide.html @@ -10,10 +10,13 @@ {item.country.name} - + - +
{product.concept.name}
@@ -70,32 +73,46 @@ {f:if(condition: '{item.dates -> f:count()} > 1', then: 'Zeitraum', else: 'Termin')} {ep:dateRange(dateFrom: item.minDateStart, dateTo: item.maxDateEnd, includeLabel: 0)} - + {item.dates -> f:count()} Termin{f:if(condition: '{item.dates -> f:count()} > 1', then: 'e')} - +
{ep:nightsOptions(options: item.nights)}
ab {item.minPrice} € - + Details & Buchen - +
 
ausgebucht - Details + + Details +
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/HeaderDetail.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/HeaderDetail.html index 2db63d30..5f262b46 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/HeaderDetail.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/HeaderDetail.html @@ -60,8 +60,6 @@
- + {v:render.template(file: 'EXT:ep_theme/Resources/Private/Partials/Breadcrumb.html')}