Index: typo3/class.db_list.inc =================================================================== --- typo3/class.db_list.inc (revision 4815) +++ typo3/class.db_list.inc (working copy) @@ -119,6 +119,7 @@ var $pageRecord = array(); // Loaded with page record with version overlay if any. var $hideTables = ''; // Tables which should not get listed var $tableTSconfigOverTCA = array(); //TSconfig which overwrites TCA-Settings + var $tablesCollapsed = array(); // Array of collapsed / uncollapsed tables in multi table view // Internal, dynamic: var $JScode = ''; // JavaScript code accumulation @@ -189,6 +190,20 @@ } } + // Get configuration of collapsed tables from user uc and merge with sanitized GP vars + $this->tablesCollapsed = is_array($GLOBALS['BE_USER']->uc['moduleData']['db_list.php']) ? $GLOBALS['BE_USER']->uc['moduleData']['db_list.php'] : array(); + $collapseOverride = t3lib_div::_GP('collapse'); + if (is_array($collapseOverride)) { + foreach($collapseOverride as $collapseTable => $collapseValue) { + if (is_array($GLOBALS['TCA'][$collapseTable]) && ($collapseValue == 0 || $collapseValue == 1)) { + $this->tablesCollapsed[$collapseTable] = $collapseValue; + } + } + // Save modified user uc + $GLOBALS['BE_USER']->uc['moduleData']['db_list.php'] = $this->tablesCollapsed; + $GLOBALS['BE_USER']->writeUC($GLOBALS['BE_USER']->uc); + } + if ($sL>0) { $tree = $this->getTreeObject($id,$sL,$this->perms_clause); $this->pidSelect = 'pid IN ('.implode(',',$tree->ids).')'; @@ -786,4 +801,4 @@ include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list.inc']); } -?> \ No newline at end of file +?> Index: typo3/stylesheet.css =================================================================== --- typo3/stylesheet.css (revision 4815) +++ typo3/stylesheet.css (working copy) @@ -1823,11 +1823,15 @@ width: 40px; } -table.typo3-dblist tr td.col-icon a { +table.typo3-dblist tr td.col-icon span { width: 40px; display: block; } +table.typo3-dblist tr td.col-icon img.collapseIcon { + margin: 0px 8px 0px 2px; +} + table.typo3-dblist tr td.col-title { width: 240px; overflow: hidden; Index: typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css =================================================================== --- typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css (revision 4815) +++ typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css (working copy) @@ -57,6 +57,10 @@ background-color: transparent; } +table.typo3-dblist tr td.col-icon img.collapseIcon { + margin: 3px 8px 0px 2px; +} + tr.firstcol td.col-control, tr.firstcol td.col-clipboard { border-top: 1px solid #d7d8e2; Index: typo3/sysext/lang/locallang_core.xml =================================================================== --- typo3/sysext/lang/locallang_core.xml (revision 4815) +++ typo3/sysext/lang/locallang_core.xml (working copy) @@ -21,6 +21,8 @@ + + Index: typo3/class.db_list_extra.inc =================================================================== --- typo3/class.db_list_extra.inc (revision 4815) +++ typo3/class.db_list_extra.inc (working copy) @@ -275,6 +275,7 @@ $titleCol = $TCA[$table]['ctrl']['label']; $thumbsCol = $TCA[$table]['ctrl']['thumbnail']; $l10nEnabled = $TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField'] && !$TCA[$table]['ctrl']['transOrigPointerTable']; + $tableCollapsed = (!$this->tablesCollapsed[$table]) ? FALSE : TRUE; // prepare space icon $iconWidth = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['iconSizeWidth'] ? $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['iconSizeWidth'] : 12; @@ -393,7 +394,8 @@ // If the count query returned any number of records, we perform the real query, selecting records. if ($this->totalItems) { - if ($listOnlyInSingleTableMode) { + // Fetch records only if not in single table mode or if in multi table mode and not collapsed + if ($listOnlyInSingleTableMode || (!$this->table && $tableCollapsed)) { $dbCount = $this->totalItems; } else { // set the showLimit to the number of records when outputting as CSV @@ -448,11 +450,18 @@ } } } else { + // Render collapse button if in multi table mode + $collapseIcon = ''; + if (!$this->table) { + $collapseIcon = 'backPath,'gfx/select' . ($tableCollapsed ? 'all' : 'none') . '.gif') . ' class="collapseIcon" "alt="" title="' . ($tableCollapsed ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.expandTable',1) : $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.collapseTable',1)) . '" />'; + } + // Render page up icon for page table $theUpIcon = ($table=='pages'&&$this->id&&isset($this->pageRow['pid'])) ? 'backPath,'gfx/i/pages_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />':''; - $out.=$this->addelement(1,$theUpIcon,$theData,' class="c-headLineTable"',''); + $out .= $this->addelement(1, '' . $collapseIcon . $theUpIcon . '', $theData, ' class="c-headLineTable"', ''); } - If (!$listOnlyInSingleTableMode) { + // Render table rows only if in multi table view and not collapsed or if in single table view + if (!$listOnlyInSingleTableMode && (!$tableCollapsed || $this->table)) { // Fixing a order table for sortby tables $this->currentTable = array(); $currentIdList = array(); @@ -1574,4 +1583,4 @@ include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list_extra.inc']); } -?> \ No newline at end of file +?>