Implemented versioning API, phase 1 (tcemain). See changelog
[Packages/TYPO3.CMS.git] / typo3 / class.db_list_extra.inc
index e3ec428..dfa1f49 100755 (executable)
@@ -121,11 +121,11 @@ class localRecordList extends recordList {
                global $LANG;
 
                        // Makes the code for the pageicon in the top
-               $this->pageRow=$row;
+               $this->pageRow = $row;
                $this->counter++;
                $alttext = t3lib_BEfunc::getRecordIconAltText($row,'pages');
                $iconImg = t3lib_iconWorks::getIconImage('pages',$row,$this->backPath,'title="'.htmlspecialchars($alttext).'"');
-               $titleCol='test';       // pseudo title column name
+               $titleCol = 'test';     // pseudo title column name
                $this->fieldArray = Array($titleCol,'up');              // Setting the fields to display in the list (this is of course "pseudo fields" since this is the top!)
 
 
@@ -249,7 +249,7 @@ class localRecordList extends recordList {
                        $theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_cs($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],-$this->fixedL));
 
                                // Make Icon:
-                       $theIcon='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_website.gif','width="18" height="16"').' alt="" />';
+                       $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_website.gif','width="18" height="16"').' alt="" />';
                }
 
                        // If there is a returnUrl given, add a back-link:
@@ -269,7 +269,7 @@ class localRecordList extends recordList {
                        </table>';
 
                        // ... and the element row is created:
-               $out.=$this->addelement(1,'',$theData,'',$this->leftMargin,$theIcon);
+               $out.=$this->addelement(1,'',$theData,'',$this->leftMargin, $theIcon);
 
                        // ... and wrapped into a table and added to the internal ->HTMLcode variable:
                $this->HTMLcode.='
@@ -343,6 +343,9 @@ class localRecordList extends recordList {
                if ($TCA[$table]['ctrl']['typeicon_column'])    {
                        $selectFields[] = $TCA[$table]['ctrl']['typeicon_column'];
                }
+               if ($TCA[$table]['ctrl']['versioning']) {
+                       $selectFields[] = 't3ver_id';
+               }
                if ($TCA[$table]['ctrl']['label_alt'])  {
                        $selectFields = array_merge($selectFields,t3lib_div::trimExplode(',',$TCA[$table]['ctrl']['label_alt'],1));
                }
@@ -388,6 +391,9 @@ class localRecordList extends recordList {
                                $theData[$titleCol] = $this->linkWrapTable($table,'<span class="c-table">'.$GLOBALS['LANG']->sL($TCA[$table]['ctrl']['title'],1).'</span> ('.$this->totalItems.') <img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/'.($this->table?'minus':'plus').'bullet_list.gif','width="18" height="12"').' hspace="10" class="absmiddle" title="'.$GLOBALS['LANG']->getLL(!$this->table?'expandView':'contractView',1).'" alt="" />');
                        }
 
+                               // CSH:
+                       $theData[$titleCol].= t3lib_BEfunc::cshItem($table,'',$this->backPath,'',FALSE,'margin-bottom:0px; white-space: normal;');
+
                        if ($LOISmode)  {
                                $out.='
                                        <tr>
@@ -397,7 +403,7 @@ class localRecordList extends recordList {
                                if ($GLOBALS['BE_USER']->uc["edit_showFieldHelp"])      {
                                        $GLOBALS['LANG']->loadSingleTableDescription($table);
                                        if (isset($GLOBALS['TCA_DESCR'][$table]['columns']['']))        {
-                                               $onClick = 'vHWin=window.open(\'view_help.php?tfID='.$table.'.\',\'viewFieldHelp\',\'height=300,width=250,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;';
+                                               $onClick = 'vHWin=window.open(\'view_help.php?tfID='.$table.'.\',\'viewFieldHelp\',\'height=400,width=600,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;';
                                                $out.='
                                        <tr>
                                                <td class="c-tableDescription">'.t3lib_BEfunc::helpTextIcon($table,'',$this->backPath,TRUE).$GLOBALS['TCA_DESCR'][$table]['columns']['']['description'].'</td>