From 8099436bb0e1b9c7829898ad99f933e37bbec741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Mon, 24 Sep 2018 14:58:40 +0200 Subject: [PATCH] Add crop variants for content slider images --- .../TCA/tx_epproducts_domain_model_city.php | 28 ++++++++++++++++++- .../tx_epproducts_domain_model_country.php | 28 ++++++++++++++++++- .../TCA/tx_epproducts_domain_model_hotel.php | 28 ++++++++++++++++++- .../tx_epproducts_domain_model_product.php | 28 ++++++++++++++++++- .../TCA/tx_epproducts_domain_model_region.php | 26 +++++++++++++++++ .../Private/Partials/ContentSlider.html | 8 +++--- 6 files changed, 138 insertions(+), 8 deletions(-) diff --git a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php index 18ac319d..08cb9168 100644 --- a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php +++ b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php @@ -332,7 +332,7 @@ return [ ], 'images' => [ 'exclude' => 0, - 'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_city.images', + 'label' => 'Galeriebilder', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'images', [ @@ -347,6 +347,32 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, + ], + ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 10 ], diff --git a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_country.php b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_country.php index 6f65611f..e3e31ac8 100644 --- a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_country.php +++ b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_country.php @@ -329,7 +329,7 @@ return [ ], 'images' => [ 'exclude' => 0, - 'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_country.images', + 'label' => 'Galeriebilder', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'images', [ @@ -344,6 +344,32 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, + ], + ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 10 ], diff --git a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php index 994aea80..16ddc12e 100644 --- a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php +++ b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php @@ -348,7 +348,7 @@ return [ ], 'images' => [ 'exclude' => 0, - 'label' => 'Bilder', + 'label' => 'Galeriebilder', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'images', [ @@ -363,6 +363,32 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, + ], + ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 10 ], diff --git a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php index d880de05..f536bf65 100644 --- a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php +++ b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php @@ -449,7 +449,7 @@ return [ ], 'images' => [ 'exclude' => 0, - 'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product.images', + 'label' => 'Galeriebilder', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'images', [ @@ -464,6 +464,32 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, + ], + ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 10 ], diff --git a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_region.php b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_region.php index 7c721c6e..fae7c54e 100644 --- a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_region.php +++ b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_region.php @@ -416,6 +416,32 @@ return [ --palette--;;filePalette', ], ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, + ], + ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', + ], + ], + ], + ], + ], + ], + ], ], 'maxitems' => 10 ], diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Partials/ContentSlider.html b/web/typo3conf/ext/ep_theme/Resources/Private/Partials/ContentSlider.html index d6f80e7a..9e3dc1d3 100644 --- a/web/typo3conf/ext/ep_theme/Resources/Private/Partials/ContentSlider.html +++ b/web/typo3conf/ext/ep_theme/Resources/Private/Partials/ContentSlider.html @@ -20,7 +20,7 @@