8561 Checkboxes and labels are aligned badly if in one line
[Packages/TYPO3.CMS.git] / typo3 / class.db_list_extra.inc
index 1d17371..f6813de 100755 (executable)
@@ -2,7 +2,7 @@
 /*************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2007 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -100,8 +100,9 @@ class localRecordList extends recordList {
        var $noControlPanels = FALSE;                   // If true, will DISABLE all control panels in lists. (Takes precedence)
        var $clickMenuEnabled = TRUE;                   // If true, clickmenus will be rendered
 
+       var $totalRowCount;                                             // count of record rows in view
 
-
+       var $spaceIcon;                                                 // space icon used for alignment
 
                // Internal:
        var $pageRow=array();                                   // Set to the page record (see writeTop())
@@ -124,19 +125,19 @@ class localRecordList extends recordList {
         * @return      array   all available buttons as an assoc. array
         */
        public function getButtons()    {
-               global $LANG;   
-               
+               global $LANG;
+
                $buttons = array(
-                       'csh' => '', 
-                       'view' => '', 
-                       'edit' => '', 
-                       'hide_unhide' => '', 
-                       'move' => '', 
+                       'csh' => '',
+                       'view' => '',
+                       'edit' => '',
+                       'hide_unhide' => '',
+                       'move' => '',
                        'new_record' => '',
                        'paste' => '',
-                       'level_up' => '', 
-                       'cache' => '', 
-                       'reload' => '', 
+                       'level_up' => '',
+                       'cache' => '',
+                       'reload' => '',
                        'shortcut' => '',
                        'back' => '',
                        'csv' => '',
@@ -145,38 +146,38 @@ class localRecordList extends recordList {
 
                        // Get users permissions for this page record:
                $localCalcPerms = $GLOBALS['BE_USER']->calcPerms($this->pageRow);
-       
+
                        // CSH
                if (!strlen($this->id)) {
-                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_noId', $GLOBALS['BACK_PATH']);
+                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_noId', $GLOBALS['BACK_PATH'], '', TRUE);
                } elseif(!$this->id) {
-                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_root', $GLOBALS['BACK_PATH']);
+                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_root', $GLOBALS['BACK_PATH'], '', TRUE);
                } else {
-                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module', $GLOBALS['BACK_PATH']);
+                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module', $GLOBALS['BACK_PATH'], '', TRUE);
                }
-               
+
                if (isset($this->id)) {
                                // View
                        $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->id, $this->backPath, t3lib_BEfunc::BEgetRootLine($this->id))) . '">' .
                                                        '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/zoom.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" alt="" />' .
                                                        '</a>';
-                       
+
                                // New record
                        if (!$GLOBALS['SOBE']->modTSconfig['properties']['noCreateRecordsLink']) {
                                $buttons['new_record'] = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $this->backPath . 'db_new.php?id=' . $this->id . '\');') . '">' .
                                                                '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/new_el.gif') . ' title="' . $LANG->getLL('newRecordGeneral', 1) . '" alt="" />' .
                                                                '</a>';
                        }
-                                               
+
                                // If edit permissions are set (see class.t3lib_userauthgroup.php)
-                       if ($localCalcPerms&2 && !empty($this->id))     {               
-                       
+                       if ($localCalcPerms&2 && !empty($this->id))     {
+
                                        // Edit
                                $params = '&edit[pages][' . $this->pageRow['uid'] . ']=edit';
                                $buttons['edit'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->backPath, -1)) . '">' .
                                                                '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/edit2.gif') . ' title="' . $LANG->getLL('editPage', 1) . '" alt="" />' .
                                                                '</a>';
