[!!!][FEATURE] Add showIconTable option for selectSingle fields
[Packages/TYPO3.CMS.git] / typo3 / sysext / filemetadata / Configuration / TCA / Overrides / sys_file_metadata.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 $tca = array(
5 'ctrl' => array(
6 'type' => 'file:type',
7 ),
8 'types' => array(
9 TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => array(
10 'showitem' => '
11 fileinfo, title, description, alternative, keywords, caption, download_name,
12 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
13 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10 ,
14 fe_groups,
15 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
16 creator, --palette--;;20,
17 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40
18 ',
19 ),
20 TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
21 'showitem' => '
22 fileinfo, title, description, alternative, keywords, caption, download_name,
23 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
24 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10 ,
25 fe_groups,
26 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
27 creator, --palette--;;20,
28 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40,
29 language
30 ',
31 ),
32 TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
33 'showitem' => '
34 fileinfo, title, description, alternative, keywords, caption, download_name,
35 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
36 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10 ,
37 fe_groups,
38 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
39 creator, --palette--;;20,
40 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40,
41 --palette--;;30,
42 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.metrics;50
43 ',
44 ),
45 TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
46 'showitem' => '
47 fileinfo, title, description, alternative, keywords, caption, download_name,
48 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
49 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
50 fe_groups,
51 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
52 duration,
53 creator, --palette--;;20, language
54 ',
55 ),
56 TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
57 'showitem' => '
58 fileinfo, title, description, alternative, keywords, caption, download_name,
59 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
60 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
61 fe_groups,
62 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
63 duration,
64 creator, --palette--;;20, language
65 ',
66 ),
67 TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
68 'showitem' => '
69 fileinfo, title, description, alternative, keywords, caption, download_name,
70 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
71 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
72 fe_groups,
73 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
74 creator, --palette--;;20,
75 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40,
76 language, --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.content_date;60, pages
77 ',
78 ),
79 ),
80 'palettes' => array(
81 '10' => array(
82 'showitem' => 'visible, status, ranking',
83 ),
84 '20' => array(
85 'showitem' => 'creator_tool, publisher, source, copyright',
86 ),
87 '30' => array(
88 'showitem' => 'latitude, longitude',
89 ),
90 '40' => array(
91 'showitem' => 'location_country, location_region, location_city',
92 ),
93 '50' => array(
94 'showitem' => 'width, height, unit, color_space',
95 ),
96 '60' => array(
97 'showitem' => 'content_creation_date, content_modification_date',
98 ),
99 ),
100 'columns' => array(
101 'visible' => array(
102 'exclude' => 1,
103 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.visible',
104 'config' => array(
105 'type' => 'check',
106 'default' => '1'
107 ),
108 ),
109 'status' => array(
110 'exclude' => 1,
111 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status',
112 'config' => array(
113 'type' => 'select',
114 'renderType' => 'selectSingle',
115 'items' => array(
116 array(
117 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.1',
118 1,
119 'EXT:filemetadata/Resources/Public/Icons/status_1.png'
120 ),
121 array(
122 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.2',
123 2,
124 'EXT:filemetadata/Resources/Public/Icons/status_2.png'
125 ),
126 array(
127 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.3',
128 3,
129 'EXT:filemetadata/Resources/Public/Icons/status_3.png'
130 ),
131 ),
132 'showIconTable' => true,
133 ),
134 ),
135 'keywords' => array(
136 'exclude' => 1,
137 'l10n_mode' => 'prefixLangTitle',
138 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.keywords',
139 'config' => array(
140 'placeholder' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:placeholder.keywords',
141 'type' => 'input',
142 'size' => 255,
143 'eval' => 'trim'
144 ),
145 ),
146 'caption' => array(
147 'exclude' => 1,
148 'l10n_mode' => 'prefixLangTitle',
149 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.caption',
150 'config' => array(
151 'type' => 'input',
152 'size' => 30,
153 'eval' => 'trim'
154 ),
155 ),
156 'creator_tool' => array(
157 'exclude' => 1,
158 'l10n_mode' => 'exclude',
159 'l10n_display' => 'defaultAsReadonly',
160 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator_tool',
161 'config' => array(
162 'type' => 'input',
163 'size' => 20,
164 'eval' => 'trim'
165 ),
166 ),
167 'download_name' => array(
168 'exclude' => 1,
169 'l10n_mode' => 'exclude',
170 'l10n_display' => 'defaultAsReadonly',
171 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.download_name',
172 'config' => array(
173 'type' => 'input',
174 'size' => 30,
175 'eval' => 'trim'
176 ),
177 ),
178 'creator' => array(
179 'exclude' => 1,
180 'l10n_mode' => 'exclude',
181 'l10n_display' => 'defaultAsReadonly',
182 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator',
183 'config' => array(
184 'type' => 'input',
185 'size' => 30,
186 'eval' => 'trim'
187 ),
188 ),
189 'publisher' => array(
190 'exclude' => 1,
191 'l10n_mode' => 'exclude',
192 'l10n_display' => 'defaultAsReadonly',
193 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.publisher',
194 'config' => array(
195 'type' => 'input',
196 'size' => 20,
197 'eval' => 'trim'
198 ),
199 ),
200 'source' => array(
201 'exclude' => 1,
202 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.source',
203 'config' => array(
204 'type' => 'input',
205 'size' => 20,
206 'eval' => 'trim'
207 ),
208 ),
209 'copyright' => array(
210 'exclude' => 1,
211 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.copyright',
212 'config' => array(
213 'type' => 'input',
214 'size' => 20,
215 'eval' => 'trim'
216 ),
217 ),
218 'location_country' => array(
219 'exclude' => 1,
220 'l10n_mode' => 'mergeIfNotBlank',
221 'l10n_display' => '',
222 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_country',
223 'config' => array(
224 'type' => 'input',
225 'size' => 20,
226 'eval' => 'trim'
227 ),
228 ),
229 'location_region' => array(
230 'exclude' => 1,
231 'l10n_mode' => 'mergeIfNotBlank',
232 'l10n_display' => '',
233 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_region',
234 'config' => array(
235 'type' => 'input',
236 'size' => 20,
237 'eval' => 'trim'
238 ),
239 ),
240 'location_city' => array(
241 'exclude' => 1,
242 'l10n_mode' => 'mergeIfNotBlank',
243 'l10n_display' => '',
244 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_city',
245 'config' => array(
246 'type' => 'input',
247 'size' => 20,
248 'eval' => 'trim'
249 ),
250 ),
251 'latitude' => array(
252 'exclude' => 1,
253 'l10n_mode' => 'exclude',
254 'l10n_display' => 'defaultAsReadonly',
255 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.latitude',
256 'config' => array(
257 'type' => 'input',
258 'size' => '20',
259 'eval' => 'trim',
260 'max' => '30',
261 'default' => '0.00000000000000'
262 ),
263 ),
264 'longitude' => array(
265 'exclude' => 1,
266 'l10n_mode' => 'exclude',
267 'l10n_display' => 'defaultAsReadonly',
268 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.longitude',
269 'config' => array(
270 'type' => 'input',
271 'size' => '20',
272 'eval' => 'trim',
273 'max' => '30',
274 'default' => '0.00000000000000'
275 ),
276 ),
277 'ranking' => array(
278 'exclude' => 1,
279 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.ranking',
280 'config' => array(
281 'type' => 'select',
282 'renderType' => 'selectSingle',
283 'minitems' => 1,
284 'maxitems' => 1,
285 'items' => array(
286 array(1, 1),
287 array(2, 2),
288 array(3, 3),
289 array(4, 4),
290 array(5, 5),
291 ),
292 ),
293 ),
294 'content_creation_date' => array(
295 'exclude' => 1,
296 'l10n_mode' => 'exclude',
297 'l10n_display' => 'defaultAsReadonly',
298 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_creation_date',
299 'config' => array(
300 'type' => 'input',
301 'size' => 12,
302 'max' => 20,
303 'eval' => 'date',
304 'checkbox' => 1,
305 'default' => time()
306 ),
307 ),
308 'content_modification_date' => array(
309 'exclude' => 1,
310 'l10n_mode' => 'exclude',
311 'l10n_display' => 'defaultAsReadonly',
312 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_modification_date',
313 'config' => array(
314 'type' => 'input',
315 'size' => 12,
316 'max' => 20,
317 'eval' => 'date',
318 'checkbox' => 1,
319 'default' => time()
320 ),
321 ),
322 'note' => array(
323 'exclude' => 1,
324 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.note',
325 'config' => array(
326 'type' => 'text',
327 'cols' => 40,
328 'rows' => 15,
329 'eval' => 'trim'
330 ),
331 ),
332 /*
333 * METRICS ###########################################
334 */
335 'unit' => array(
336 'exclude' => 1,
337 'l10n_mode' => 'exclude',
338 'l10n_display' => 'defaultAsReadonly',
339 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit',
340 'config' => array(
341 'type' => 'select',
342 'renderType' => 'selectSingle',
343 'items' => array(
344 array('', ''),
345 array('px', 'px'),
346 array('mm', 'mm'),
347 array('cm', 'cm'),
348 array('m', 'm'),
349 array('p', 'p'),
350 ),
351 'default' => '',
352 'readOnly' => true,
353 ),
354 ),
355 'duration' => array(
356 'exclude' => 1,
357 'l10n_mode' => 'exclude',
358 'l10n_display' => 'defaultAsReadonly',
359 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.duration',
360 'config' => array(
361 'type' => 'input',
362 'size' => '10',
363 'max' => '20',
364 'eval' => 'int',
365 'default' => '0'
366 )
367 ),
368 'color_space' => array(
369 'exclude' => 1,
370 'l10n_mode' => 'exclude',
371 'l10n_display' => 'defaultAsReadonly',
372 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space',
373 'config' => array(
374 'type' => 'select',
375 'renderType' => 'selectSingle',
376 'items' => array(
377 array('', ''),
378 array('RGB', 'RGB'),
379 array('CMYK', 'CMYK'),
380 array('CMY', 'CMY'),
381 array('YUV', 'YUV'),
382 array('Grey', 'grey'),
383 array('indexed', 'indx'),
384 ),
385 'default' => '',
386 'readOnly' => true,
387 )
388 ),
389 'width' => array(
390 'exclude' => 1,
391 'l10n_mode' => 'exclude',
392 'l10n_display' => 'defaultAsReadonly',
393 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.width',
394 'config' => array(
395 'type' => 'input',
396 'size' => '10',
397 'max' => '20',
398 'eval' => 'int',
399 'default' => '0',
400 'readOnly' => true,
401 ),
402 ),
403 'height' => array(
404 'exclude' => 1,
405 'l10n_mode' => 'exclude',
406 'l10n_display' => 'defaultAsReadonly',
407 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.height',
408 'config' => array(
409 'type' => 'input',
410 'size' => '10',
411 'max' => '20',
412 'eval' => 'int',
413 'default' => '0',
414 'readOnly' => true,
415 ),
416 ),
417 'pages' => array(
418 'exclude' => 1,
419 'l10n_mode' => 'exclude',
420 'l10n_display' => 'defaultAsReadonly',
421 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.pages',
422 'config' => array(
423 'type' => 'input',
424 'size' => 30,
425 'eval' => 'trim',
426 'readOnly' => true
427 ),
428 ),
429 'language' => array(
430 'exclude' => 1,
431 'l10n_mode' => 'exclude',
432 'l10n_display' => 'defaultAsReadonly',
433 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.language',
434 'config' => array(
435 'type' => 'input',
436 'size' => 30,
437 'eval' => 'trim'
438 )
439 ),
440 'fe_groups' => array(
441 'exclude' => 1,
442 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.fe_group',
443 'config' => array(
444 'type' => 'select',
445 'renderType' => 'selectMultipleSideBySide',
446 'size' => 5,
447 'maxitems' => 20,
448 'items' => array(
449 array(
450 'LLL:EXT:lang/locallang_general.xlf:LGL.hide_at_login',
451 -1
452 ),
453 array(
454 'LLL:EXT:lang/locallang_general.xlf:LGL.any_login',
455 -2
456 ),
457 array(
458 'LLL:EXT:lang/locallang_general.xlf:LGL.usergroups',
459 '--div--'
460 )
461 ),
462 'exclusiveKeys' => '-1,-2',
463 'foreign_table' => 'fe_groups',
464 'foreign_table_where' => 'ORDER BY fe_groups.title'
465 )
466 ),
467 ),
468 );
469
470 $GLOBALS['TCA']['sys_file_metadata'] = array_replace_recursive($GLOBALS['TCA']['sys_file_metadata'], $tca);
471
472 // Add category tab if categories column is present
473 if (isset($GLOBALS['TCA']['sys_file_metadata']['columns']['categories'])) {
474 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
475 'sys_file_metadata',
476 '--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,categories'
477 );
478 }