Index: t3lib/class.t3lib_positionmap.php =================================================================== --- t3lib/class.t3lib_positionmap.php (revision 10161) +++ t3lib/class.t3lib_positionmap.php (revision ) @@ -414,7 +414,7 @@ } $GLOBALS['TYPO3_DB']->sql_free_result($res); } - return $this->printRecordMap($lines, $colPosArray); + return $this->printRecordMap($lines, $colPosArray, $pid); } /** @@ -424,33 +424,90 @@ * @param array Column position array * @return string HTML */ - function printRecordMap($lines, $colPosArray) { + function printRecordMap($lines, $colPosArray, $pid = 0) { $row1 = ''; $row2 = ''; $count = t3lib_div::intInRange(count($colPosArray), 1); + $backendLayout = t3lib_div::callUserFunction('EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getSelectedBackendLayout', $pid, $this); + if (isset($backendLayout['__config']['backend_layout.'])) { + $table = '
'; + $colCount = intval($backendLayout['__config']['backend_layout.']['colCount']); + $rowCount = intval($backendLayout['__config']['backend_layout.']['rowCount']); + + $table .= ''; + for ($i = 0; $i < $colCount; $i++) { + $table .= ''; + } + $table .= ''; + + // cycle through rows + for ($row = 1; $row <= $rowCount; $row++) { + $rowConfig = $backendLayout['__config']['backend_layout.']['rows.'][$row . '.']; + if (!isset($rowConfig)) { + continue; + } + + $table .= ''; + + for ($col = 1; $col <= $colCount; $col++) { + $columnConfig = $rowConfig['columns.'][$col . '.']; + + if (!isset($columnConfig)) { + continue; + } + + // which tt_content colPos should be displayed inside this cell + $columnKey = intval($columnConfig['colPos']); + + $head = $this->wrapColumnHeader($GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'colPos', $columnKey, $pid), 1), $columnKey); + + // render the grid cell + $table .= ''; + } + $table .= ''; + } + $table .= '
'; + + if (isset($columnConfig['colPos']) && $head) { + $table .= '
'. $head . '
' . implode('
', $lines[$columnKey]); + } else if ($columnConfig['colPos']) { + $table .= $this->wrapColumnHeader($GLOBALS['LANG']->getLL('noAccess'), '', ''); + } else { + $table .= $this->wrapColumnHeader($GLOBALS['LANG']->getLL('notAssigned'), '', ''); + } + + $table .= '
'; + } else { - // Traverse the columns here: - foreach ($colPosArray as $kk => $vv) { + // Traverse the columns here: + foreach ($colPosArray as $kk => $vv) { - $row1 .= '' . - $this->wrapColumnHeader($GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'colPos', $vv), 1), $vv) . - ''; + $row1 .= '
' . + $this->wrapColumnHeader($GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'colPos', $vv, $pid), 1), $vv) . + '
'; - $row2 .= '' . - implode('
', $lines[$kk]) . - ''; - } + $row2 .= '' . + implode('
', $lines[$kk]) . + ''; + } - $table = ' + $table = ' - - + +
- ' . $row1 . ' + ' . $row1 . ' - ' . $row2 . ' -
+ ' . $row2 . ' + - '; + '; - + } return $this->JSimgFunc('2') . $table; } Index: typo3/move_el.php =================================================================== --- typo3/move_el.php (revision 10295) +++ typo3/move_el.php (revision ) @@ -364,9 +364,12 @@ // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable: $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->page_id,'mod.SHARED'); // SHARED page-TSconfig settings. - $colPosList = strcmp(trim($modTSconfig_SHARED['properties']['colPos_list']),'') ? trim($modTSconfig_SHARED['properties']['colPos_list']) : '1,0,2,3'; + $colPosArray = t3lib_div::callUserFunction('EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getColPosListItemsParsed', $this->page_id, $this); + foreach ($colPosArray as $colPos) { + $colPosList .= $colPosList != '' ? ','.$colPos[1] : $colPos[1]; + } $colPosList = implode(',',array_unique(t3lib_div::intExplode(',',$colPosList))); // Removing duplicates, if any - + // Adding parent page-header and the content element columns from position-map: $code=$hline.'
'; $code.=$posMap->printContentElementColumns($this->page_id,$this->moveUid,$colPosList,1,$this->R_URI); Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (revision 10317) +++ t3lib/class.t3lib_befunc.php (revision ) @@ -2115,12 +2115,18 @@ * @param string items-array value to match * @return string Label for item entry */ - public static function getLabelFromItemlist($table, $col, $key) { + public static function getLabelFromItemlist($table, $col, $key, $pid = 0) { global $TCA; // Load full TCA for $table t3lib_div::loadTCA($table); + $row['pid'] = $pid; + + if (isset($TCA[$table]['columns'][$col]['config']['itemsProcFunc'])) { + $TCA[$table]['columns'][$col]['config']['items'] = t3lib_TCEforms::procItems($TCA[$table]['columns'][$col]['config']['items'], $TCA[$table]['columns'][$col]['config']['itemsProcFunc'], $TCA[$table]['columns'][$col]['config'], $table, $row, $field); + } + - // Check, if there is an "items" array: + // Check, if there is an "items" array: if (is_array($TCA[$table]) && is_array($TCA[$table]['columns'][$col]) && is_array($TCA[$table]['columns'][$col]['config']['items'])) { // Traverse the items-array... foreach ($TCA[$table]['columns'][$col]['config']['items'] as $k => $v) { Index: typo3/sysext/cms/layout/class.tx_cms_layout.php =================================================================== --- typo3/sysext/cms/layout/class.tx_cms_layout.php (revision 10341) +++ typo3/sysext/cms/layout/class.tx_cms_layout.php (revision ) @@ -586,7 +586,7 @@ $parser = t3lib_div::makeInstance('t3lib_TSparser'); $parser->parse($backendLayoutRecord['config']); - $grid .= '
'; + $grid = '
'; // add colgroups $colCount = intval($parser->setup['backend_layout.']['colCount']);