From: Georg Ringer Date: Mon, 18 Feb 2013 16:19:35 +0000 (+0100) Subject: [TASK] Don't render table header if no files given X-Git-Tag: TYPO3_6-1-0alpha1~12 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/fffe917e8c702be0205c928b654d258f35a8dc2f?hp=f54d1efb6257421c2258f5c6b755df7e478e78f4 [TASK] Don't render table header if no files given It doesn't make sense to render the table header in the filelist module if no files are given. Change-Id: I81870bca94e63643e3f27c90efa370b0a9964337 Resolves: #45579 Releases: 6.1 Reviewed-on: https://review.typo3.org/18362 Reviewed-by: Felix Kopp Tested-by: Felix Kopp Reviewed-by: Soren Malling Tested-by: Soren Malling Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn --- diff --git a/typo3/sysext/filelist/Classes/FileList.php b/typo3/sysext/filelist/Classes/FileList.php index 98694f0170a1..7163d8022a7d 100644 --- a/typo3/sysext/filelist/Classes/FileList.php +++ b/typo3/sysext/filelist/Classes/FileList.php @@ -356,19 +356,20 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { $theData[$v] = $theT; } } - $out .= '' . $this->addelement(1, $levelUp, $theData, ' class="t3-row-header"', '') . ''; - $out .= '' . $iOut . ''; - // half line is drawn - // finish - $out = ' - + if (!empty($iOut)) { + $out .= '' . $this->addelement(1, $levelUp, $theData, ' class="t3-row-header"', '') . ''; + $out .= '' . $iOut . ''; + // half line is drawn + // finish + $out = ' ' . $out . '
'; + } } else { /** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */ $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('storageNotBrowsableMessage'), $GLOBALS['LANG']->getLL('storageNotBrowsableTitle'), \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);