[BUGFIX] Only select current file when editing metadata
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_file_metadata.php
1 <?php
2 return [
3 'ctrl' => [
4 'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata',
5 'label' => 'file',
6 'tstamp' => 'tstamp',
7 'crdate' => 'crdate',
8 'cruser_id' => 'cruser_id',
9 'type' => 'file:type',
10 'hideTable' => true,
11 'rootLevel' => true,
12 'languageField' => 'sys_language_uid',
13 'transOrigPointerField' => 'l10n_parent',
14 'transOrigDiffSourceField' => 'l10n_diffsource',
15 'versioningWS' => true,
16 'origUid' => 't3_origuid',
17 'default_sortby' => 'crdate DESC',
18 'typeicon_classes' => [
19 'default' => 'mimetypes-other-other'
20 ],
21 'security' => [
22 'ignoreWebMountRestriction' => true,
23 'ignoreRootLevelRestriction' => true,
24 ],
25 'searchFields' => 'file,title,description,alternative'
26 ],
27 'interface' => [
28 'showRecordFieldList' => 'file, title, description, alternative'
29 ],
30 'columns' => [
31 'sys_language_uid' => [
32 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
33 'config' => [
34 'type' => 'select',
35 'renderType' => 'selectSingle',
36 'foreign_table' => 'sys_language',
37 'foreign_table_where' => 'ORDER BY sys_language.title',
38 'items' => [
39 ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
40 ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
41 ],
42 'default' => 0,
43 'fieldWizard' => [
44 'selectIcons' => [
45 'disabled' => false,
46 ],
47 ],
48 ]
49 ],
50 'l10n_parent' => [
51 'displayCond' => 'FIELD:sys_language_uid:>:0',
52 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
53 'config' => [
54 'type' => 'select',
55 'renderType' => 'selectSingle',
56 'items' => [
57 ['', 0]
58 ],
59 'foreign_table' => 'sys_file_metadata',
60 'foreign_table_where' => 'AND sys_file_metadata.uid=###REC_FIELD_l10n_parent### AND sys_file_metadata.sys_language_uid IN (-1,0)',
61 'default' => 0
62 ]
63 ],
64 'l10n_diffsource' => [
65 'config' => [
66 'type' => 'passthrough',
67 'default' => ''
68 ]
69 ],
70 't3ver_label' => [
71 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
72 'config' => [
73 'type' => 'input',
74 'size' => 30,
75 'max' => 30
76 ]
77 ],
78 'fileinfo' => [
79 'config' => [
80 'type' => 'user',
81 'renderType' => 'fileInfo',
82 ]
83 ],
84 'file' => [
85 'displayCond' => 'FIELD:sys_language_uid:=:0',
86 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file',
87 'config' => [
88 'readOnly' => true,
89 'type' => 'select',
90 'renderType' => 'selectSingle',
91 'foreign_table' => 'sys_file',
92 'foreign_table_where' => 'AND sys_file.uid = ###REC_FIELD_file###',
93 'minitems' => 1,
94 'maxitems' => 1,
95 'size' => 1,
96 'default' => 0,
97 ]
98 ],
99 'title' => [
100 'exclude' => true,
101 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file.title',
102 'l10n_mode' => 'prefixLangTitle',
103 'config' => [
104 'type' => 'input',
105 'size' => 30,
106 'placeholder' => '__row|file|name'
107 ]
108 ],
109 'description' => [
110 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file.description',
111 'l10n_mode' => 'prefixLangTitle',
112 'config' => [
113 'type' => 'text',
114 'cols' => 40,
115 'rows' => 3
116 ]
117 ],
118 'alternative' => [
119 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file.alternative',
120 'config' => [
121 'type' => 'input',
122 'size' => 30,
123 ]
124 ],
125 'width' => [
126 'exclude' => true,
127 'l10n_mode' => 'exclude',
128 'l10n_display' => 'defaultAsReadonly',
129 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:file.width',
130 'config' => [
131 'type' => 'input',
132 'size' => 10,
133 'max' => 20,
134 'eval' => 'int',
135 'default' => 0,
136 'readOnly' => true,
137 ],
138 ],
139 'height' => [
140 'exclude' => true,
141 'l10n_mode' => 'exclude',
142 'l10n_display' => 'defaultAsReadonly',
143 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:file.height',
144 'config' => [
145 'type' => 'input',
146 'size' => 10,
147 'max' => 20,
148 'eval' => 'int',
149 'default' => 0,
150 'readOnly' => true,
151 ],
152 ],
153 ],
154 'types' => [
155 '1' => ['showitem' => '
156 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
157 fileinfo, title, description, alternative, --palette--;;language,
158 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
159 categories,
160 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
161 ']
162 ],
163 'palettes' => [
164 'language' => [
165 'showitem' => 'sys_language_uid, l10n_parent',
166 'isHiddenPalette' => true,
167 ],
168 ]
169 ];