[TASK] Improve rendering of plugins in page module
authorGeorg Ringer <mail@ringerge.org>
Thu, 8 Sep 2011 08:06:11 +0000 (10:06 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Tue, 13 Sep 2011 20:18:48 +0000 (22:18 +0200)
The rendering of the content element "plugin" can be highly improved
by changing just a fiew lines.

Changes:
- Remove "CODE:" when not needed
- Remove the "Insert plugin" as there is no additional information

Change-Id: I84795d537ecb15bace39d5e17cfafb5d90115a94
Resolves: #29556
Reviewed-on: http://review.typo3.org/4836
Tested-by: Soren Malling
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/cms/layout/class.tx_cms_layout.php

index ba8ddd6..bc2ed36 100755 (executable)
@@ -1585,7 +1585,8 @@ class tx_cms_layout extends recordList {
                                $lockIcon . ' ' .
                                $stat . ' ' .
                                ($langMode ? $this->languageFlag($row['sys_language_uid']) : '') . ' ' .
-                               '&nbsp;<strong>' . htmlspecialchars($this->CType_labels[$row['CType']]) . '</strong>';
+                               htmlspecialchars($this->CType_labels[$row['CType']]) .
+                               ' <strong>' . $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']), 1) . '</strong><br />';
 
                // If show info is set...;
                if ($this->tt_contentConfig['showInfo']) {
@@ -1795,8 +1796,7 @@ class tx_cms_layout extends recordList {
                                        }
                                        break;
                                case 'list':
-                                       $out .= $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content', 'list_type'), 1) . ' ' .
-                                                       $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']), 1) . '<br />';
+
                                        $hookArr = array();
                                        $hookOut = '';
                                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']])) {
@@ -1812,7 +1812,7 @@ class tx_cms_layout extends recordList {
                                        }
                                        if (strcmp($hookOut, '')) {
                                                $out .= $hookOut;
-                                       } else {
+                                       } elseif (!empty($row['select_key'])) {
                                                $out .= $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content', 'select_key'), 1) . ' ' . $row['select_key'] . '<br />';
                                        }
 
@@ -2656,4 +2656,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/cms/layout/class.tx_cms_layout.php']);
 }
 
-?>
+?>
\ No newline at end of file