-                                       // Unhide               
+                                       // Unhide
                                if ($this->pageRow['hidden'])   {
                                        $params = '&data[pages][' . $this->pageRow['uid'] . '][hidden]=0';
                                        $buttons['hide_unhide'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' .
@@ -189,20 +190,20 @@ class localRecordList extends recordList {
                                                                        '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_hide.gif') . ' title="' . $LANG->getLL('hidePage', 1) . '" alt="" />' .
                                                                        '</a>';
                                }
-                               
+
                                        // Move
                                $buttons['move'] = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $this->backPath . 'move_el.php?table=pages&uid=' . $this->pageRow['uid'] . '\');') . '">' .
                                                                '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/move_' . ($this->table == 'tt_content' ? 'record' : 'page') . '.gif') . ' title="' . $LANG->getLL('move_page', 1) . '" alt="" />' .
                                                                '</a>';
-                                                               
+
                                        // Up one level
                                $buttons['level_up'] = '<a href="' . htmlspecialchars($this->listURL($this->pageRow['pid'])) . '" onclick="setHighlight(' . $this->pageRow['pid'] . ')">' .
                                                        '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/pages_up.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel', 1) . '" alt="" />' .
                                                        '</a>';
 
                        }
-                               
-                       
+
+
                                // Paste
                        if (($localCalcPerms&8) || ($localCalcPerms&16)) {
                                $elFromTable = $this->clipObj->elFromTable('');
@@ -212,38 +213,38 @@ class localRecordList extends recordList {
                                                                        '</a>';
                                }
                        }
-       
+
                                // Cache
                        $buttons['cache'] = '<a href="' . htmlspecialchars($this->listURL() . '&clear_cache=1') . '">' .
                                                        '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/clear_cache.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.clear_cache', 1) . '" alt="" />' .
                                                        '</a>';
-       
+
                        if ($this->table) {
-                               
+
                                        // CSV
                                $buttons['csv'] = '<a href="' . htmlspecialchars($this->listURL() . '&csv=1') . '">' .
                                                                '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/csv.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.csv', 1) . '" alt="" />' .
                                                                '</a>';
-                                                               
+
                                        // Export
                                if (t3lib_extMgm::isLoaded('impexp')) {
                                        $buttons['export'] = '<a href="' . htmlspecialchars($this->backPath. 'mod.php?M=xMOD_tximpexp&tx_impexp[action]=export&tx_impexp[list][]=' . rawurlencode($this->table . ':' . $this->id)) . '">' .
                                                                        '<img' . t3lib_iconWorks::skinImg($this->backPath, t3lib_extMgm::extRelPath('impexp') . 'export.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.export', 1) . '" alt="" />' .
                                                                        '</a>';
                                }
-                               
+
                        }
-       
+
                                // Reload
                        $buttons['reload'] = '<a href="' . htmlspecialchars($this->listURL()) . '">' .
                                                        '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/refresh_n.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.reload', 1) . '" alt="" />' .
                                                        '</a>';
-                                                       
+
                                // Shortcut
                        if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
                                $buttons['shortcut'] = $GLOBALS['TBE_TEMPLATE']->makeShortcutIcon('id, imagemode, pointer, table, search_field, search_levels, showLimit, sortField, sortRev', implode(',', array_keys($this->MOD_MENU)), 'web_list');
                        }
