[TASK] Improve media of pages_language_overlay 31/49531/3
authorGeorg Ringer <georg.ringer@gmail.com>
Mon, 22 Aug 2016 05:31:50 +0000 (07:31 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Mon, 22 Aug 2016 08:16:06 +0000 (10:16 +0200)
FAL relations in translated pages must have the same
properties as in regular pages which includes link fields and the
cropping editor.

Resolves: #77541
Releases: master, 7.6
Change-Id: Ice77cd6c752e46ee048d07ca60c9b76cfc5509e8
Reviewed-on: https://review.typo3.org/49531
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/frontend/Configuration/TCA/pages_language_overlay.php

index 1c737ad..1a596c2 100644 (file)
@@ -153,7 +153,42 @@ return array(
         'media' => array(
             'exclude' => true,
             'label' => $GLOBALS['TCA']['pages']['columns']['media']['label'],
-            'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media')
+            'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', array(
+                    // Use the imageoverlayPalette instead of the basicoverlayPalette
+                    'foreign_types' => array(
+                        '0' => array(
+                            'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                        ),
+                        \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
+                            'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                        ),
+                        \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
+                            'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                        ),
+                        \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
+                            'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.audioOverlayPalette;audioOverlayPalette,
+                                                               --palette--;;filePalette'
+                        ),
+                        \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
+                            'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.videoOverlayPalette;videoOverlayPalette,
+                                                               --palette--;;filePalette'
+                        ),
+                        \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
+                            'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                        )
+                    )
+                )
+            )
         ),
         'url' => array(
             'exclude' => true,