[BUGFIX] Search box list module not shown 73/29873/2
authorFrans Saris <franssaris@gmail.com>
Mon, 5 May 2014 15:21:05 +0000 (17:21 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Mon, 5 May 2014 16:26:27 +0000 (18:26 +0200)
The search box at the bottom of the BE List module
disappears when you search for something and there
are no records found.

This patch makes sure the search box is also shown
when a search was done.

Resolves: #58526
Releases: 6.2
Change-Id: I95385bbdd988c4fb036d8bdc0c6b30638020a1cc
Reviewed-on: https://review.typo3.org/29873
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/recordlist/Classes/RecordList.php

index f3a0b2c..ba4075c 100644 (file)
@@ -435,12 +435,12 @@ class RecordList {
                                                </form>
                                        </div>';
                }
-               // Printing clipboard if enabled 
+               // 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) {
+               if (!$this->modTSconfig['properties']['disableSearchBox'] && ($dblist->HTMLcode || $dblist->searchString !== '')) {
                        $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>';
                }