diff --git a/typo3/sysext/backend/Classes/View/PageLayoutView.php b/typo3/sysext/backend/Classes/View/PageLayoutView.php index f3b02d8b21402e3e08376e8eb7ed0ef91c161a09..57b394d38f3297a7ac48f425f48b66e4dbda067d 100644 --- a/typo3/sysext/backend/Classes/View/PageLayoutView.php +++ b/typo3/sysext/backend/Classes/View/PageLayoutView.php @@ -1927,8 +1927,14 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe } $theNewButton = ''; - $allowCopy = true; - $allowTranslate = true; + $localizationTsConfig = BackendUtility::getModTSconfig($this->id, 'mod.web_layout.localization'); + $allowCopy = isset($localizationTsConfig['properties']['enableCopy']) + ? (int)$localizationTsConfig['properties']['enableCopy'] === 1 + : true; + $allowTranslate = isset($localizationTsConfig['properties']['enableTranslate']) + ? (int)$localizationTsConfig['properties']['enableTranslate'] === 1 + : true; + if (!empty($this->languageHasTranslationsCache[$lP])) { if (isset($this->languageHasTranslationsCache[$lP]['hasStandAloneContent'])) { $allowTranslate = false; diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-76910-PageLayoutViewAllowToDisableCopyTranslateButtons.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-76910-PageLayoutViewAllowToDisableCopyTranslateButtons.rst new file mode 100644 index 0000000000000000000000000000000000000000..b575f89e1f10a6129b0504fc85d62ec9eb5dfbb1 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Feature-76910-PageLayoutViewAllowToDisableCopyTranslateButtons.rst @@ -0,0 +1,25 @@ +.. include:: ../../Includes.txt + +============================================================================== +Feature: #76910 - PageLayoutView - Allow to disable copy- / translate- buttons +============================================================================== + +See :issue:`76910` + +Description +=========== + +The localization actions "Translate" and "Copy" are now toggleable by PageTS and UserTS. + +.. code-block:: typoscript + + mod.web_layout.localization.enableCopy = 1 + mod.web_layout.localization.enableTranslate = 1 + + +Impact +====== + +Using these options allows to disable or enable a certain action on user basis and/or page basis. + +.. index:: Backend, TSConfig