diff --git a/typo3/sysext/backend/Classes/Clipboard/Clipboard.php b/typo3/sysext/backend/Classes/Clipboard/Clipboard.php index 1f4f527100103320d5cafad234e96dd8c78f6aa1..3734abf6ac5111d9059d897a55d635681460b603 100644 --- a/typo3/sysext/backend/Classes/Clipboard/Clipboard.php +++ b/typo3/sysext/backend/Classes/Clipboard/Clipboard.php @@ -416,6 +416,21 @@ class Clipboard { return $lines; } + /** + * Returns true if the clipboard contains elements + * + * @return boolean + */ + public function hasElements() { + foreach ($this->clipData as $data) { + if (is_array($data['el']) && !empty($data['el'])) { + return TRUE; + } + } + + return FALSE; + } + /** * Gets all localizations of the current record. * diff --git a/typo3/sysext/recordlist/Classes/RecordList.php b/typo3/sysext/recordlist/Classes/RecordList.php index 6a1f882f35e3cf1935efd2203c9d8e1db8e80488..f3a0b2cad92f757b5e112a0d0a367f99d02b6463 100644 --- a/typo3/sysext/recordlist/Classes/RecordList.php +++ b/typo3/sysext/recordlist/Classes/RecordList.php @@ -434,22 +434,22 @@ class RecordList { $this->body .= ' </form> </div>'; - // Printing clipboard if enabled: - if ($this->MOD_SETTINGS['clipBoard'] && $dblist->showClipboard) { - $this->body .= '<div class="db_list-dashboard">' . $dblist->clipObj->printClipboard() . '</div>'; - } - // Search box: - if (!$this->modTSconfig['properties']['disableSearchBox']) { - $sectionTitle = BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_searchbox', $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.search', TRUE)); - $this->body .= '<div class="db_list-searchbox">' . $this->doc->section($sectionTitle, $dblist->getSearchBox(), FALSE, TRUE, FALSE, TRUE) . '</div>'; - } - // Additional footer content - $footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/mod1/index.php']['drawFooterHook']; - if (is_array($footerContentHook)) { - foreach ($footerContentHook as $hook) { - $params = array(); - $this->body .= GeneralUtility::callUserFunction($hook, $params, $this); - } + } + // Printing clipboard if enabled + if ($this->MOD_SETTINGS['clipBoard'] && $dblist->showClipboard && ($dblist->HTMLcode || $dblist->clipObj->hasElements())) { + $this->body .= '<div class="db_list-dashboard">' . $dblist->clipObj->printClipboard() . '</div>'; + } + // Search box: + if (!$this->modTSconfig['properties']['disableSearchBox'] && $dblist->HTMLcode) { + $sectionTitle = BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_searchbox', $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.search', TRUE)); + $this->body .= '<div class="db_list-searchbox">' . $this->doc->section($sectionTitle, $dblist->getSearchBox(), FALSE, TRUE, FALSE, TRUE) . '</div>'; + } + // Additional footer content + $footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/mod1/index.php']['drawFooterHook']; + if (is_array($footerContentHook)) { + foreach ($footerContentHook as $hook) { + $params = array(); + $this->body .= GeneralUtility::callUserFunction($hook, $params, $this); } } // Setting up the buttons and markers for docheader