-                       
+
                                // Back
                        if ($this->returnUrl) {
                                $buttons['back'] = '<a href="' . htmlspecialchars(t3lib_div::linkThisUrl($this->returnUrl, array('id' => $this->id))) . '" class="typo3-goBack">' .
@@ -275,30 +276,43 @@ class localRecordList extends recordList {
                $thumbsCol = $TCA[$table]['ctrl']['thumbnail'];
                $l10nEnabled = $TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField'] && !$TCA[$table]['ctrl']['transOrigPointerTable'];
 
+                       // prepare space icon
+               $iconWidth  = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['iconSizeWidth']  ? $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['iconSizeWidth']  : 12;
+               $iconHeight = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['iconSizeHeight'] ? $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['iconSizeHeight'] : 12;
+               $this->spaceIcon = '<img src="' . $this->backPath . 'clear.gif" width="' . $iconWidth . '" height="' . $iconHeight . '" title="" alt="" />';
+
                        // Cleaning rowlist for duplicates and place the $titleCol as the first column always!
                $this->fieldArray=array();
+                       // title Column
                $this->fieldArray[] = $titleCol;        // Add title column
-               if ($this->localizationView && $l10nEnabled)    {
-                       $this->fieldArray[] = '_LOCALIZATION_';
-                       $this->fieldArray[] = '_LOCALIZATION_b';
-                       $addWhere.=' AND (
-                               '.$TCA[$table]['ctrl']['languageField'].'<=0
-                               OR
-                               '.$TCA[$table]['ctrl']['transOrigPointerField'].' = 0
-                       )';
-               }
+                       // Control-Panel
                if (!t3lib_div::inList($rowlist,'_CONTROL_'))   {
                        $this->fieldArray[] = '_CONTROL_';
+                       $this->fieldArray[] = '_AFTERCONTROL_';
                }
+                       // Clipboard
                if ($this->showClipboard)       {
                        $this->fieldArray[] = '_CLIPBOARD_';
                }
+                       // Ref
                if (!$this->dontShowClipControlPanels)  {
                        $this->fieldArray[]='_REF_';
+                       $this->fieldArray[]='_AFTERREF_';
                }
+                       // Path
                if ($this->searchLevels)        {
                        $this->fieldArray[]='_PATH_';
                }
+                       // Localization
+               if ($this->localizationView && $l10nEnabled)    {
+                       $this->fieldArray[] = '_LOCALIZATION_';
+                       $this->fieldArray[] = '_LOCALIZATION_b';
+                       $addWhere.=' AND (
+                               '.$TCA[$table]['ctrl']['languageField'].'<=0
+                               OR
+                               '.$TCA[$table]['ctrl']['transOrigPointerField'].' = 0
+                       )';
+               }
                        // Cleaning up:
                $this->fieldArray=array_unique(array_merge($this->fieldArray,t3lib_div::trimExplode(',',$rowlist,1)));
                if ($this->noControlPanels)     {
@@ -317,6 +331,7 @@ class localRecordList extends recordList {
                        if (t3lib_extMgm::isLoaded('cms'))      {
                                $selectFields[] = 'module';
                                $selectFields[] = 'extendToSubpages';
+                               $selectFields[] = 'nav_hide';
                        }
                        $selectFields[] = 'doktype';
                }
@@ -367,6 +382,7 @@ class localRecordList extends recordList {
                if ($this->csvOutput) { // do not do paging when outputting as CSV
                        $this->iLimit = 0;
                }
+
                $queryParts = $this->makeQueryArray($table, $id,$addWhere,$selFieldList);       // (API function from class.db_list.inc)
                $this->setTotalItems($queryParts);              // Finding the total amount of records on the page (API function from class.db_list.inc)
 
@@ -463,6 +479,8 @@ class localRecordList extends recordList {
                                }
                                $GLOBALS['TYPO3_DB']->sql_free_result($result);
 
+                               $this->totalRowCount = count($accRows);
+
                                        // CSV initiated
                                if ($this->csvOutput) $this->initCSV();
 
@@ -567,12 +585,21 @@ class localRecordList extends recordList {
 
                if (is_array($row))     {
 
-                               // Background color, if any:
-                       $row_bgColor=
-                               $this->alternateBgColors ?
-                               (($cc%2)?'' :' class="db_list_alt"') :
-                               '';
+                               // add special classes for first and last row
+                       $rowSpecial = '';
+                       if ($cc == 1 && $indent == 0) {
+                               $rowSpecial .= ' firstcol';
+                       }
+                       if ($cc == $this->totalRowCount || $cc == $this->iLimit) {
+                               $rowSpecial .= ' lastcol';
+                       }
 
+                               // Background color, if any:
+                       if ($this->alternateBgColors) {
+                               $row_bgColor = ($cc%2) ? ' class="db_list_normal'.$rowSpecial.'"' : ' class="db_list_alt'.$rowSpecial.'"';
+                       } else {
+                               $row_bgColor = ' class="db_list_normal'.$rowSpecial.'"';
+                       }
                                // Overriding with versions background color if any:
                        $row_bgColor = $row['_CSSCLASS'] ? ' class="'.$row['_CSSCLASS'].'"' : $row_bgColor;
 
@@ -589,24 +616,30 @@ class localRecordList extends recordList {
                        foreach($this->fieldArray as $fCol)     {
                                if ($fCol==$titleCol)   {
                                        $recTitle = t3lib_BEfunc::getRecordTitle($table,$row,FALSE,TRUE);
-                                       $theData[$fCol] = $this->linkWrapItems($table,$row['uid'],$recTitle,$row);
-                               } elseif ($fCol=='pid') {
+                                               // If the record is edit-locked by another user, we will show a little warning sign:
+                                       if (($lockInfo = t3lib_BEfunc::isRecordLocked($table, $row['uid']))) {
+                                               $warning = '<a href="#" onclick="' . htmlspecialchars('alert(' . $GLOBALS['LANG']->JScharCode($lockInfo['msg']) . '); return false;') . '">' .
+                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/recordlock_warning3.gif', 'width="17" height="12"') . ' title="' . htmlspecialchars($lockInfo['msg']) . '" alt="" />' .
+                                                       '</a>';
+                                       }
+                                       $theData[$fCol] = $warning . $this->linkWrapItems($table, $row['uid'], $recTitle, $row);
+                               } elseif ($fCol == 'pid') {
                                        $theData[$fCol]=$row[$fCol];
-                               } elseif ($fCol=='_PATH_') {
+                               } elseif ($fCol == '_PATH_') {
                                        $theData[$fCol]=$this->recPath($row['pid']);
-                               } elseif ($fCol=='_REF_') {
+                               } elseif ($fCol == '_REF_') {
                                        $theData[$fCol]=$this->makeRef($table,$row['uid']);
-                               } elseif ($fCol=='_CONTROL_') {
+                               } elseif ($fCol == '_CONTROL_') {
                                        $theData[$fCol]=$this->makeControl($table,$row);
-                               } elseif ($fCol=='_CLIPBOARD_') {
+                               } elseif ($fCol == '_AFTERCONTROL_' || $fCol == '_AFTERREF_') {
+                                       $theData[$fCol] = '&nbsp;';
+                               } elseif ($fCol == '_CLIPBOARD_') {
                                        $theData[$fCol]=$this->makeClip($table,$row);
-       #                               $t3lib_transl8tools = new t3lib_transl8tools;
-       #                               $theData[$fCol].=t3lib_div::view_array($t3lib_transl8tools->translationInfo($table,$row['uid']));
-                               } elseif ($fCol=='_LOCALIZATION_') {
+                               } elseif ($fCol == '_LOCALIZATION_') {
                                        list($lC1, $lC2) = $this->makeLocalizationPanel($table,$row);
                                        $theData[$fCol] = $lC1;
                                        $theData[$fCol.'b'] = $lC2;
-                               } elseif ($fCol=='_LOCALIZATION_b') {
+                               } elseif ($fCol == '_LOCALIZATION_b') {
                                        // Do nothing, has been done above.
                                } else {
                                        $tmpProc = t3lib_BEfunc::getProcessedValueExtra($table, $fCol, $row[$fCol], 100, $row['uid']);
@@ -624,6 +657,18 @@ class localRecordList extends recordList {
                                $this->addToCSV($row,$table);
                        }
 
+                       // Add classes to table cells
+                       $this->addElement_tdCssClass[$titleCol]         = 'col-title';
+                       if (!$this->dontShowClipControlPanels) {
+                               $this->addElement_tdCssClass['_CONTROL_']       = 'col-control';
+                               $this->addElement_tdCssClass['_AFTERCONTROL_']  = 'col-control-space';
+                               $this->addElement_tdCssClass['_CLIPBOARD_']     = 'col-clipboard';
+                       }
+                       $this->addElement_tdCssClass['_PATH_']          = 'col-path';
+                       $this->addElement_tdCssClass['_LOCALIZATION_']  = 'col-localizationa';
+                       $this->addElement_tdCssClass['_LOCALIZATION_b'] = 'col-localizationb';
+
+
                                // Create element in table cells:
                        $iOut.=$this->addelement(1,$theIcon,$theData,$row_bgColor);
 
@@ -646,7 +691,7 @@ class localRecordList extends recordList {
         * @access private
         * @see getTable()
         */
-       function renderListHeader($table,$currentIdList)        {
+       function renderListHeader($table, $currentIdList)       {
                global $TCA, $LANG, $TYPO3_CONF_VARS;
 
                        // Init:
@@ -734,16 +779,17 @@ class localRecordList extends recordList {
                                                                $tmpTSc = $tmpTSc ['properties']['newContentWiz.']['overrideWithExtension'];
                                                                $newContentWizScriptPath = $this->backPath.t3lib_extMgm::isLoaded($tmpTSc) ? (t3lib_extMgm::extRelPath($tmpTSc).'mod1/db_new_content_el.php') : 'sysext/cms/layout/db_new_content_el.php';
 
-                                                               $theData[$fCol]='<a href="#" onclick="'.htmlspecialchars('return jumpExt(\''.$newContentWizScriptPath.'?id='.$this->id.'\');').'">'.
+                                                               $icon = '<a href="#" onclick="'.htmlspecialchars('return jumpExt(\''.$newContentWizScriptPath.'?id='.$this->id.'\');').'">'.
                                                                                                '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_'.($table=='pages'?'page':'el').'.gif','width="'.($table=='pages'?13:11).'" height="12"').' title="'.$LANG->getLL('new',1).'" alt="" />'.
                                                                                                '</a>';
                                                        } elseif ($table=='pages' && $this->newWizards) {
-                                                               $theData[$fCol]='<a href="'.htmlspecialchars($this->backPath.'db_new.php?id='.$this->id.'&pagesOnly=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
+                                                               $icon = '<a href="'.htmlspecialchars($this->backPath.'db_new.php?id='.$this->id.'&pagesOnly=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
                                                                                                '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_'.($table=='pages'?'page':'el').'.gif','width="'.($table=='pages'?13:11).'" height="12"').' title="'.$LANG->getLL('new',1).'" alt="" />'.
                                                                                                '</a>';
+
                                                        } else {
-                                                               $params='&edit['.$table.']['.$this->id.']=new';
-                                                               $theData[$fCol]='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath,-1)).'">'.
+                                                               $params = '&edit['.$table.']['.$this->id.']=new';
+                                                               $icon   = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath,-1)).'">'.
                                                                                                '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_'.($table=='pages'?'page':'el').'.gif','width="'.($table=='pages'?13:11).'" height="12"').' title="'.$LANG->getLL('new',1).'" alt="" />'.
                                                                                                '</a>';
                                                        }
@@ -753,13 +799,19 @@ class localRecordList extends recordList {
                                                if ($permsEdit && $this->table && is_array($currentIdList))     {
                                                        $editIdList = implode(',',$currentIdList);
                                                        if ($this->clipNumPane()) $editIdList = "'+editList('".$table."','".$editIdList."')+'";
-                                                       $params='&edit['.$table.']['.$editIdList.']=edit&columnsOnly='.implode(',',$this->fieldArray).'&disHelp=1';
-                                                       $theData[$fCol].='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath,-1)).'">'.
+                                                       $params = '&edit['.$table.']['.$editIdList.']=edit&columnsOnly='.implode(',',$this->fieldArray).'&disHelp=1';
+                                                       $icon  .= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath,-1)).'">'.
                                                                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.$LANG->getLL('editShownColumns',1).'" alt="" />'.
                                                                                        '</a>';
                                                }
+                                                       // add an empty entry, so column count fits again after moving this into $icon
+                                               $theData[$fCol] = '&nbsp;';
                                        }
                                break;
+                               case '_AFTERCONTROL_':  // space column
+                               case '_AFTERREF_':      // space column
+                                       $theData[$fCol] = '&nbsp;';
+                               break;
                                default:                        // Regular fields header:
                                        $theData[$fCol]='';
                                        if ($this->table && is_array($currentIdList))   {
@@ -786,7 +838,6 @@ class localRecordList extends recordList {
                                break;
                        }
 
-
                }
 
                /**
@@ -806,7 +857,7 @@ class localRecordList extends recordList {
                }
 
                        // Create and return header table row:
-               return $this->addelement(1,'',$theData,' class="c-headLine"','');
+               return $this->addelement(1, $icon, $theData, ' class="c-headLine"', '');
        }
 
 
@@ -829,6 +880,7 @@ class localRecordList extends recordList {
         */
        function makeControl($table,$row)       {
                global $TCA, $LANG, $SOBE, $TYPO3_CONF_VARS;
+
                if ($this->dontShowClipControlPanels)   return '';
 
                        // Initialize:
@@ -849,6 +901,8 @@ class localRecordList extends recordList {
                        $cells['view']='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($table=='tt_content'?$this->id.'#'.$row['uid']:$row['uid'], $this->backPath)).'">'.
                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom.gif','width="12" height="12"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPage',1).'" alt="" />'.
                                        '</a>';
+               } elseif(!$this->table) {
+                       $cells['view'] = $this->spaceIcon;
                }
 
                        // "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
@@ -857,6 +911,8 @@ class localRecordList extends recordList {
                        $cells['edit']='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath,-1)).'">'.
                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2'.(!$TCA[$table]['ctrl']['readOnly']?'':'_d').'.gif','width="11" height="12"').' title="'.$LANG->getLL('edit',1).'" alt="" />'.
                                        '</a>';
+               } elseif(!$this->table) {
+                       $cells['edit'] = $this->spaceIcon;
                }
 
                        // "Move" wizard link for pages/tt_content elements:
@@ -864,6 +920,8 @@ class localRecordList extends recordList {
                        $cells['move']='<a href="#" onclick="'.htmlspecialchars('return jumpExt(\''.$this->backPath.'move_el.php?table='.$table.'&uid='.$row['uid'].'\');').'">'.
                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/move_'.($table=='tt_content'?'record':'page').'.gif','width="11" height="12"').' title="'.$LANG->getLL('move_'.($table=='tt_content'?'record':'page'),1).'" alt="" />'.
                                        '</a>';
+               } elseif(!$this->table) {
+                       $cells['move'] = $this->spaceIcon;
                }
 
                        // If the extended control panel is enabled OR if we are seeing a single table:
@@ -894,9 +952,11 @@ class localRecordList extends recordList {
                                                        $lab = 'V';
                                                }
 
-                                               $cells['version']='<a href="'.htmlspecialchars($this->backPath.t3lib_extMgm::extRelPath('version')).'cm1/index.php?table='.rawurlencode($table).'&uid='.rawurlencode($row['uid']).'" title="'.$LANG->getLL('displayVersions',1).'" style="'.htmlspecialchars($st).'">'.
+                                               $cells['version']='<a href="'.htmlspecialchars($this->backPath.t3lib_extMgm::extRelPath('version')).'cm1/index.php?table='.rawurlencode($table).'&uid='.rawurlencode($row['uid']).'" title="'.$LANG->getLL('displayVersions',1).'" class="typo3-ctrl-versioning" style="'.htmlspecialchars($st).'">'.
                                                                $lab.
                                                                '</a>';
+                                       } elseif(!$this->table) {
+                                               $cells['version'] = '<span class="typo3-ctrl-versioning" style="font-weight: bold; visibility: hidden;">V</span>';
                                        }
                                }
 
@@ -905,6 +965,8 @@ class localRecordList extends recordList {
                                        $cells['perms']='<a href="'.htmlspecialchars('mod/web/perm/index.php?id='.$row['uid'].'&return_id='.$row['uid'].'&edit=1').'">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/perm.gif','width="7" height="12"').' title="'.$LANG->getLL('permissions',1).'" alt="" />'.
                                                        '</a>';
+                               } elseif(!$this->table && $GLOBALS['BE_USER']->check('modules','web_perm')) {
+                                       $cells['perms'] = $this->spaceIcon;
                                }
 
                                        // "New record after" link (ONLY if the records in the table are sorted by a "sortby"-row or if default values can depend on previous record):
@@ -920,6 +982,8 @@ class localRecordList extends recordList {
                                                                        '</a>';
                                                }
                                        }
+                               } elseif(!$this->table) {
+                                       $cells['new'] = $this->spaceIcon;
                                }
 
                                        // "Up/Down" links
@@ -930,7 +994,7 @@ class localRecordList extends recordList {
                                                                '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"').' title="'.$LANG->getLL('moveUp',1).'" alt="" />'.
                                                                '</a>';
                                        } else {
-                                               $cells['moveUp']='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"',2).' alt="" />';
+                                               $cells['moveUp'] = $this->spaceIcon;
                                        }
                                        if ($this->currentTable['next'][$row['uid']])   {       // Down
                                                $params='&cmd['.$table.']['.$row['uid'].'][move]='.$this->currentTable['next'][$row['uid']];
@@ -938,8 +1002,11 @@ class localRecordList extends recordList {
                                                                '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"').' title="'.$LANG->getLL('moveDown',1).'" alt="" />'.
                                                                '</a>';
                                        } else {
-                                               $cells['moveDown']='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"',2).' alt="" />';
+                                               $cells['moveDown'] = $this->spaceIcon;
                                        }
