[TASK] Streamline FAL metadata properties 14/44214/4
authorXavier Perseguers <xavier@typo3.org>
Thu, 22 Oct 2015 09:07:01 +0000 (11:07 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Thu, 22 Oct 2015 11:56:53 +0000 (13:56 +0200)
In an attempt to better organize metadata properties of assets
in TYPO3, this patch reorganizes the existing fields according
to standards in editing softwares.

- Alternative Text is meant for accessibility and should be
  a single line of text
- Caption and download name are accessibility fields and are
  better grouped with Alternative Text in a dedicated palette
- Creator Tool, Publisher, Source and Copyright do not belong
  to a combined palette and should be standard separate fields
- Keywords are stored as text and the user interface should
  reflect the possibility to enter more than one line of content

Resolves: #70941
Releases: master
Change-Id: I2a80940dc40ae6b79c3c5ada86cbc02df5cbda74
Reviewed-on: https://review.typo3.org/44214
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/core/Configuration/TCA/sys_file_metadata.php
typo3/sysext/filemetadata/Configuration/TCA/Overrides/sys_file_metadata.php
typo3/sysext/filemetadata/Resources/Private/Language/locallang_tca.xlf

index b825cb9..495caab 100644 (file)
@@ -119,9 +119,8 @@ return array(
             'exclude' => 0,
             'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file.alternative',
             'config' => array(
-                'type' => 'text',
-                'cols' => '40',
-                'rows' => '3'
+                'type' => 'input',
+                'size' => '30',
             )
         ),
         'width' => array(
index b645535..f540179 100644 (file)
@@ -8,70 +8,76 @@ $tca = array(
     'types' => array(
         TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => array(
             'showitem' => '
-                               fileinfo, title, description, alternative, keywords, caption, download_name,
+                               fileinfo, title, description, ranking, keywords,
+                                   --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
                                --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
-                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10 ,
+                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
                                        fe_groups,
                                --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
-                                       creator, --palette--;;20,
+                                       creator, creator_tool, publisher, source, copyright,
                                        --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40
                        ',
         ),
         TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
             'showitem' => '
-                               fileinfo, title, description, alternative, keywords, caption, download_name,
+                               fileinfo, title, description, ranking, keywords,
+                                   --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
                                --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
-                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10 ,
+                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
                                        fe_groups,
                                --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
-                                       creator, --palette--;;20,
+                                       creator, creator_tool, publisher, source, copyright,
                                        --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40,
                                        language
                        ',
         ),
         TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
             'showitem' => '
-                               fileinfo, title, description, alternative, keywords, caption, download_name,
+                               fileinfo, title, description, ranking, keywords,
+                                   --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;20,
                                --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
-                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10 ,
+                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
                                        fe_groups,
                                --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
-                                       creator, --palette--;;20,
+                                       creator, creator_tool, publisher, source, copyright,
                                        --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40,
-                                       --palette--;;30,
+                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.gps;30,
                                        --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.metrics;50
                        ',
         ),
         TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
             'showitem' => '
-                               fileinfo, title, description, alternative, keywords, caption, download_name,
+                               fileinfo, title, description, ranking, keywords,
+                                   --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
                                --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
                                        --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
                                        fe_groups,
                                --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
                                        duration,
-                                       creator, --palette--;;20, language
+                                       creator, creator_tool, publisher, source, copyright, language
                        ',
         ),
         TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
             'showitem' => '
-                               fileinfo, title, description, alternative, keywords, caption, download_name,
+                               fileinfo, title, description, ranking, keywords,
+                                   --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
                                --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
                                        --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
                                        fe_groups,
                                --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
                                        duration,
-                                       creator, --palette--;;20, language
+                                       creator, creator_tool, publisher, source, copyright, language
                        ',
         ),
         TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
             'showitem' => '
-                               fileinfo, title, description, alternative, keywords, caption, download_name,
+                               fileinfo, title, description, ranking, keywords,
+                                   --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
                                --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
                                        --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
                                        fe_groups,
                                --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
-                                       creator, --palette--;;20,
+                                       creator, creator_tool, publisher, source, copyright,
                                        --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40,
                                        language, --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.content_date;60, pages
                        ',
@@ -79,10 +85,13 @@ $tca = array(
     ),
     'palettes' => array(
         '10' => array(
-            'showitem' => 'visible, status, ranking',
+            'showitem' => 'visible, status',
         ),
         '20' => array(
-            'showitem' => 'creator_tool, publisher, source, copyright',
+            'showitem' => 'alternative, --linebreak--, caption, --linebreak--, download_name',
+        ),
+        '25' => array(
+            'showitem' => 'caption, --linebreak--, download_name',
         ),
         '30' => array(
             'showitem' => 'latitude, longitude',
@@ -137,10 +146,10 @@ $tca = array(
             'l10n_mode' => 'prefixLangTitle',
             'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.keywords',
             'config' => array(
-                'placeholder' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:placeholder.keywords',
-                'type' => 'input',
-                'size' => 255,
-                'eval' => 'trim'
+                'type' => 'text',
+                'cols' => '40',
+                'rows' => '3',
+                'placeholder' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:placeholder.keywords'
             ),
         ),
         'caption' => array(
index 5740f4c..31977a1 100644 (file)
 
                        <!-- sys_file_metadata placeholder -->
                        <trans-unit id="placeholder.keywords">
-                               <source>Keywords1, keywords2, ...</source>
+                               <source>Keyword #1, keyword #2, ...</source>
                        </trans-unit>
 
                        <!-- sys_file_metadata palette -->
                        <trans-unit id="palette.content_date">
                                <source>Content Date</source>
                        </trans-unit>
+                       <trans-unit id="palette.accessibility">
+                               <source>Accessibility</source>
+                       </trans-unit>
+                       <trans-unit id="palette.gps">
+                               <source>GPS</source>
+                       </trans-unit>
 
                        <!-- fe_groups fields -->
                        <trans-unit id="fe_groups.files">