[BUGFIX] Improve l10n_mode config for sys_file_reference
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_file_reference.php
index 5863bbc..e8928c9 100644 (file)
@@ -3,12 +3,18 @@ return array(
        'ctrl' => array(
                'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference',
                'label' => 'uid',
+               'formattedLabel_userFunc' => 'EXT:core/Classes/Resource/Service/UserFileInlineLabelService.php:TYPO3\\CMS\\Core\\Resource\\Service\\UserFileInlineLabelService->getInlineLabel',
+               'formattedLabel_userFunc_options' => array(
+                       'sys_file' => array(
+                               'title',
+                               'name'
+                       )
+               ),
                'tstamp' => 'tstamp',
                'crdate' => 'crdate',
                'cruser_id' => 'cruser_id',
                'type' => 'uid_local:type',
                'hideTable' => TRUE,
-               'rootLevel' => TRUE,
                'sortby' => 'sorting',
                'delete' => 'deleted',
                'versioningWS' => TRUE,
@@ -20,10 +26,14 @@ return array(
                'enablecolumns' => array(
                        'disabled' => 'hidden'
                ),
+               'typeicon_classes' => array(
+                       'default' => 'mimetypes-other-other'
+               ),
                'security' => array(
                        'ignoreWebMountRestriction' => TRUE,
                        'ignoreRootLevelRestriction' => TRUE,
                ),
+               'searchFields' => 'uid_local,uid_foreign,tablenames,fieldname,title,description'
        ),
        'interface' => array(
                'showRecordFieldList' => 'hidden,uid_local,uid_foreign,tablenames,fieldname,sorting_foreign,table_local,title,description'
@@ -31,7 +41,7 @@ return array(
        'columns' => array(
                't3ver_label' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
+                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
@@ -40,21 +50,21 @@ return array(
                ),
                'sys_language_uid' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.language',
+                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
                        'config' => array(
                                'type' => 'select',
                                'foreign_table' => 'sys_language',
                                'foreign_table_where' => 'ORDER BY sys_language.title',
                                'items' => array(
-                                       array('LLL:EXT:lang/locallang_general.php:LGL.allLanguages', -1),
-                                       array('LLL:EXT:lang/locallang_general.php:LGL.default_value', 0)
+                                       array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
+                                       array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
                                )
                        )
                ),
                'l10n_parent' => array(
                        'displayCond' => 'FIELD:sys_language_uid:>:0',
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.l18n_parent',
+                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
                        'config' => array(
                                'type' => 'select',
                                'items' => array(
@@ -72,7 +82,7 @@ return array(
                ),
                'hidden' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
+                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
                        'config' => array(
                                'type' => 'check',
                                'default' => '0'
@@ -94,15 +104,9 @@ return array(
                        'exclude' => 0,
                        'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_foreign',
                        'config' => array(
-                               'type' => 'select',
-                               'items' => array(
-                                       array('', 0)
-                               ),
-                               'foreign_table' => 'tt_content',
-                               'foreign_table_where' => 'ORDER BY tt_content.uid',
-                               'size' => 1,
-                               'minitems' => 0,
-                               'maxitems' => 1
+                               'type' => 'input',
+                               'size' => '10',
+                               'eval' => 'int'
                        )
                ),
                'tablenames' => array(
@@ -148,18 +152,19 @@ return array(
                        )
                ),
                'title' => array(
-                       'l10n_mode' => 'mergeIfNotBlank',
-                       'exclude' => 0,
+                       'l10n_mode' => 'prefixLangTitle',
+                       'exclude' => 1,
                        'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title',
                        'config' => array(
                                'type' => 'input',
-                               'eval' => 'null',
                                'size' => '20',
-                               'placeholder' => '__row|uid_local|title',
+                               'eval' => 'null',
+                               'placeholder' => '__row|uid_local|metadata|title',
+                               'mode' => 'useOrOverridePlaceholder',
+                               'default' => NULL,
                        )
                ),
                'link' => array(
-                       'l10n_mode' => 'mergeIfNotBlank',
                        'exclude' => 1,
                        'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
                        'config' => array(
@@ -171,34 +176,44 @@ return array(
                                                'type' => 'popup',
                                                'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
                                                'icon' => 'link_popup.gif',
-                                               'script' => 'browse_links.php?mode=wizard',
+                                               'module' => array(
+                                                       'name' => 'wizard_element_browser',
+                                                       'urlParameters' => array(
+                                                               'mode' => 'wizard'
+                                                       )
+                                               ),
                                                'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
                                        )
-                               )
+                               ),
+                               'softref' => 'typolink'
                        )
                ),
                'description' => array(
                        // This is used for captions in the frontend
-                       'l10n_mode' => 'mergeIfNotBlank',
-                       'exclude' => 0,
+                       'l10n_mode' => 'prefixLangTitle',
+                       'exclude' => 1,
                        'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.description',
                        'config' => array(
                                'type' => 'text',
-                               'eval' => 'null',
                                'cols' => '20',
                                'rows' => '5',
-                               'placeholder' => '__row|uid_local|description',
+                               'eval' => 'null',
+                               'placeholder' => '__row|uid_local|metadata|description',
+                               'mode' => 'useOrOverridePlaceholder',
+                               'default' => NULL,
                        )
                ),
                'alternative' => array(
-                       'l10n_mode' => 'mergeIfNotBlank',
-                       'exclude' => 0,
+                       'l10n_mode' => 'prefixLangTitle',
+                       'exclude' => 1,
                        'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative',
                        'config' => array(
                                'type' => 'input',
-                               'eval' => 'null',
                                'size' => '20',
-                               'placeholder' => '__row|uid_local|alternative',
+                               'eval' => 'null',
+                               'placeholder' => '__row|uid_local|metadata|alternative',
+                               'mode' => 'useOrOverridePlaceholder',
+                               'default' => NULL,
                        ),
                ),
        ),
@@ -257,4 +272,3 @@ return array(
                )
        )
 );
-?>
\ No newline at end of file