+                               } elseif(!$this->table) {
+                                       $cells['moveUp']  = $this->spaceIcon;
+                                       $cells['moveDown'] = $this->spaceIcon;
                                }
 
                                        // "Hide/Unhide" links:
@@ -956,16 +1023,26 @@ class localRecordList extends recordList {
                                                                '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_hide.gif','width="11" height="10"').' title="'.$LANG->getLL('hide'.($table=='pages'?'Page':''),1).'" alt="" />'.
                                                                '</a>';
                                        }
+                               } elseif(!$this->table) {
+                                       $cells['hide'] = $this->spaceIcon;
                                }
 
                                        // "Delete" link:
                                if (
                                        ($table=='pages' && ($localCalcPerms&4)) || ($table!='pages' && ($this->calcPerms&16))
                                        )       {
-                                       $params='&cmd['.$table.']['.$row['uid'].'][delete]=1';
-                                       $cells['delete']='<a href="#" onclick="'.htmlspecialchars('if (confirm('.$LANG->JScharCode($LANG->getLL('deleteWarning').t3lib_BEfunc::referenceCount($table,$row['uid'],' (There are %s reference(s) to this record!)')).')) {jumpToUrl(\''.$SOBE->doc->issueCommand($params,-1).'\');} return false;').'">'.
+                                       $titleOrig = t3lib_BEfunc::getRecordTitle($table,$row,FALSE,TRUE);
+                                       $titleLength = $GLOBALS['BE_USER']->uc['titleLen'];
+                                       if (!$titleLength || !t3lib_div::testInt($titleLength) || $titleLength < 0) {
+                                               $titleLength = 30;
+                                       }
+                                       $title = t3lib_div::slashJS(t3lib_div::fixed_lgd_cs($titleOrig, $titleLength),1);
+                                       $params = '&cmd['.$table.']['.$row['uid'].'][delete]=1';
+                                       $cells['delete']='<a href="#" onclick="'.htmlspecialchars('if (confirm('.$LANG->JScharCode($LANG->getLL('deleteWarning').' "'. $title.'" '.t3lib_BEfunc::referenceCount($table,$row['uid'],' (There are %s reference(s) to this record!)')).')) {jumpToUrl(\''.$SOBE->doc->issueCommand($params,-1).'\');} return false;').'">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/garbage.gif','width="11" height="12"').' title="'.$LANG->getLL('delete',1).'" alt="" />'.
                                                        '</a>';
