From 9c100c6ba080b5068ecae1975ac98046177e6ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Fri, 21 Sep 2018 18:52:53 +0200 Subject: [PATCH] Assign cropvariants for ep-events --- .../Configuration/TCA/Overrides/pages.php | 11 ++++ .../Overrides/tt_content_element_banner.php | 1 - .../Overrides/tt_content_element_herounit.php | 24 +++++++- .../TCA/Overrides/tt_content_element_tile.php | 20 ++++++- .../TCA/tx_epevents_domain_model_activity.php | 34 +++++++++++ .../TCA/tx_epevents_domain_model_contact.php | 17 ++++++ .../TCA/tx_epevents_domain_model_hotel.php | 17 ++++++ .../TCA/tx_epevents_domain_model_location.php | 17 ++++++ .../TCA/tx_epevents_domain_model_offer.php | 60 +++++++++++++++++++ .../tx_epevents_domain_model_testimonial.php | 17 ++++++ .../tx_epevents_domain_model_traveltype.php | 34 +++++++++++ .../Layouts/Page/CategoryEpEvents.html | 2 +- .../Private/Partials/HerounitActivity.html | 2 +- .../Private/Partials/HerounitCategory.html | 2 +- .../Private/Partials/HerounitFrontpage.html | 4 +- .../Private/Partials/HerounitOffer.html | 2 +- .../Partials/News/Detail/MediaContainer.html | 4 +- .../Partials/OfferTeaserLandscape.html | 12 +++- .../Private/Partials/OfferTeasers.html | 12 +++- .../Private/Templates/Activity/List.html | 12 +++- .../Templates/FluidStyledContent/Banner.html | 2 +- .../FluidStyledContent/Herounit.html | 2 +- .../Templates/FluidStyledContent/Tile.html | 2 +- .../Private/Templates/Page/OfferEpEvents.html | 5 +- .../Private/Templates/Search/Result.html | 27 ++++----- .../Private/Templates/Testimonial/List.html | 4 +- .../TCA/Overrides/sys_file_reference.php | 31 ---------- 27 files changed, 306 insertions(+), 71 deletions(-) delete mode 100644 web/typo3conf/ext/ep_theme/Configuration/TCA/Overrides/sys_file_reference.php diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/pages.php b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/pages.php index 381e703f..377fd98e 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/pages.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/pages.php @@ -116,4 +116,15 @@ call_user_func(function() { 'allowedTables' => '*', ]; + $GLOBALS['TCA']['pages']['columns']['media']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants'] = [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'header' => [ + 'title' => 'Header Startseite', + 'value' => 2.0571, + ], + ], + ], + ]; }); diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_banner.php b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_banner.php index 14361e73..2cd69a4e 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_banner.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_banner.php @@ -39,7 +39,6 @@ call_user_func(function() { 'appearance' => [ 'createNewRelationLinkTitle' => 'Hinzufügen' ], - 'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types'], 'maxitems' => 1, 'minitems' => 1, ], 'jpg') diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_herounit.php b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_herounit.php index 2c76dce7..9afe4db8 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_herounit.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_herounit.php @@ -58,7 +58,29 @@ call_user_func(function() { 'appearance' => [ 'createNewRelationLinkTitle' => 'Hinzufügen' ], - 'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types'], + 'overrideChildTca' => [ + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'headerDefault' => [ + 'title' => 'Header standard', + 'value' => 2.63333333333333, + ], + 'headerLarge' => [ + 'title' => 'Header groß', + 'value' => 2.0571, + ], + ], + ], + ], + ], + ], + ], + ], 'maxitems' => 1, 'minitems' => 1, ], 'jpg') diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_tile.php b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_tile.php index 8c609177..c85e2221 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_tile.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/tt_content_element_tile.php @@ -48,7 +48,25 @@ call_user_func(function() { 'appearance' => [ 'createNewRelationLinkTitle' => 'Hinzufügen' ], - 'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types'], + 'overrideChildTca' => [ + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'default' => [ + 'title' => 'Standard', + 'value' => 1.575, + ], + ], + ], + ], + ], + ], + ], + ], 'maxitems' => 1, 'minitems' => 1, ], 'jpg') diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_activity.php b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_activity.php index 91c39a0d..04948c44 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_activity.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_activity.php @@ -199,6 +199,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 1, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], @@ -222,6 +239,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'header' => [ + 'title' => 'Header', + 'value' => 2.63333333333333, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_contact.php b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_contact.php index 3a3e9243..99742c95 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_contact.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_contact.php @@ -176,6 +176,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'default' => [ + 'title' => 'Standard', + 'value' => 1.62162162, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_hotel.php b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_hotel.php index 11464d3d..42dc0c51 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_hotel.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_hotel.php @@ -166,6 +166,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'header' => [ + 'title' => 'Teaser', + 'value' => 1, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_location.php b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_location.php index 5b7e5be8..05c19ed6 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_location.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_location.php @@ -204,6 +204,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 1, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_offer.php b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_offer.php index 7f565675..ca89f4f2 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_offer.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_offer.php @@ -267,6 +267,32 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Desktop', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 1, + ], + ], + ], + 'mobile' => [ + 'title' => 'Mobile', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 1.7857, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], @@ -290,6 +316,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Mobile', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 1.7857, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], @@ -313,6 +356,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Header', + 'value' => 2.63333333333333, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_testimonial.php b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_testimonial.php index 8ac1e3cf..63a87c13 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_testimonial.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_testimonial.php @@ -144,6 +144,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'default' => [ + 'title' => 'Standard', + 'value' => 1, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_traveltype.php b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_traveltype.php index c5fb1720..fc08c46c 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_traveltype.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/tx_epevents_domain_model_traveltype.php @@ -209,6 +209,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'header' => [ + 'title' => 'Header', + 'value' => 2.0571, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], @@ -232,6 +249,23 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'header' => [ + 'title' => 'Banner', + 'value' => 2.8667, + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 1 ], diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Layouts/Page/CategoryEpEvents.html b/web/typo3conf/ext/ep_events/Resources/Private/Layouts/Page/CategoryEpEvents.html index 5c788d4e..c833041e 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Layouts/Page/CategoryEpEvents.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Layouts/Page/CategoryEpEvents.html @@ -40,7 +40,7 @@ » Fragen Sie unseren Experten - + diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitActivity.html b/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitActivity.html index 15771b49..3947d03f 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitActivity.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitActivity.html @@ -4,7 +4,7 @@ - {f:uri.image(src: activity.imageHeader.uid, treatIdAsReference: 1, crop: activity.imageHeader.crop, width: '1440') -> v:variable.set(name: 'headerImage')} + {f:uri.image(image: activity.imageHeader, cropVariant: 'default', width: '1440', maxHeight: '700') -> v:variable.set(name: 'headerImage')} {f:uri.image(src: settings.activityDefaultHeaderImage, width: '1440') -> v:variable.set(name: 'headerImage')} diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitCategory.html b/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitCategory.html index 9a671470..21365781 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitCategory.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitCategory.html @@ -3,7 +3,7 @@ - {f:uri.image(src: traveltype.imageHeader.uid, treatIdAsReference: 1, crop: traveltype.imageHeader.crop, width: '1440') -> v:variable.set(name: 'headerImage')} + {f:uri.image(image: traveltype.imageHeader, cropVariant: 'default', width: '1440', maxHeight: '700') -> v:variable.set(name: 'headerImage')} {v:variable.set(name: 'headerImage', value: 'https://placehold.it/1440x700')} diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitFrontpage.html b/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitFrontpage.html index 053dc968..59f168d3 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitFrontpage.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitFrontpage.html @@ -29,10 +29,10 @@ + style="background-image: url({f:uri.image(image: image, cropVariant: 'default', width: '1440', maxHeight: '700')})"> -
+
diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitOffer.html b/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitOffer.html index 5739acad..0a77f47a 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitOffer.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Partials/HerounitOffer.html @@ -4,7 +4,7 @@ - {f:uri.image(src: offer.imageHeader.uid, treatIdAsReference: 1, crop: offer.imageHeader.crop, width: '1440') -> v:variable.set(name: 'headerImage')} + {f:uri.image(image: offer.imageHeader, cropVariant: 'default', width: '1440', maxHeight: '700') -> v:variable.set(name: 'headerImage')} {v:variable.set(name: 'headerImage', value: 'https://placehold.it/1440x700')} diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Partials/News/Detail/MediaContainer.html b/web/typo3conf/ext/ep_events/Resources/Private/Partials/News/Detail/MediaContainer.html index 5556d7a4..8377d446 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Partials/News/Detail/MediaContainer.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Partials/News/Detail/MediaContainer.html @@ -8,7 +8,7 @@ - + diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Templates/FluidStyledContent/Herounit.html b/web/typo3conf/ext/ep_events/Resources/Private/Templates/FluidStyledContent/Herounit.html index 4e2d8c8c..4391dc8b 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Templates/FluidStyledContent/Herounit.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Templates/FluidStyledContent/Herounit.html @@ -10,7 +10,7 @@ - {f:uri.image(src: image.0.uid, treatIdAsReference: 1, crop: image.0.crop, width: '1440') -> v:variable.set(name: 'headerImage')} + {f:uri.image(image: image.0, cropVariant: 'default', width: '1440', maxHeight: '700') -> v:variable.set(name: 'headerImage')} {v:variable.set(name: 'headerImage', value: 'https://placehold.it/1440x700')} diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Templates/FluidStyledContent/Tile.html b/web/typo3conf/ext/ep_events/Resources/Private/Templates/FluidStyledContent/Tile.html index c09445aa..c21086e7 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Templates/FluidStyledContent/Tile.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Templates/FluidStyledContent/Tile.html @@ -7,7 +7,7 @@ -
+
{data.header} diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Page/OfferEpEvents.html b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Page/OfferEpEvents.html index 752ed189..2bde8f46 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Page/OfferEpEvents.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Page/OfferEpEvents.html @@ -55,7 +55,7 @@ {title} {subtitle} @@ -75,7 +75,8 @@ - + diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Search/Result.html b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Search/Result.html index 5a884cbb..bf9ea1c9 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Search/Result.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Search/Result.html @@ -20,20 +20,19 @@ rel="nofollow">
- - - - - - - {offer.imageTeaser.alternative} - - - - Platzhalter - - + + + + + + + + + + {offer.imageTeaser.alternative} +
{offer.name -> ep:softHyphen()} {offer.location.name -> ep:softHyphen()} diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Testimonial/List.html b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Testimonial/List.html index 1da13264..6ded775f 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Testimonial/List.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Testimonial/List.html @@ -16,7 +16,9 @@