[BUGFIX] FormEngine inline: Localize all button in default record 72/44372/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 29 Oct 2015 19:04:23 +0000 (20:04 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Thu, 29 Oct 2015 19:14:22 +0000 (20:14 +0100)
Do not show localize all button on default language record.

Resolves: #71130
Releases: master
Change-Id: Id54271fe46e1d73b25390ca7d81247d4c2a34f41
Reviewed-on: https://review.typo3.org/44372
Reviewed-by: Sebastian Fischer <typo3@evoweb.de>
Tested-by: Sebastian Fischer <typo3@evoweb.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php

index d2aaf47..a505579 100644 (file)
@@ -211,7 +211,9 @@ class InlineControlContainer extends AbstractContainer
 
         // Render the localization links
         $localizationLinks = '';
-        if ($language > 0 && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] > 0 && MathUtility::canBeInterpretedAsInteger($row['uid'])) {
+        // @todo if isInlineDefaultLanguageRecordInLocalizedParentContext
+        // @todo: Would be even more cool if the localize button is only shown if there are any not yet localized children
+        if ($language > 0 && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']][0] > 0 && MathUtility::canBeInterpretedAsInteger($row['uid'])) {
             // Add the "Localize all records" link before all child records:
             if (isset($config['appearance']['showAllLocalizationLink']) && $config['appearance']['showAllLocalizationLink']) {
                 $localizationLinks .= ' ' . $this->getLevelInteractionLink('localize', $nameObject . '-' . $foreign_table, $config);