+                               } elseif(!$this->table) {
+                                       $cells['delete'] = $this->spaceIcon;
                                }
 
                                        // "Levels" links: Moving pages into new levels...
@@ -987,21 +1064,18 @@ class localRecordList extends recordList {
                                                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_right.gif','width="11" height="10"').' title="'.$LANG->getLL('nextLevel',1).'" alt="" />'.
                                                                        '</a>';
                                                } else {
-                                                       $cells['moveRight']='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_right.gif','width="11" height="10"',2).' alt="" />';
+                                                       $cells['moveRight'] = $this->spaceIcon;
                                                }
                                        } else {
-                                               $cells['moveRight']='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_right.gif','width="11" height="10"',2).' alt="" />';
+                                               $cells['moveRight'] = $this->spaceIcon;
                                        }
+                               } elseif(!$this->table) {
+                                       $cells['moveLeft'] = $this->spaceIcon;
+                                       $cells['moveRight'] = $this->spaceIcon;
                                }
                        }
                }
 
-                       // If the record is edit-locked by another user, we will show a little warning sign:
-               if ($lockInfo=t3lib_BEfunc::isRecordLocked($table,$row['uid'])) {
-                       $cells['locked'] = '<a href="#" onclick="'.htmlspecialchars('alert('.$LANG->JScharCode($lockInfo['msg']).');return false;').'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/recordlock_warning3.gif','width="17" height="12"').' title="'.htmlspecialchars($lockInfo['msg']).'" alt="" />'.
-                                       '</a>';
-               }
 
                /**
                 * @hook                        recStatInfoHooks: Allows to insert HTML before record icons on various places
@@ -1052,6 +1126,7 @@ class localRecordList extends recordList {
                if ($this->dontShowClipControlPanels)   return '';
                $cells=array();
 
+               $cells['pasteAfter'] = $cells['pasteInto'] = $this->spaceIcon;
 
                        // Return blank, if disabled:
                        // Whether a numeric clipboard pad is active or the normal pad we will see different content of the panel:
@@ -1103,7 +1178,7 @@ class localRecordList extends recordList {
                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/clip_pasteinto.gif','width="12" height="12"').' title="'.$LANG->getLL('clip_pasteInto',1).'" alt="" />'.
                                        '</a>';
                }
-                       
+
                /*
                 * @hook                        makeClip: Allows to change clip-icons of records in list-module
                 * @date                        2007-11-20
@@ -1223,11 +1298,9 @@ class localRecordList extends recordList {
                $setFields=is_array($this->setFields[$table]) ? $this->setFields[$table] : array();
 
                        // Request fields from table:
-               $fields = $this->makeFieldList($table);
+               $fields = $this->makeFieldList($table, false, true);
 
                        // Add pseudo "control" fields
-               $fields[]='tstamp';
-               $fields[]='crdate';
                $fields[]='_PATH_';
                $fields[]='_REF_';
                $fields[]='_LOCALIZATION_';
@@ -1497,4 +1570,5 @@ class localRecordList extends recordList {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list_extra.inc'])  {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list_extra.inc']);
 }
-?>
+
+?>
\ No newline at end of file