diff --git a/t3lib/class.t3lib_iconworks.php b/t3lib/class.t3lib_iconworks.php
index f12c754..36fd64e 100644
--- t3lib/class.t3lib_iconworks.php
+++ t3lib/class.t3lib_iconworks.php
@@ -539,5 +539,537 @@ final class t3lib_iconWorks {
@ImageGif($im, $path);
}
}
+
+ /**************************************************************************************
+ * SPRITE ICON API
+ *
+ * The sprite icons are a completely different approach than using single file images. In order to get a
+ * icon you don't need to know anything about a file or whatever. The only thing you need to know are the
+ * css classes used. This api even helps you with that by only needing a single string name for an icon.
+ * You should always look up this "iconName" in the Skinning Manual.
+ *
+ * Example: display an icon for creating a new document/page content element
+ * Usage: t3lib_iconWorks::getSpriteIcon('actions-document-new');
+ * Result:
+ *
+ * == Common Options ==
+ *
+ * If you want to change additional options you can provide them as an config array. Some options are
+ * - 'title' (string: defaults to '') define an title for the icon [if the icon is wrapped by a link for functionality the link should get the title]
+ * - 'class' (string: defaults to '') additional css classes to add
+ * - 'row' (array: no default) data row; not added as attribute
+ * - [...] more Options are in the Advanced Section
+ *
+ * Example: new Record icon with a title tag
+ * Usage: t3lib_iconWorks::getSpriteIcon('actions-document-new', 'Create new Record');
+ * Usage: t3lib_iconWorks::getSpriteIcon('actions-document-new', array('titel' => 'Create new Record') );
+ * Result:
+ * Note: The title is a special case and can also be provided as string for the second parameter
+ *
+ * Example: new Record icon with an additional css class
+ * Usage: t3lib_iconWorks::getSpriteIcon('actions-document-new', array('class' => 'center') );
+ * Result:
+ *
+ * Example: new Record icon with an additional css class and title tag
+ * Usage: t3lib_iconWorks::getSpriteIcon('actions-document-new', array('class' => 'center', 'titel' => 'Create new Record') );
+ * Result:
+ *
+ *
+ * == Overlays ==
+ *
+ * Overlays are realised by placing two spans on top of each other. For easy usage you can just add
+ * overlays with '+'.
+ *
+ * Example: icon of a hidden page (page icon with overlay hidden)
+ * Usage: t3lib_iconWorks::getSpriteIcon('apps-pagetree-page-default+status-overlay-hidden');
+ * Result:
+ *
+ *
+ *
+ * == Files ==
+ *
+ * Icons for files are generated with a 'file:' prefix followed by the complete path or the filename.
+ *
+ * Example: icon for an image
+ * Usage: t3lib_iconWorks::getSpriteIcon('file:EXT:t3skin/icons/options.gif');
+ * Result:
+ *
+ * If you already know the fileextension or the type of the path you can use 'file::'
+ *
+ * Example: icon for a *.png file
+ * Usage: t3lib_iconWorks::getSpriteIcon('file::gif');
+ * Result:
+ * Note: The result is the same as gif and png files are mapped to the same icon
+ *
+ * Example: icon for a folder
+ * Usage: t3lib_iconWorks::getSpriteIcon('file:EXT:t3skin/icons');
+ * Usage: t3lib_iconWorks::getSpriteIcon('file:/');
+ * Usage: t3lib_iconWorks::getSpriteIcon('file::folder');
+ * Result:
+ *
+ * Example: icon for mountpoint
+ * Usage: t3lib_iconWorks::getSpriteIcon('file::mount');
+ * Result:
+ *
+ * == Table Rows ==
+ *
+ * Icons for table rows are generated with a 'row:' prefix followed by the table and an option array with 'row'
+ *
+ * Example: generate icon for current table and row
+ * Usage: t3lib_iconWorks::getSpriteIcon('row:' . $table, array('row' => $row) );
+ * Result:
+ * Note: Depending on table and row (here $table = pages; $row = Array( [doktype] => 254 [...] )
+ *
+ * If you want to have the table row overlay icon you can use 'row::' again with the option array 'row'.
+ * In order to have it automatically with the icon you can use the '+' mentioned earlier.
+ *
+ * Example: generate icon + overlay for current table and row
+ * Usage: t3lib_iconWorks::getSpriteIcon('row:' . $table . '+row::' . $table, array('row' => $row));
+ * Result:
+ *
+ * == Advanced Section ==
+ *
+ * Every string item that is in the option array for getSpriteIcon is automatically added as a html attribute. So you can add
+ * whatever valid or nonvalide html attribute. There are a few options predefined and some are not added as attribute:
+ * - 'row' (array: no default) data row; not added as attribute
+ * - 'element' (string: defaults to 'span') the html element that should be created; not added as attribute
+ * - 'html' (string: defaults to ' ') html content that should be placed inside the tag; not added as attribute
+ * - 'baseCssClass' (string: defaults to 't3-icon') change the base class for the icon type; not added as attribute
+ *
+ * Example: generate a uppercase text link to google with the external link icon
+ * Usage: t3lib_iconWorks::getSpriteIcon('apps-pagetree-page-shortcut-external', array(
+ * 'element' => 'a',
+ * 'html' => 'google',
+ * 'href' => 'http://www.google.com',
+ * 'style' => 'text-transform: uppercase'
+ * ));
+ * Result: google
+ * Note: Text options get transformed to html elements
+ *
+ * In fact you can define multiple '+' in the iconname and for each part you can define a different configuration.
+ * For this you need to use a multidimentional array. The default configuration is set to
+ * $TYPO3_CONF_VARS['BE']['iconDefaultOptions'] => array(
+ * array('element' => 'span', 'baseCssClass' => 't3-icon', 'html' => ' '),
+ * array('element' => 'span', 'baseCssClass' => 't3-icon', 'html' => ' ', 'class' => 't3-icon-overlay')
+ * )
+ * so if you want more then two level you will have to define that in your config. However this is very unlikely.
+ *
+ * Example: link to google with external icon and overlay hidden - some text in the span
+ * Usage: t3lib_iconWorks::getSpriteIcon('apps-pagetree-page-shortcut-external+status-overlay-hidden', array(
+ * array('element' => 'a', 'href' => 'http://www.google.com'),
+ * array('html' => 'V')
+ * ));
+ * Result:
+ * V
+ *
+ *
+ * == Overlays ==
+ *
+ * This system is supposed to be only used with one overlay. The graphical icon guideline shows that subtypes of icons
+ * are defined through a overlay in the right bottom corner. The left bottom area is then used to show the most important
+ * state of the icon (just one). If the element has more than one state it will be displayed on hover currently just with
+ * text in the title tag - hopefully in the future with with some javascript overlay containing icons.
+ * In order to select the most important state there is a priority list at
+ * $TYPO3_CONF_VARS['BE']['iconOverlayPriorities'] => array('hidden', 'starttime', 'endtime', 'fe_group', 'protectSection', 'futuretiming')
+ * As multiple states may have the same icon and the state name is not compatible with the css there is a mapping array at
+ * $TYPO3_CONF_VARS['BE']['iconOverlayMapping'] =
+ * 'hidden' => 'status-overlay-hidden',
+ * 'fe_group' => 'status-overlay-access-restricted',
+ * 'starttime' => 'status-overlay-scheduled',
+ * 'endtime' => 'status-overlay-scheduled',
+ * 'futuretiming' => 'status-overlay-scheduled',
+ * 'readonly' => 'status-overlay-locked',
+ * 'deleted' => 'status-overlay-deleted',
+ * 'missing' => 'status-overlay-missing',
+ * 'translated' => 'status-overlay-translated',
+ * 'protectedSection' => 'status-overlay-includes-subpages',
+ * )
+ *
+ * == Table Row Icons ==
+ *
+ * In order to generate a proper iconname for table rows you need to add the following configuration for you table.
+ * This is an example for the table pages:
+ * $TCA['pages']['typeicon_classes'] = array(
+ * '1' => 'apps-pagetree-page-default',
+ * '3' => 'apps-pagetree-page-shortcut-external',
+ * '255' => 'actions-edit-deleted',
+ * ...
+ * )
+ * The array can be anything (doesn't need to be a number) it depends an $TCA['pages']['typeicon_column']
+ * Another example from tt_content:
+ * $TCA['tt_content']['typeicon_classes'] = array(
+ * 'header' => 'mimetypes-x-content-header',
+ * 'textpic' => 'mimetypes-x-content-text-picture',
+ * 'image' => 'mimetypes-x-content-image',
+ * ...
+ * )
+ *
+ */
+
+
+ /**
+ * Generates a span tag with proper css classes so it's an icon with possible overlay
+ *
+ * @author Thomas Allmer
+ * @param string iconname will be passed to getSpriteIconClasses (see it options); can be multilevel by separation with '+'
+ * @param string an single- or multilevel options array [options are: baseCssClass, title, class, row]
+ * @param integer what option pass should be used
+ * @return string full tag with css classes
+ *
+ */
+ public static function getSpriteIcon($name, $overrideOptions = array(), $pass = 0) {
+ // get proper options
+ $fullOptions = $GLOBALS['TYPO3_CONF_VARS']['BE']['iconDefaultOptions'];
+ $options = $fullOptions[$pass];
+ if (is_string($overrideOptions)) {
+ // option is a string -> set the title
+ $options['title'] = $overrideOptions;
+ } else if (is_array($overrideOptions) && !is_array($overrideOptions[$pass])) {
+ // options is an array -> merge it
+ $options = array_merge($options, $overrideOptions);
+ } else {
+ // options is a multidimentional array -> merge with local options; merge with full options
+ $options = array_merge($options, $overrideOptions[$pass]);
+ $fullOptions = t3lib_div::array_merge_recursive_overrule($fullOptions, $overrideOptions);
+ }
+ // row get's passed on to as we don't want to define this every time
+ $fullOptions[$pass+1]['row'] = $options['row'];
+
+ // if the $name contains a '+' it uses multilevel, so get recursive configuration and content
+ $parts = explode('+', $name);
+ $subpart = '';
+ if (count($parts) >= 2) {
+ $name = $parts[0];
+ $subpart = self::getSpriteIcon($parts[1], $fullOptions, $pass+1);
+ }
+ if ($subpart !== '') {
+ $options['html'] = ($options['html'] === ' ') ? $subpart : $options['html'] . $subpart;
+ }
+
+ // if we actually get css classes create the html element according to the options
+ if ($classes = self::getSpriteIconClasses($name, $options)) {
+ $options['class'] = (!$options['class']) ? $classes : $classes . ' ' . $options['class'];
+ $elementOptions = '';
+ // add every string option as a html attribute (with some exception)
+ foreach ($options as $key => $option) {
+ if (is_string($option) && $option !== '' && $key !== 'html' && $key !== 'element' && $key !== 'baseCssClass') {
+ $elementOptions .= $key . '="' . $option . '" ';
+ }
+ }
+ return '<' . $options['element'] . ' ' . $elementOptions . '>' . $options['html'] . '' . $options['element'] . '>';
+ }
+
+ return '';
+ }
+
+ /**
+ * Generates the css classes as a string needed for an icon
+ *
+ * @author Thomas Allmer
+ * @param string iconname like 'actions-document-new' || filepath like 'file:' || database like 'row:' (give row in options)
+ * @param array options like baseCssClass, row
+ * @return string all css classes needed for the icon
+ *
+ */
+ public static function getSpriteIconClasses($name, $overrideOptions = array()) {
+ $options = array('baseCssClass' => 't3-icon');
+ if (is_string($overrideOptions)) {
+ $options['baseCssClass'] = $overrideOptions;
+ } else {
+ $options = array_merge($options, $overrideOptions);
+ }
+
+ if (substr($name, 0, 5) === 'file:') {
+ if (substr($name, 0, 6) === 'file::') {
+ return self::getFileIconClasses('', substr($name, 6));
+ }
+ return self::getFileIconClasses(substr($name, 5));
+ }
+ if (substr($name, 0, 4) === 'row:') {
+ if (substr($name, 0, 5) === 'row::') {
+ return self::getRowIconOverlayClasses(substr($name, 5), $options['row']);
+ }
+ return self::getRowIconClasses(substr($name, 4), $options['row']);
+ }
+
+ $parts = explode('-', $name);
+ $class = substr($name, strlen($parts[0]) + 1);
+
+ if (count($parts) > 1) {
+ return $options['baseCssClass'] . ' ' . $options['baseCssClass'] . '-' . $parts[0] . '-' . $parts[1] . ' ' . $options['baseCssClass'] . '-' . $class;
+ }
+
+ return '';
+ }
+
+ /**
+ * Generates the css classes needed for an icon of a row
+ *
+ * @param string table name of the row
+ * @param string data row
+ * @return string css classnames
+ *
+ */
+ public static function getRowIconClasses($table, $row) {
+ return self::getSpriteIconClasses(self::getRowIconString($table, $row));
+ }
+
+ /**
+ * Generates the IconStringName for a given tablerow
+ *
+ * @param string table name of the row
+ * @param string data row
+ * @return string iconstring
+ *
+ */
+ public static function getRowIconString($table, $row) {
+ global $TCA;
+ $column = $TCA[$table]['ctrl']['typeicon_column'];
+ // workaround to give nav_hide pages a complete different icon although it's not a separate doctype
+ if ($table === 'pages' && $row['nav_hide']) {
+ $row[$column] = 'nav_hide';
+ }
+
+ $rowIconString = $TCA[$table]['ctrl']['typeicon_classes'][$row[$column]];
+ return ($rowIconString) ? $rowIconString : 'status-status-icon-missing';
+ }
+
+ /**
+ * Generates the css classes needed for an iconoverlay of a row
+ *
+ * @param string table name of the row
+ * @param string data row
+ * @return string css classnames
+ *
+ */
+ public static function getRowIconStatus($table, $row, $priorities = NULL, $count = 1) {
+ $statuses = self::getRowIconStatusUnprioritized($table, $row);
+ $priorities = ($priorities) ? $priorities : $GLOBALS['TYPO3_CONF_VARS']['BE']['iconOverlayPriorities'];
+
+ return self::getStatusWithHighestPriority($statuses, $priorities, $count);
+ }
+
+ /**
+ * Calculate for a given record the actual visibility at the moment
+ * (this code is moved out of getIcon and refactored a bit)
+ *
+ * @param string table name of the row
+ * @param array table row record
+ * @return array full status of a row
+ */
+ private static function getRowIconStatusUnprioritized($table, $row) {
+ global $TCA, $PAGES_TYPES, $ICON_TYPES;
+
+ $status = array(
+ 'hidden' => false,
+ 'starttime' => false,
+ 'endtime' => false,
+ 'futureendtime' => false,
+ 'fe_group' => false,
+ 'deleted' => false,
+ 'protectSection' => false,
+ 'nav_hide' => $row['nav_hide'] ? true : false,
+ 'noIconFound' => $row['_NO_ICON_FOUND'] ? true : false,
+ );
+
+ // Icon state based on "enableFields":
+ if (is_array($TCA[$table]['ctrl']['enablecolumns'])) {
+ $enCols = $TCA[$table]['ctrl']['enablecolumns'];
+ // If "hidden" is enabled:
+ if ($enCols['disabled']) { if ($row[$enCols['disabled']]) { $status['hidden'] = TRUE; }}
+ // If a "starttime" is set and higher than current time:
+ if ($enCols['starttime']) {
+ if ($GLOBALS['EXEC_TIME'] < intval($row[$enCols['starttime']])) {
+ $status['starttime'] = TRUE;
+ }
+ }
+
+ // If an "endtime" is set:
+ if ($enCols['endtime']) {
+ if (intval($row[$enCols['endtime']]) > 0) {
+ if (intval($row[$enCols['endtime']]) < $GLOBALS['EXEC_TIME']) {
+ $status['endtime'] = TRUE; // End-timing applies at this point.
+ } else {
+ $status['futureendtime'] = TRUE; // End-timing WILL apply in the future for this element.
+ }
+ }
+ }
+ // If a user-group field is set:
+ if ($enCols['fe_group']) {
+ $status['fe_group'] = $row[$enCols['fe_group']];
+ if ($status['fe_group'] && $status['doNotRenderUserGroupNumber']) {
+ $status['fe_group'] = 100; // Limit for user number rendering!
+ }
+ }
+ }
+
+ // If "deleted" flag is set (only when listing records which are also deleted!)
+ if ($col = $row[$TCA[$table]['ctrl']['delete']]) {
+ $status['deleted'] = TRUE;
+ }
+
+ // Detecting extendToSubpages (for pages only)
+ if ($table == 'pages' && $row['extendToSubpages'] && ($status['hidden'] || $status['starttime'] || $status['endtime'] || $status['futuretiming'] || $status['fe_group'])) {
+ $status['protectSection'] = TRUE;
+ }
+
+ return $status;
+ }
+
+ /**
+ * Will get the first status repespecting the configured prefered statuses
+ * (so if start and hidden is set, hidden will be returned)
+ *
+ * @param array list of statuses
+ * @param string user defined priorites
+ * @param integer number of items, should be always 1 because the skins are only prepared for one overlay
+ * @return array list of at most $count ordered statuses
+ */
+ private static function getStatusWithHighestPriority($statuses, $priorities = NULL, $count = 1) {
+ if (!is_array($statuses)) return array();
+
+ $returnStatuses = array();
+ $priorities = $priorities ? $priorities : $GLOBALS['TYPO3_CONF_VARS']['BE']['iconOverlayPriorities'];
+
+ foreach ($priorities as $priority) {
+ if ($statuses[$priority]) {
+ $returnStatuses[] = $priority;
+ if (--$count <= 0) {
+ return $returnStatuses;
+ }
+ }
+ }
+
+ return array();
+ }
+
+ /**
+ * Generates the css classes needed for an iconoverlay of a row
+ *
+ * @param string table name of the row
+ * @param string data row
+ * @return string css classnames
+ *
+ */
+ public static function getRowIconOverlayClasses($table, $row) {
+ return self::getSpriteIconClasses(self::getRowIconOverlayString($table, $row));
+ }
+
+ /**
+ * Generates the css classes neede for a given path
+ *
+ * @param string table name of the row
+ * @param string data row
+ * @return string iconstring
+ *
+ */
+ public static function getRowIconOverlayString($table, $row) {
+ $status = self::getRowIconStatus($table, $row);
+ return $GLOBALS['TYPO3_CONF_VARS']['BE']['iconOverlayMapping'][$status[0]];
+ }
+
+ /**
+ * Generates the css classes neede for a given path
+ *
+ * @param string $path - give the full path to the file
+ * @param string $fileExtension - manually define the extension, saves some checks; can also be 'mount' or 'folder'
+ * @return string all css classes needed for the icon
+ *
+ */
+ public static function getFileIconClasses($path, $fileExtension = NULL) {
+ return self::getSpriteIconClasses(self::getFileIconString($path, $fileExtension));
+ }
+
+ /**
+ * Generates the css classes neede for a given path
+ *
+ * @param string path to a file or filename (fileExtension will be extracted)
+ * @param string manually define the fileExtension, saves some checks; can also be 'mount' or 'folder'
+ * @return string iconstring
+ *
+ */
+ public static function getFileIconString($path, $fileExtension = NULL) {
+ // if no fileExtension is set try to find it out
+ if (!$fileExtension) {
+ $filePath = dirname(t3lib_div::getIndpEnv('SCRIPT_FILENAME')) . '/' . $GLOBALS['BACK_PATH'] . $path;
+ $path = t3lib_div::resolveBackPath($filePath);
+ if (is_dir($path)) {
+ $fileExtension = 'folder';
+ } else {
+ $pos = strrpos($path, '.');
+ if ($pos !== false) {
+ $fileExtension = substr($path, $pos+1);
+ } else {
+ if (substr($path, -1) === '/' || substr($path, -1) === '\\') {
+ $fileExtension = 'folder';
+ }
+ $fileExtension = 'default';
+ }
+ }
+ }
+
+ if (!self::$fileIconClasses[$fileExtension]) {
+ $fileExtension = 'default';
+ }
+ return self::$fileIconClasses[$fileExtension];
+ }
+
+ public static $fileIconClasses = array(
+ 'htm' => 'mimetype-text-htm',
+ 'html' => 'mimetype-text-htm',
+ 'css' => 'mimetype-text-css',
+ 'js' => 'mimetype-text-js',
+ 'csv' => 'mimetype-text-csv',
+ 'xml' => 'mimetype-text-xml',
+ 'php' => 'mimetype-text-php',
+ 'php6' => 'mimetype-text-php',
+ 'php5' => 'mimetype-text-php',
+ 'php4' => 'mimetype-text-php',
+ 'php3' => 'mimetype-text-php',
+ 'inc' => 'mimetype-text-php',
+ 'ts' => 'mimetype-text-ts',
+ 'txt' => 'mimetype-text-text',
+ 'class' => 'mimetype-text-text',
+ 'tmpl' => 'mimetype-text-text',
+ 'jpg' => 'mimetype-media-image-jpg',
+ 'jpeg' => 'mimetype-media-image-jpg',
+ 'gif' => 'mimetype-media-image-gif',
+ 'png' => 'mimetype-media-image-png',
+ 'bmp' => 'mimetype-media-image-bmp',
+ 'tif' => 'mimetype-media-image',
+ 'tga' => 'mimetype-media-image',
+ 'psd' => 'mimetype-media-image',
+ 'eps' => 'mimetype-media-image',
+ 'avi' => 'mimetype-media-video-avi',
+ 'mpg' => 'mimetype-media-video',
+ 'mpeg' => 'mimetype-media-video',
+ 'mov' => 'mimetype-media-video',
+ 'wav' => 'mimetype-media-audio',
+ 'mp3' => 'mimetype-media-audio',
+ 'mid' => 'mimetype-media-audio',
+ 'swf' => 'mimetype-media-flash',
+ 'swa' => 'mimetype-media-flash',
+ 'exe' => 'mimetype-executable-executable',
+ 'com' => 'mimetype-executable-executable',
+ 't3x' => 'mimetype-compressed-t3x',
+ 't3d' => 'mimetype-compressed-t3d',
+ 'zip' => 'mimetype-compressed-compressed',
+ 'tgz' => 'mimetype-compressed-compressed',
+ 'gz' => 'mimetype-compressed-compressed',
+ 'pdf' => 'mimetype-word-pdf',
+ 'doc' => 'mimetype-word-word',
+ 'sxw' => 'mimetype-word-word',
+ 'rtf' => 'mimetype-word-word',
+ 'xls' => 'mimetype-spreadsheet-spreadsheet',
+ 'sxc' => 'mimetype-spreadsheet-spreadsheet',
+ 'ttf' => 'mimetype-font-font',
+ 'ppt' => 'mimetype-presentation-presentation',
+ 'mount' => 'apps-filetree-mount',
+ 'folder' => 'apps-filetree-folder-default',
+ 'default' => 'mimetype-other-other'
+ );
+
}
?>
diff --git a/t3lib/config_default.php b/t3lib/config_default.php
index 1376a90..1c32f8d 100644
--- t3lib/config_default.php
+++ t3lib/config_default.php
@@ -285,6 +285,24 @@ $TYPO3_CONF_VARS = array(
),
'ExtDirect' => array(), // array of key value pairs (provider -> location:className) that holds the classes for the ExtDirect functionality
'XCLASS' => array(), // See 'Inside TYPO3' document for more information.
+ 'iconDefaultOptions' => array(
+ array('element' => 'span', 'baseCssClass' => 't3-icon', 'html' => ' '),
+ array('element' => 'span', 'baseCssClass' => 't3-icon', 'html' => ' ', 'class' => 't3-icon-overlay')
+ ),
+ 'iconOverlayPriorities' => array('hidden', 'starttime', 'endtime', 'fe_group', 'protectSection', 'futuretiming'),
+ 'iconOverlayMapping' => array(
+ 'hidden' => 'status-overlay-hidden',
+ 'fe_group' => 'status-overlay-access-restricted',
+ 'starttime' => 'status-overlay-scheduled',
+ 'endtime' => 'status-overlay-scheduled',
+ 'futuretiming' => 'status-overlay-scheduled',
+ 'readonly' => 'status-overlay-locked',
+ 'deleted' => 'status-overlay-deleted',
+ 'missing' => 'status-overlay-missing',
+ 'translated' => 'status-overlay-translated',
+ 'protectedSection' => 'status-overlay-includes-subpages',
+ ),
+
),
'FE' => array( // Configuration for the TypoScript frontend (FE). Nothing here relates to the administration backend!
'png_to_gif' => FALSE, // Boolean. Enables conversion back to gif of all png-files generated in the frontend libraries. Notice that this leaves an increased number of temporary files in typo3temp/
diff --git a/t3lib/stddb/tables.php b/t3lib/stddb/tables.php
index b7939ba..ba123f2 100644
--- t3lib/stddb/tables.php
+++ t3lib/stddb/tables.php
@@ -147,7 +147,24 @@ $TCA['pages'] = array(
'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
'cruser_id' => 'cruser_id',
'editlock' => 'editlock',
- 'useColumnsForDefaultValues' => 'doktype'
+ 'useColumnsForDefaultValues' => 'doktype',
+ 'typeicon_column' => 'doktype',
+ 'typeicon_classes' => array(
+ '1' => 'apps-pagetree-page-default',
+ '3' => 'apps-pagetree-page-shortcut-external',
+ '4' => 'apps-pagetree-page-shortcut',
+ '6' => 'apps-pagetree-page-backend-user',
+ '7' => 'apps-pagetree-page-mountpoint',
+ '199' => 'apps-pagetree-spacer',
+ '254' => 'apps-pagetree-folder-default',
+ '255' => 'actions-edit-deleted',
+ 'nav_hide' => 'apps-pagetree-page-not-in-menu'
+ ),
+ 'typeicons' => array(
+ '1' => 'pages.gif',
+ '254' => 'sysf.gif',
+ '255' => 'recycler.gif'
+ )
),
'interface' => array(
'showRecordFieldList' => 'doktype,title',
@@ -499,7 +516,4 @@ $FILEICONS = array(
'default' => 'default.gif'
);
-
-
-
?>
diff --git a/typo3/sysext/cms/ext_tables.php b/typo3/sysext/cms/ext_tables.php
index 7d00c1c..fc23a07 100755
--- typo3/sysext/cms/ext_tables.php
+++ typo3/sysext/cms/ext_tables.php
@@ -675,6 +675,27 @@ $TCA['tt_content'] = array (
'fe_group' => 'fe_group',
),
'typeicon_column' => 'CType',
+ 'typeicon_classes' => array( //@TODO: define all mimetypes for tt_content (missing splash, uploads, search...)
+ 'header' => 'mimetypes-x-content-header',
+ 'textpic' => 'mimetypes-x-content-text-picture',
+ 'image' => 'mimetypes-x-content-image',
+ 'bullets' => 'mimetypes-x-content-list-bullets',
+ 'table' => 'mimetypes-x-content-table',
+ 'splash' => 'mimetypes-x-content',
+ 'uploads' => 'mimetypes-x-content',
+ 'multimedia' => 'mimetypes-x-content-multimedia',
+ 'media' => 'mimetypes-x-content-multimedia',
+ 'menu' => 'mimetypes-x-content-menu',
+ 'list' => 'mimetypes-x-content-plugin',
+ 'mailform' => 'mimetypes-x-content-form',
+ 'search' => 'mimetypes-x-content',
+ 'login' => 'mimetypes-x-content-login',
+ 'shortcut' => 'mimetypes-x-content-link',
+ 'script' => 'mimetypes-x-content-script',
+ 'div' => 'mimetypes-x-content-divider',
+ 'html' => 'mimetypes-x-content-html',
+ 'text' => 'mimetypes-x-content-text'
+ ),
'typeicons' => array (
'header' => 'tt_content_header.gif',
'textpic' => 'tt_content_textpic.gif',
@@ -825,6 +846,10 @@ $TCA['sys_template'] = array (
'endtime' => 'endtime'
),
'typeicon_column' => 'root',
+ 'typeicon_classes' => array(
+ '0' => 'actions-template-new', //@TODO: +ext maybe different icon; or move it to mimetypes?
+ '1' => 'mimetypes-x-content-template'
+ ),
'typeicons' => array (
'0' => 'template_add.gif'
),