Fixed bug #14716: Version module don't display Title
[Packages/TYPO3.CMS.git] / typo3 / sysext / version / cm1 / index.php
index 66c6429..b3fefaf 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2004-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 2004-2010 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -82,13 +82,9 @@ require ('conf.php');
 require ($BACK_PATH.'init.php');
 require ($BACK_PATH.'template.php');
 $LANG->includeLLFile('EXT:version/locallang.xml');
-require_once (PATH_t3lib.'class.t3lib_scbase.php');
        // DEFAULT initialization of a module [END]
 
-require_once(PATH_t3lib.'class.t3lib_diff.php');
 require_once(PATH_typo3.'mod/user/ws/class.wslib.php');
-require_once(PATH_t3lib.'class.t3lib_pagetree.php');
-require_once(PATH_t3lib.'class.t3lib_tcemain.php');
 
 
 
@@ -105,7 +101,13 @@ class tx_version_cm1 extends t3lib_SCbase {
        var $MCONF = array();                           // Module configuration
        var $MOD_MENU = array();                        // Module menu items
        var $MOD_SETTINGS = array();            // Module session settings
-       var $doc;                                                       // Document Template Object
+
+       /**
+        * document template object
+        *
+        * @var mediumDoc
+        */
+       var $doc;
        var $content;                                           // Accumulated content
 
 
@@ -118,6 +120,8 @@ class tx_version_cm1 extends t3lib_SCbase {
        var $publishAccess = FALSE;
        var $be_user_Array = array();
        var $stageIndex = array();
+       var $recIndex = array();
+       protected $showDraftWorkspace = FALSE; // Determines whether to show the dummy draft workspace
 
 
 
@@ -137,21 +141,31 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        function menuConfig()   {
 
+                       // fetches the configuration of the version extension
+               $versionExtconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['version']);
+                       // show draft workspace only if enabled in the version extensions config
+               if($versionExtconf['showDraftWorkspace']) {
+                       $this->showDraftWorkspace = TRUE;
+               }
+
                        // Menu items:
                $this->MOD_MENU = array(
                        'filter' => array(
-                               1 => 'Drafts',
-                               2 => 'Archive',
-                               0 => 'All',
+                               1 => $GLOBALS['LANG']->getLL('filter_drafts'),
+                               2 => $GLOBALS['LANG']->getLL('filter_archive'),
+                               0 => $GLOBALS['LANG']->getLL('filter_all'),
                        ),
                        'display' => array(
-                               0 => '[Live workspace]',
-                               -98 => 'Draft Workspaces',
-                               -99 => 'All',
-                               -1 => '[Default Draft]'
+                               0 => $GLOBALS['LANG']->getLL('liveWorkspace'),
+                               -98 => $GLOBALS['LANG']->getLL('draftWorkspaces'),
+                               -99 => $GLOBALS['LANG']->getLL('filter_all'),
                        ),
                        'diff' => ''
                );
+               
+               if($this->showDraftWorkspace === TRUE) {
+                       $this->MOD_MENU['display'][-1] = $GLOBALS['LANG']->getLL('defaultDraft');
+               }
 
                        // Add workspaces:
                if ($GLOBALS['BE_USER']->workspace===0) {       // Spend time on this only in online workspace because it might take time:
@@ -174,14 +188,24 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        function main() {
                global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
+               
+                       // Template markers
+               $markers = array(
+                       'CSH' => '',
+                       'FUNC_MENU' => '',
+                       'WS_MENU' => '',
+                       'CONTENT' => ''
+               );
 
                        // Setting module configuration:
                $this->MCONF = $GLOBALS['MCONF'];
 
+               $this->REQUEST_URI = str_replace('&sendToReview=1','',t3lib_div::getIndpEnv('REQUEST_URI'));
+
                        // Draw the header.
-               $this->doc = t3lib_div::makeInstance('mediumDoc');
+               $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
-               $this->doc->form='<form action="" method="post">';
+               $this->doc->setModuleTemplate('templates/version.html');
 
                // Add styles
                $this->doc->inDocStylesArray[$GLOBALS['MCONF']['name']] = '
@@ -190,10 +214,7 @@ class tx_version_cm1 extends t3lib_SCbase {
 ';
 
                        // Setting up the context sensitive menu:
-               $CMparts = $this->doc->getContextMenuCode();
-               $this->doc->JScode.= $CMparts[0];
-               $this->doc->bodyTagAdditions = $CMparts[1];
-               $this->doc->postCode.= $CMparts[2];
+               $this->doc->getContextMenuCode();
 
                        // Getting input data:
                $this->id = intval(t3lib_div::_GP('id'));               // Page id. If set, indicates activation from Web>Versioning module
@@ -216,10 +237,14 @@ class tx_version_cm1 extends t3lib_SCbase {
                if ($record['pid']==-1) {
                        $record = t3lib_BEfunc::getRecord($this->table,$record['t3ver_oid']);
                }
+
+               $this->recordFound = is_array($record);
+
                $pidValue = $this->table==='pages' ? $this->uid : $record['pid'];
 
                        // Checking access etc.
-               if (is_array($record) && $TCA[$this->table]['ctrl']['versioningWS'])    {
+               if ($this->recordFound && $TCA[$this->table]['ctrl']['versioningWS'])   {
+                       $this->doc->form='<form action="" method="post">';
                        $this->uid = $record['uid'];    // Might have changed if new live record was found!
 
                                // Access check!
@@ -262,30 +287,35 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        // Setting publish access permission for workspace:
                                $this->publishAccess = $BE_USER->workspacePublishAccess($BE_USER->workspace);
 
-
-                               $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br/>'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);
-
-                               $this->content.=$this->doc->startPage($LANG->getLL('title'));
-                               $this->content.=$this->doc->header($LANG->getLL('title'));
-                               $this->content.=$this->doc->spacer(5);
-                               $this->content.=$this->doc->section('',$headerSection);
-                               $this->content.=$this->doc->divider(5);
-
                                        // Render content:
                                if ($this->id)  {
                                        $this->workspaceMgm();
                                } else {
                                        $this->versioningMgm();
                                }
-
-                                       // ShortCut
-                               if ($BE_USER->mayMakeShortcut())        {
-                                       $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));
-                               }
                        }
 
                        $this->content.=$this->doc->spacer(10);
+
+                               // Setting up the buttons and markers for docheader
+                       $docHeaderButtons = $this->getButtons();
+                       $markers['CSH'] = $docHeaderButtons['csh'];
+                       $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
+                       $markers['WS_MENU'] = $this->workspaceMenu();
+                       $markers['CONTENT'] = $this->content;
+               } else {
+                               // If no access or id value, create empty document
+                       $this->content = $this->doc->section($LANG->getLL('clickAPage_header'), $LANG->getLL('clickAPage_content'), 0, 1);
+
+                               // Setting up the buttons and markers for docheader
+                       $docHeaderButtons = $this->getButtons();
+                       $markers['CONTENT'] = $this->content;
                }
+                       // Build the <body> for the module
+               $this->content = $this->doc->startPage($LANG->getLL('title'));
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
        /**
@@ -294,12 +324,47 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @return      void
         */
        function printContent() {
-
-               $this->content.=$this->doc->endPage();
                echo $this->content;
        }
 
+       /**
+        * Create the panel of buttons for submitting the form or otherwise perform operations.
+        *
+        * @return      array   all available buttons as an assoc. array
+        */
+       protected function getButtons() {
+               global $TCA, $LANG, $BACK_PATH, $BE_USER;
+
+               $buttons = array(
+                       'csh' => '',
+                       'view' => '',
+                       'record_list' => '',
+                       'shortcut' => '',
+               );
+                       // CSH
+               //$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_txversionM1', '', $GLOBALS['BACK_PATH']);
+
+               if ($this->recordFound && $TCA[$this->table]['ctrl']['versioningWS']) {
+                               // View page
+                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', TRUE) . '">' .
+                                               t3lib_iconWorks::getSpriteIcon('actions-document-view') .
+                                       '</a>';
+
+                               // Shortcut
+                       if ($BE_USER->mayMakeShortcut())        {
+                               $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+                       }
 
+                               // If access to Web>List for user, then link to that module.
+                       if ($BE_USER->check('modules','web_list'))      {
+                               $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
+                               $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE) . '">' .
+                                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
+                                               '</a>';
+                       }
+               }
+               return $buttons;
+       }
 
 
 
@@ -327,7 +392,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                $diff_2 = t3lib_div::_POST('diff_2');
                if (t3lib_div::_POST('do_diff'))        {
                        $content='';
-                       $content.='<h3>DIFFING:</h3>';
+                       $content.='<h3>' . $GLOBALS['LANG']->getLL('diffing') . ':</h3>';
                        if ($diff_1 && $diff_2) {
                                $diff_1_record = t3lib_BEfunc::getRecord($this->table, $diff_1);
                                $diff_2_record = t3lib_BEfunc::getRecord($this->table, $diff_2);
@@ -339,8 +404,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        $tRows=array();
                                                                $tRows[] = '
                                                                        <tr class="bgColor5 tableheader">
-                                                                               <td>Fieldname:</td>
-                                                                               <td width="98%">Colored diff-view:</td>
+                                                                               <td>' . $GLOBALS['LANG']->getLL('fieldname') . '</td>
+                                                                               <td width="98%">' . $GLOBALS['LANG']->getLL('coloredDiffView') . ':</td>
                                                                        </tr>
                                                                ';
                                        foreach($diff_1_record as $fN => $fV)   {
@@ -363,41 +428,41 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        }
 
                                        if (count($tRows)>1)    {
-                                               $content.='<table border="0" cellpadding="1" cellspacing="1" width="100%">'.implode('',$tRows).'</table><br/><br/>';
+                                               $content .= '<table border="0" cellpadding="1" cellspacing="1" width="100%">' . implode('', $tRows) . '</table><br /><br />';
                                        } else {
-                                               $content.='Records matches completely on all editable fields!';
+                                               $content .= $GLOBALS['LANG']->getLL('recordsMatchesCompletely');
                                        }
-                               } else $content.='ERROR: Records could strangely not be found!';
+                               } else $content .= $GLOBALS['LANG']->getLL('errorRecordsNotFound');
                        } else {
-                               $content.='ERROR: You didn\'t select two sources for diffing!';
+                               $content .= $GLOBALS['LANG']->getLL('errorDiffSources');
                        }
                }
 
                        // Element:
                $record = t3lib_BEfunc::getRecord($this->table,$this->uid);
                $recordIcon = t3lib_iconWorks::getIconImage($this->table,$record,$this->doc->backPath,'class="absmiddle"');
-               $recTitle = t3lib_BEfunc::getRecordTitle($this->table,$record,1);
+               $recTitle = t3lib_BEfunc::getRecordTitle($this->table,$record,TRUE);
 
                        // Display versions:
                $content.='
                        '.$recordIcon.$recTitle.'
-                       <form action="'.t3lib_div::getIndpEnv('REQUEST_URI').'" method="post">
+                       <form name="theform" action="'.str_replace('&sendToReview=1','',$this->REQUEST_URI).'" method="post">
                        <table border="0" cellspacing="1" cellpadding="1">';
                        $content.='
                                <tr class="bgColor5 tableheader">
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
-                                       <td>Title</td>
-                                       <td>UID</td>
-                                       <td title="t3ver_oid - Reference to live version UID">oid</td>
-                                       <td title="t3ver_id - Version number, incremental integer">id</td>
-                                       <td title="t3ver_wsid - Workspace ID. There can be only one version of an element per ID (except ID zero).">wsid</td>
-                                       <td title="t3ver_state - Special states of a version: 1=Placeholder for "New". 2=Marked deleted.">state</td>
-                                       <td title="t3ver_stage - Publishing stage: Editing (0), review (1), publish (10), rejected (-1).">stage</td>
-                                       <td title="t3ver_count - Life cycle counter. Incremented each time element is unpublished.">count</td>
-                                       <td>pid</td>
-                                       <td>t3ver_label</td>
-                                       <td colspan="2"><input type="submit" name="do_diff" value="Diff" /></td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_title') . '">' . $GLOBALS['LANG']->getLL('tblHeader_title') . '</td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_uid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_uid') . '</td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_oid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_oid') . '</td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_id') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_id') . '</td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_wsid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_wsid') . '</td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_state') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_state') . '</td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_stage') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_stage') . '</td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_count') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_count') . '</td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_pid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_pid') . '</td>
+                                       <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_label') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . '</td>
+                                       <td colspan="2"><input type="submit" name="do_diff" value="' . $GLOBALS['LANG']->getLL('diff') . '" /></td>
                                </tr>';
 
                $versions = t3lib_BEfunc::selectVersionsOfRecord($this->table, $this->uid, '*', $GLOBALS['BE_USER']->workspace);
@@ -405,9 +470,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $adminLinks = $this->adminLinks($this->table,$row);
 
                        $content.='
-                               <tr class="'.($row['uid']!=$this->uid ? 'bgColor4' : 'bgColor2 tableheader').'">
-                                       <td>'.($row['uid']!=$this->uid ? '<a href="'.$this->doc->issueCommand('&cmd['.$this->table.']['.$this->uid.'][version][swapWith]='.$row['uid'].'&cmd['.$this->table.']['.$this->uid.'][version][action]=swap').'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/insert1.gif','width="14" height="14"').' alt="" title="SWAP with current" />'.
+                               <tr class="' . ($row['uid'] != $this->uid ? 'bgColor4' : 'bgColor2 tableheader') . '">
+                                       <td>'.($row['uid']!=$this->uid ? '<a href="'.$this->doc->issueCommand('&cmd['.$this->table.']['.$this->uid.'][version][swapWith]='.$row['uid'].'&cmd['.$this->table.']['.$this->uid.'][version][action]=swap').'" title="' . $GLOBALS['LANG']->getLL('swapWithCurrent', TRUE) . '">'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-version-swap-version') .
                                                '</a>' /* (
                                                        $this->table == 'pages' ?
                                                        '<a href="'.$this->doc->issueCommand('&cmd['.$this->table.']['.$this->uid.'][version][action]=swap&cmd['.$this->table.']['.$this->uid.'][version][swapWith]='.$row['uid'].'&cmd['.$this->table.']['.$this->uid.'][version][swapContent]=1').'">'.
@@ -415,9 +480,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                '</a>'.
                                                        '<a href="'.$this->doc->issueCommand('&cmd['.$this->table.']['.$this->uid.'][version][action]=swap&cmd['.$this->table.']['.$this->uid.'][version][swapWith]='.$row['uid'].'&cmd['.$this->table.']['.$this->uid.'][version][swapContent]=ALL').'">'.
                                                '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/insert4.gif','width="14" height="14"').' alt="" title="Publish page AND content! - AND ALL SUBPAGES!" />'.
-                                               '</a>' : '') */ : '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/blinkarrow_left.gif','width="5" height="9"').' alt="" title="CURRENT ONLINE VERSION!"/>').'</td>
+                                               '</a>' : '') */ : t3lib_iconWorks::getSpriteIcon('status-status-current', array('title' =>  $GLOBALS['LANG']->getLL('currentOnlineVersion', TRUE)))) . '</td>
                                        <td nowrap="nowrap">'.$adminLinks.'</td>
-                                       <td nowrap="nowrap">'.t3lib_BEfunc::getRecordTitle($this->table,$row,1).'</td>
+                                       <td nowrap="nowrap">'.t3lib_BEfunc::getRecordTitle($this->table,$row,TRUE).'</td>
                                        <td>'.$row['uid'].'</td>
                                        <td>'.$row['t3ver_oid'].'</td>
                                        <td>'.$row['t3ver_id'].'</td>
@@ -426,7 +491,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        <td>'.$row['t3ver_stage'].'</td>
                                        <td>'.$row['t3ver_count'].'</td>
                                        <td>'.$row['pid'].'</td>
-                                       <td nowrap="nowrap"><a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit['.$this->table.']['.$row['uid'].']=edit&columnsOnly=t3ver_label',$this->doc->backPath)).'"><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/edit2.gif','width="11" height="12"').' alt="" title="Edit"/></a>'.htmlspecialchars($row['t3ver_label']).'</td>
+                                       <td nowrap="nowrap"><a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit['.$this->table.']['.$row['uid'].']=edit&columnsOnly=t3ver_label',$this->doc->backPath)).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE) . '">' .
+                                                       t3lib_iconWorks::getSpriteIcon('actions-document-open') .
+                                               '</a>' . htmlspecialchars($row['t3ver_label']) . '</td>
                                        <td class="version-diff-1"><input type="radio" name="diff_1" value="'.$row['uid'].'"'.($diff_1==$row['uid'] ? ' checked="checked"':'').'/></td>
                                        <td class="version-diff-2"><input type="radio" name="diff_2" value="'.$row['uid'].'"'.($diff_2==$row['uid'] ? ' checked="checked"':'').'/></td>
                                </tr>';
@@ -448,30 +515,30 @@ class tx_version_cm1 extends t3lib_SCbase {
                }
                $content.='</table></form>';
 
-               $this->content.=$this->doc->section('',$content,0,1);
+               $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('title'), $content, 0, 1);
 
 
                        // Create new:
                $content='
 
                        <form action="'.$this->doc->backPath.'tce_db.php" method="post">
-                       Label: <input type="text" name="cmd['.$this->table.']['.$this->uid.'][version][label]" /><br/>
-                       '.($this->table == 'pages' ? '<select name="cmd['.$this->table.']['.$this->uid.'][version][treeLevels]">
-                               '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(0) ? '<option value="0">Page: Page + content</option>' : '').'
-                               '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(1) ? '<option value="100">Branch: All subpages</option>' : '').'
-                               '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(-1) ? '<option value="-1">Element: Just record</option>' : '').'
+                       ' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . ': <input type="text" name="cmd[' . $this->table . '][' . $this->uid . '][version][label]" /><br />
+                       '.(($this->table == 'pages' && $GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'] == FALSE)? '<select name="cmd['.$this->table.']['.$this->uid.'][version][treeLevels]">
+                               '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(0) ? '<option value="0">' . $GLOBALS['LANG']->getLL('cmdPid0') . '</option>' : '').'
+                               '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(1) ? '<option value="100">' . $GLOBALS['LANG']->getLL('cmdPid100') . '</option>' : '').'
+                               '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(-1) ? '<option value="-1">' . $GLOBALS['LANG']->getLL('cmdPid1') . '</option>' : '').'
                        </select>' : '').'
-                       <br/><input type="hidden" name="cmd['.$this->table.']['.$this->uid.'][version][action]" value="new" />
+                       <br /><input type="hidden" name="cmd[' . $this->table . '][' . $this->uid . '][version][action]" value="new" />
                        <input type="hidden" name="prErr" value="1" />
-                       <input type="hidden" name="redirect" value="'.t3lib_div::getIndpEnv('REQUEST_URI').'" />
-                       <input type="submit" name="_" value="Create new version" />
+                       <input type="hidden" name="redirect" value="'.htmlspecialchars($this->REQUEST_URI).'" />
+                       <input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('createNewVersion') . '" />
 
                        </form>
 
                ';
 
                $this->content.=$this->doc->spacer(15);
-               $this->content.=$this->doc->section('Create new version',$content,0,1);
+               $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('createNewVersion'), $content,0,1);
 
        }
 
@@ -505,7 +572,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                                <td>'.$this->adminLinks($tN,$subrow).'</td>
                                                                <td>'.$subrow['uid'].'</td>
                                                                '.($ownVer>1 ? '<td style="font-weight: bold; background-color: yellow;"><a href="index.php?table='.rawurlencode($tN).'&uid='.$subrow['uid'].'">'.($ownVer-1).'</a></td>' : '<td></td>').'
-                                                               <td width="98%">'.t3lib_BEfunc::getRecordTitle($tN,$subrow,1).'</td>
+                                                               <td width="98%">'.t3lib_BEfunc::getRecordTitle($tN,$subrow,TRUE).'</td>
                                                        </tr>';
 
                                                if ($tN == 'pages' && $c<100)   {
@@ -557,13 +624,13 @@ class tx_version_cm1 extends t3lib_SCbase {
                global $BE_USER;
 
                        // Edit link:
-               $adminLink = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit['.$table.']['.$row['uid'].']=edit',$this->doc->backPath)).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/edit2.gif','width="11" height="12"').' alt="" title="Edit"/>'.
+               $adminLink = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit['.$table.']['.$row['uid'].']=edit',$this->doc->backPath)).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE) . '">'.
+                                                       t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                                '</a>';
 
                        // Delete link:
-               $adminLink.= '<a href="'.htmlspecialchars($this->doc->issueCommand('&cmd['.$table.']['.$row['uid'].'][delete]=1')).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','width="11" height="12"').' alt="" title="Delete"/>'.
+               $adminLink.= '<a href="'.htmlspecialchars($this->doc->issueCommand('&cmd['.$table.']['.$row['uid'].'][delete]=1')).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.delete', TRUE) . '">' .
+                                                       t3lib_iconWorks::getSpriteIcon('actions-edit-delete') .
                                                '</a>';
 
 
@@ -579,15 +646,15 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $a_wp = t3lib_extMgm::isLoaded('cms') && $BE_USER->check('modules',$pageModule);
 
                        $adminLink.='<a href="#" onclick="top.loadEditId('.$row['uid'].');top.goToModule(\''.$pageModule.'\'); return false;">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,t3lib_extMgm::extRelPath('cms').'layout/layout.gif','width="14" height="12"').' title="" alt="" />'.
+                                                       t3lib_iconWorks::getSpriteIcon('actions-page-open') .
                                                '</a>';
                        $adminLink.='<a href="#" onclick="top.loadEditId('.$row['uid'].');top.goToModule(\'web_list\'); return false;">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'mod/web/list/list.gif','width="14" height="12"').' title="" alt="" />'.
+                                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
                                                '</a>';
 
                                // "View page" icon is added:
                        $adminLink.='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($row['uid'],$this->doc->backPath,t3lib_BEfunc::BEgetRootLine($row['uid']))).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/zoom.gif','width="12" height="12"').' title="" alt="" />'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                '</a>';
                } else {
                        if ($row['pid']==-1)    {
@@ -595,7 +662,7 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                                        // "View page" icon is added:
                                $adminLink.='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($row['_REAL_PID'],$this->doc->backPath,t3lib_BEfunc::BEgetRootLine($row['_REAL_PID']),'','',$getVars)).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/zoom.gif','width="12" height="12"').' title="" alt="" />'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                        '</a>';
                        }
                }
@@ -627,19 +694,6 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        function workspaceMgm() {
 
-               $menu = '';
-               if ($GLOBALS['BE_USER']->workspace===0) {
-                       $menu.= t3lib_BEfunc::getFuncMenu($this->id,'SET[filter]',$this->MOD_SETTINGS['filter'],$this->MOD_MENU['filter']);
-                       $menu.= t3lib_BEfunc::getFuncMenu($this->id,'SET[display]',$this->MOD_SETTINGS['display'],$this->MOD_MENU['display']);
-               }
-               if (!$this->details && $GLOBALS['BE_USER']->workspace && !$this->diffOnly)      {
-                       $menu.= t3lib_BEfunc::getFuncCheck($this->id,'SET[diff]',$this->MOD_SETTINGS['diff']).' Show difference view';
-               }
-
-               if ($menu)      {
-                       $this->content.=$this->doc->section('',$menu,0,1);
-               }
-
                        // Perform workspace publishing action if buttons are pressed:
                $errors = $this->publishAction();
 
@@ -647,38 +701,63 @@ class tx_version_cm1 extends t3lib_SCbase {
                $WSoverview = $this->displayWorkspaceOverview();
 
                        // Buttons for publish / swap:
-               $actionLinks = '<br/>';
+               $actionLinks = '<br />';
                if ($GLOBALS['BE_USER']->workspace!==0) {
                        if ($this->publishAccess)       {
-                               $actionLinks.= '<input type="submit" name="_publish" value="Publish page" onclick="return confirm(\'Are you sure you want to publish all content '.($GLOBALS['BE_USER']->workspaceRec['publish_access']&1 ? 'in &quot;Publish&quot; stage ':'').'from this page?\');"/>';
+                               $actionLinks.= '<input type="submit" name="_publish" value="' . $GLOBALS['LANG']->getLL('publishPage') . '" onclick="return confirm(\'' . sprintf($GLOBALS['LANG']->getLL('publishPageQuestion'), $GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : '') . '\');"/>';
                                if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
-                                       $actionLinks.= '<input type="submit" name="_swap" value="Swap page" onclick="return confirm(\'Are you sure you want to publish (swap) all content '.($GLOBALS['BE_USER']->workspaceRec['publish_access']&1 ? 'in &quot;Publish&quot; stage ':'').'from this page?\');" />';
+                                       $actionLinks.= '<input type="submit" name="_swap" value="' . $GLOBALS['LANG']->getLL('swapPage') . '" onclick="return confirm(\'' . sprintf($GLOBALS['LANG']->getLL('swapPageQuestion'), $GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : '') . '\');" />';
                                }
                        } else {
-                               $actionLinks.= $this->doc->icons(1).'You are not permitted to publish from this workspace';
+                               $actionLinks.= $this->doc->icons(1) . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:no_publish_permission');
                        }
                }
-               $actionLinks.= '<input type="submit" name="_" value="Refresh" />';
-               $actionLinks.= '<input type="submit" name="_previewLink" value="Preview Link" />';
+
+               $actionLinks.= '<input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('refresh') . '" />';
+               $actionLinks.= '<input type="submit" name="_previewLink" value="' . $GLOBALS['LANG']->getLL('previewLink') . '" />';
+               $actionLinks.= '<input type="checkbox" class="checkbox" name="_previewLink_wholeWorkspace" id="_previewLink_wholeWorkspace" value="1" /><label for="_previewLink_wholeWorkspace">' . $GLOBALS['LANG']->getLL('allowPreviewOfWholeWorkspace') . '</label>';
                $actionLinks.= $this->displayWorkspaceOverview_allStageCmd();
 
                if ($actionLinks || count($errors))     {
-                       $this->content.= $this->doc->section('',$actionLinks.(count($errors) ? '<h3>Errors:</h3><br/>'.implode('<br/>',$errors).'<hr/>' : ''),0,1);
+                       $this->content .= $this->doc->section('', $actionLinks . (count($errors) ? '<h3>' . $GLOABLS['LANG']->getLL('errors') . '</h3><br />' . implode('<br />', $errors) . '<hr />' : ''), 0, 1);
                }
 
                if (t3lib_div::_POST('_previewLink'))   {
-                       $params = 'id='.$this->id.'&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS='.$GLOBALS['BE_USER']->workspace;
-                       $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid']);
+                       $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
+                       $ttlHours = ($ttlHours ? $ttlHours : 24*2);
 
-                       $this->content.= $this->doc->section('Preview Url:','You can preview this page from the workspace using this link for the next 48 hours (does not require backend login):<br/><br/><a target="_blank" href="'.htmlspecialchars($previewUrl).'">'.$previewUrl.'</a>',0,1);
+                       if (t3lib_div::_POST('_previewLink_wholeWorkspace'))    {
+                               $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours,$GLOBALS['BE_USER']->workspace).'&id='.intval($this->id);
+                       } else {
+                               $params = 'id='.$this->id.'&ADMCMD_previewWS='.$GLOBALS['BE_USER']->workspace;
+                               $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours);
+                       }
+                       $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('previewUrl'), sprintf($GLOBALS['LANG']->getLL('previewInstruction'), $ttlHours) . '<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>', 0, 1);
                }
 
                        // Output overview content:
                $this->content.= $this->doc->spacer(15);
-               $this->content.= $this->doc->section($this->details ? 'Details for version' : 'Workspace management', $WSoverview,0,1);
+               $this->content.= $this->doc->section($this->details ? $GLOBALS['LANG']->getLL('versionDetails') : $GLOBALS['LANG']->getLL('wsManagement'), $WSoverview,0,1);
 
        }
 
+       function workspaceMenu() {
+               if($this->id) {
+                       $menu = '';
+                       if ($GLOBALS['BE_USER']->workspace===0) {
+                               $menu.= t3lib_BEfunc::getFuncMenu($this->id,'SET[filter]',$this->MOD_SETTINGS['filter'],$this->MOD_MENU['filter']);
+                               $menu.= t3lib_BEfunc::getFuncMenu($this->id,'SET[display]',$this->MOD_SETTINGS['display'],$this->MOD_MENU['display']);
+                       }
+                       if (!$this->details && $GLOBALS['BE_USER']->workspace && !$this->diffOnly)      {
+                               $menu.= t3lib_BEfunc::getFuncCheck($this->id,'SET[diff]',$this->MOD_SETTINGS['diff'],'','','id="checkDiff"').' <label for="checkDiff">' . $GLOBALS['LANG']->getLL('showDiffView') . '</label>';
+                       }
+
+                       if ($menu)      {
+                               return $menu;
+                       }
+               }
+       }
+
        /**
         * Rendering the overview of versions in the current workspace
         *
@@ -729,9 +808,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                if (count($pArray))     {
                        $tableRows[] = '
                                <tr class="bgColor5 tableheader">
-                                       '.($this->diffOnly?'':'<td nowrap="nowrap" colspan="2">Live Version:</td>').'
-                                       <td nowrap="nowrap" colspan="2">Draft Versions:</td>
-                                       <td nowrap="nowrap"'.($this->diffOnly?' colspan="2"':' colspan="4"').'>Controls:</td>
+                                       '.($this->diffOnly?'':'<td nowrap="nowrap" colspan="2">' . $GLOBALS['LANG']->getLL('liveVersion') . '</td>').'
+                                       <td nowrap="nowrap" colspan="2">' . $GLOBALS['LANG']->getLL('wsVersions') . '</td>
+                                       <td nowrap="nowrap"'.($this->diffOnly?' colspan="2"':' colspan="4"').'>' . $GLOBALS['LANG']->getLL('controls') . '</td>
                                </tr>';
 
                                // Add lines from overview:
@@ -740,8 +819,10 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $table = '<table border="0" cellpadding="0" cellspacing="1" class="lrPadding workspace-overview">'.implode('',$tableRows).'</table>';
                } else $table = '';
 
-               $linkBack = t3lib_div::_GP('returnUrl') ? '<a href="'.htmlspecialchars(t3lib_div::_GP('returnUrl')).'" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/goback.gif','width="14" height="14"').' alt="" />Click here to go back</a><br/><br/>' : '';
-               $resetDiffOnly = $this->diffOnly ? '<a href="index.php?id='.intval($this->id).'" class="typo3-goBack">Show all information</a><br/><br/>' : '';
+               $linkBack = t3lib_div::_GP('returnUrl') ? '<a href="' . htmlspecialchars(t3lib_div::_GP('returnUrl')) . '" class="typo3-goBack">' .
+                               t3lib_iconWorks::getSpriteIcon('actions-view-go-back') . $GLOBALS['LANG']->getLL('goBack', TRUE) .
+                       '</a><br /><br />' : '';
+               $resetDiffOnly = $this->diffOnly ? '<a href="index.php?id=' . intval($this->id) . '" class="typo3-goBack">' . $GLOBALS['LANG']->getLL('showAllInformation') . '</a><br /><br />' : '';
 
                $versionSelector = $GLOBALS['BE_USER']->workspace ? $this->doc->getVersionSelector($this->id) : '';
 
@@ -793,48 +874,55 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                                                        // Get the offline version record and icon:
                                                $rec_off = t3lib_BEfunc::getRecord($table,$rec['uid']);
+
+                                               // Prepare swap-mode values:
+                                               if ($table==='pages' && $rec_off['t3ver_swapmode']!=-1) {
+                                                       if ($rec_off['t3ver_swapmode']>0)       {
+                                                               $vType = 'branch';
+                                                       } else {
+                                                               $vType = 'page';
+                                                       }
+                                               } else {
+                                                       $vType = 'element';
+                                               }
+
+                                               // Get icon
                                                $icon = t3lib_iconWorks::getIconImage($table, $rec_off, $this->doc->backPath, ' align="top" title="'.t3lib_BEfunc::getRecordIconAltText($rec_off,$table).'"');
-                                               $icon = $this->doc->wrapClickMenuOnIcon($icon, $table, $rec_off['uid'], 1, '', '+edit,view,info,delete');
+                                               $tempUid = ($table != 'pages' || $vType==='branch' || $GLOBALS['BE_USER']->workspace===0 ? $rec_off['uid'] : $rec_on['uid']);
+                                               $icon = $this->doc->wrapClickMenuOnIcon($icon, $table, $tempUid, 1, '', '+edit,' . ($table == 'pages' ? 'view,info,' : '') . 'delete');
 
                                                        // Prepare diff-code:
                                                if ($this->MOD_SETTINGS['diff'] || $this->diffOnly)     {
                                                        $diffCode = '';
                                                        list($diffHTML,$diffPct) = $this->createDiffView($table, $rec_off, $rec_on);
                                                        if ($rec_on['t3ver_state']==1)  {       // New record:
-                                                               $diffCode.= $this->doc->icons(1).'New element<br/>';    // TODO Localize?
+                                                               $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('newElement') . '<br />';
                                                                $diffCode.= $diffHTML;
                                                        } elseif ($rec_off['t3ver_state']==2)   {
-                                                               $diffCode.= $this->doc->icons(2).'Deleted element<br/>';
+                                                               $diffCode.= $this->doc->icons(2) . $GLOBALS['LANG']->getLL('deletedElement') . '<br />';
+                                                       } elseif ($rec_on['t3ver_state']==3)    {
+                                                               $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPlaceholder') . '<br />';
+                                                       } elseif ($rec_off['t3ver_state']==4)   {
+                                                               $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPointer') . '<br />';
                                                        } else {
-                                                               $diffCode.= ($diffPct<0 ? 'N/A' : ($diffPct ? $diffPct.'% change:' : ''));
+                                                               $diffCode.= ($diffPct<0 ? $GLOBALS['LANG']->getLL('notAvailable') : ($diffPct ? $diffPct . '% ' . $GLOBALS['LANG']->getLL('change') : ''));
                                                                $diffCode.= $diffHTML;
                                                        }
                                                } else $diffCode = '';
 
-                                                       // Prepare swap-mode values:
-                                               if ($table==='pages' && $rec_off['t3ver_swapmode']!=-1) {
-                                                       if ($rec_off['t3ver_swapmode']>0)       {
-                                                               $vType = 'branch';
-                                                       } else {
-                                                               $vType = 'page';
-                                                       }
-                                               } else {
-                                                       $vType = 'element';
-                                               }
-
                                                switch($vType) {
                                                        case 'element':
-                                                               $swapLabel = ' [Element]';
+                                                               $swapLabel = $GLOBALS['LANG']->getLL('element');
                                                                $swapClass = 'ver-element';
                                                                $warnAboutVersions_nonPages = $warnAboutVersions_page;  // Setting this if sub elements are found with a page+content (must be rendered prior to this of course!)
                                                        break;
                                                        case 'page':
-                                                               $swapLabel = ' [Page]';
+                                                               $swapLabel = $GLOBALS['LANG']->getLL('page');
                                                                $swapClass = 'ver-page';
                                                                $warnAboutVersions_page = !$this->showWorkspaceCol;             // This value is true only if multiple workspaces are shown and we need the opposite here.
                                                        break;
                                                        case 'branch':
-                                                               $swapLabel = ' [Branch]';
+                                                               $swapLabel = $GLOBALS['LANG']->getLL('branch');
                                                                $swapClass = 'ver-branch';
                                                        break;
                                                }
@@ -849,11 +937,11 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                                                        // Create version element:
                                                $versionsInOtherWS = $this->versionsInOtherWS($table, $rec_on['uid']);
-                                               $versionsInOtherWSWarning = $versionsInOtherWS && $GLOBALS['BE_USER']->workspace!==0 ? '<br/>'.$this->doc->icons(2).'Other version(s) in workspace '.$versionsInOtherWS : '';
-                                               $multipleWarning = (!$mainCell && $GLOBALS['BE_USER']->workspace!==0? '<br/>'.$this->doc->icons(3).'<b>Multiple versions in same workspace!</b>' : '');
-                                               $verWarning = $warnAboutVersions || ($warnAboutVersions_nonPages && $GLOBALS['TCA'][$table]['ctrl']['versioning_followPages'])? '<br/>'.$this->doc->icons(3).'<b>Version inside version!</b>' : '';
+                                               $versionsInOtherWSWarning = $versionsInOtherWS && $GLOBALS['BE_USER']->workspace !== 0 ? '<br />' . $this->doc->icons(2) . $GLOBALS['LANG']->getLL('otherVersions') . $versionsInOtherWS : '';
+                                               $multipleWarning = (!$mainCell && $GLOBALS['BE_USER']->workspace !== 0 ? '<br />' . $this->doc->icons(3) . '<strong>' . $GLOBALS['LANG']->getLL('multipleVersions') . '</strong>' : '');
+                                               $verWarning = $warnAboutVersions || ($warnAboutVersions_nonPages && $GLOBALS['TCA'][$table]['ctrl']['versioning_followPages']) ? '<br />' . $this->doc->icons(3) . '<strong>' . $GLOBALS['LANG']->getLL('versionInVersion') . '</strong>' : '';
                                                $verElement = $icon.
-                                                       (!$this->details ? '<a href="'.htmlspecialchars($this->doc->backPath.t3lib_extMgm::extRelPath('version').'cm1/index.php?id='.($table==='pages'?$rec_on['uid']:$rec_on['pid']).'&details='.rawurlencode($table.':'.$rec_off['uid']).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">' : '').
+                                                       (!$this->details ? '<a href="'.htmlspecialchars($this->doc->backPath.t3lib_extMgm::extRelPath('version').'cm1/index.php?id='.($table==='pages'?$rec_on['uid']:$rec_on['pid']).'&details='.rawurlencode($table.':'.$rec_off['uid']).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'">' : '').
                                                        t3lib_BEfunc::getRecordTitle($table,$rec_off,TRUE).
                                                        (!$this->details ? '</a>' : '').
                                                        $versionsInOtherWSWarning.
@@ -866,13 +954,13 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                                        $this->displayWorkspaceOverview_commandLinks($table,$rec_on,$rec_off,$vType).
                                                                        htmlspecialchars($swapLabel).
                                                                        '&nbsp;&nbsp;</td>
-                                                               '.(!$this->diffOnly?'<td nowrap="nowrap"><b>Lifecycle:</b> '.htmlspecialchars($this->formatCount($rec_off['t3ver_count'])).'</td>'.             // Lifecycle
+                                                               '.(!$this->diffOnly?'<td nowrap="nowrap"><strong>' . $GLOBALS['LANG']->getLL('lifecycle')  . ':</strong> '.htmlspecialchars($this->formatCount($rec_off['t3ver_count'])).'</td>'.               // Lifecycle
                                                                        ($this->showWorkspaceCol ? '
-                                                               <td nowrap="nowrap">&nbsp;&nbsp;<b>Workspace:</b> '.htmlspecialchars($this->formatWorkspace($rec_off['t3ver_wsid'])).'</td>' : ''):'');
+                                                               <td nowrap="nowrap">&nbsp;&nbsp;<strong>' . $GLOBALS['LANG']->getLL('workspace')  . ':</strong> '.htmlspecialchars($this->formatWorkspace($rec_off['t3ver_wsid'])).'</td>' : ''):'');
 
                                                if ($diffCode)  {
                                                        $verElement = $verElement.'
-                                                       <br/><b>Difference to live element:</b>
+                                                       <br /><strong>' . $GLOBALS['LANG']->getLL('diffToLiveElement') . '</strong>
                                                        <table border="0" cellpadding="0" cellspacing="0" class="ver-verElement">
                                                                <tr>
                                                                        <td class="c-diffCell">'.$diffCode.'</td>
@@ -935,32 +1023,73 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        function displayWorkspaceOverview_allStageCmd() {
 
-               if (count($this->stageIndex[1]))        {       // Review:
-                       $sId = 1;
-                       $color = '#666666';
-                       $label = 'Comment for Reviewer:';
-                       $titleAttrib = 'Send all to Review';
-               } elseif(count($this->stageIndex[10]))  {       // Publish:
-                       $sId = 10;
-                       $color = '#6666cc';
-                       $label = 'Comment for Publisher:';
-                       $titleAttrib = 'Approve all for Publishing';
+               $table = t3lib_div::_GP('table');
+               if ($table && $table!='pages')  {
+                       $uid = t3lib_div::_GP('uid');
+                       if ($rec_off = t3lib_BEfunc::getRecordWSOL($table,$uid)) {
+                               $uid = $rec_off['_ORIG_uid'];
+                       }
+               } else $table = '';
+
+               if ($table)     {
+                       if ($uid && $this->recIndex[$table][$uid])      {
+                               $sId = $this->recIndex[$table][$uid];
+                               switch($sId)    {
+                                       case 1:
+                                               $label = $GLOBALS['LANG']->getLL('commentForReviewer');
+                                       break;
+                                       case 10:
+                                               $label = $GLOBALS['LANG']->getLL('commentForPublisher');
+                                       break;
+                               }
+                       } else $sId = 0;
                } else {
-                       $sId = 0;
+                       if (count($this->stageIndex[1]))        {       // Review:
+                               $sId = 1;
+                               $color = '#666666';
+                               $label = $GLOBALS['LANG']->getLL('sendItemsToReview') . $GLOBALS['LANG']->getLL('commentForReviewer');
+                               $titleAttrib = $GLOBALS['LANG']->getLL('sendAllToReview');
+                       } elseif(count($this->stageIndex[10]))  {       // Publish:
+                               $sId = 10;
+                               $color = '#6666cc';
+                               $label = $GLOBALS['LANG']->getLL('approveToPublish') . $GLOBALS['LANG']->getLL('commentForPublisher');
+                               $titleAttrib = $GLOBALS['LANG']->getLL('approveAllToPublish');
+                       } else {
+                               $sId = 0;
+                       }
                }
 
                if ($sId>0)     {
                        $issueCmd = '';
-                       foreach($this->stageIndex[$sId] as $table => $uidArray) {
-                               $issueCmd.='&cmd['.$table.']['.implode(',',$uidArray).'][version][action]=setStage';
-                               $issueCmd.='&cmd['.$table.']['.implode(',',$uidArray).'][version][stageId]='.$sId;
+                       $itemCount = 0;
+
+                       if ($table && $uid && $this->recIndex[$table][$uid])    {
+                               $issueCmd.='&cmd['.$table.']['.$uid.'][version][action]=setStage';
+                               $issueCmd.='&cmd['.$table.']['.$uid.'][version][stageId]='.$this->recIndex[$table][$uid];
+                       } else {
+                               foreach($this->stageIndex[$sId] as $table => $uidArray) {
+                                       $issueCmd.='&cmd['.$table.']['.implode(',',$uidArray).'][version][action]=setStage';
+                                       $issueCmd.='&cmd['.$table.']['.implode(',',$uidArray).'][version][stageId]='.$sId;
+                                       $itemCount+=count($uidArray);
+                               }
                        }
 
-                       $onClick = 'var commentTxt=window.prompt("'.$label.'","");
-                                                       if (commentTxt!=null) {window.location.href="'.$this->doc->issueCommand($issueCmd).'&generalComment="+escape(commentTxt);}'.
-                                                       ' return false;';
+                       $onClick = 'var commentTxt=window.prompt("'.sprintf($label,$itemCount).'","");
+                                                       if (commentTxt!=null) {window.location.href="'.$this->doc->issueCommand($issueCmd,$this->REQUEST_URI).'&generalComment="+escape(commentTxt);}';
+
+                       if (t3lib_div::_GP('sendToReview'))     {
+                               $onClick.= ' else {window.location.href = "'.$this->REQUEST_URI.'"}';
+                               $actionLinks.=
+                                       $this->doc->wrapScriptTags($onClick);
+                       } else {
+                               $onClick.= ' return false;';
+                               $actionLinks.=
+                                       '<input type="submit" name="_" value="'.htmlspecialchars($titleAttrib).'" onclick="'.htmlspecialchars($onClick).'" />';
+                       }
+               } elseif (t3lib_div::_GP('sendToReview'))       {
+                       $onClick = 'window.location.href = "'.$this->REQUEST_URI.'";';
                        $actionLinks.=
-                               '<input type="submit" name="_" value="'.htmlspecialchars($titleAttrib).'" onclick="'.htmlspecialchars($onClick).'" />';
+                               $this->doc->wrapScriptTags($onClick);
                } else $actionLinks = '';
 
                return $actionLinks;
@@ -999,7 +1128,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                if (!isset($this->formatWorkspace_cache[$wsid]))        {
                        switch($wsid)   {
                                case -1:
-                                       $this->formatWorkspace_cache[$wsid] = '[Offline]';
+                                       $this->formatWorkspace_cache[$wsid] = $GLOBALS['LANG']->getLL('offline');
                                break;
                                case 0:
                                        $this->formatWorkspace_cache[$wsid] = '';       // Does not output anything for ONLINE because it might confuse people to think that the elemnet IS online which is not the case - only that it exists as an offline version in the online workspace...
@@ -1026,13 +1155,13 @@ class tx_version_cm1 extends t3lib_SCbase {
                if (!isset($this->formatCount_cache[$count]))   {
                        switch($count)  {
                                case 0:
-                                       $this->formatCount_cache[$count] = 'Draft';
+                                       $this->formatCount_cache[$count] = $GLOBALS['LANG']->getLL('draft');
                                break;
                                case 1:
-                                       $this->formatCount_cache[$count] = 'Archive';
+                                       $this->formatCount_cache[$count] = $GLOBALS['LANG']->getLL('archive');
                                break;
                                default:
-                                       $this->formatCount_cache[$count] = 'Published '.$count.' times';
+                                       $this->formatCount_cache[$count] = sprintf($GLOBALS['LANG']->getLL('publishedXTimes'), $count);
                                break;
                        }
                }
@@ -1093,29 +1222,29 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                        switch($data['stage'])  {
                                case 1:
-                                       $text = 'sent element to "Review"';
+                                       $text = $GLOBALS['LANG']->getLL('stage.sentToReview');
                                break;
                                case 10:
-                                       $text = 'approved for "Publish"';
+                                       $text = $GLOBALS['LANG']->getLL('stage.approvedForPublish');
                                break;
                                case -1:
-                                       $text = 'rejected element!';
+                                       $text = $GLOBALS['LANG']->getLL('stage.rejectedElement');
                                break;
                                case 0:
-                                       $text = 'reset to "Editing"';
+                                       $text = $GLOBALS['LANG']->getLL('stage.resetToEdit');
                                break;
                                default:
-                                       $text = '[undefined]';
+                                       $text = $GLOBALS['LANG']->getLL('stage.undefined');
                                break;
                        }
                        $text = t3lib_BEfunc::dateTime($dat['tstamp']).': "'.$username.'" '.$text;
-                       $text.= ($data['comment']?'<br/>User Comment: <em>'.$data['comment'].'</em>':'');
+                       $text.= ($data['comment'] ? '<br />' . $GLOBALS['LANG']->getLL('userComment') . ': <em>' . htmlspecialchars($data['comment']) . '</em>' : '');
 
                        $entry[] = $text;
                }
 
                return count($entry) ? '<span onmouseover="document.getElementById(\'log_'.$table.$id.'\').style.visibility = \'visible\';" onmouseout="document.getElementById(\'log_'.$table.$id.'\').style.visibility = \'hidden\';">'.$stageCommands.' ('.count($entry).')</span>'.
-                               '<div class="logLayer" style="visibility: hidden; position: absolute;" id="log_'.$table.$id.'">'.implode('<hr/>',$entry).'</div>' : $stageCommands;
+                               '<div class="logLayer" style="visibility: hidden; position: absolute;" id="log_'.$table.$id.'">'.implode('<hr/>',array_reverse($entry)).'</div>' : $stageCommands;
        }
 
        /**
@@ -1130,12 +1259,12 @@ class tx_version_cm1 extends t3lib_SCbase {
                global $TCA;
 
                if (!$this->details && ($GLOBALS['BE_USER']->workspace===0 || !$this->MOD_SETTINGS['expandSubElements']))       {       // In online workspace we have a reduced view because otherwise it will bloat the listing:
-                       return '<br/>
+                       return '<br />
                                        <img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/joinbottom.gif','width="18" height="16"').' align="top" alt="" title="" />'.
                                        ($origId ?
-                                               '<a href="'.htmlspecialchars($this->doc->backPath.t3lib_extMgm::extRelPath('version').'cm1/index.php?id='.$uid.'&details='.rawurlencode('pages:'.$uid).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                                               '<span class="typo3-dimmed"><em>[Sub elements, click for details]</em><span></a>' :
-                                               '<span class="typo3-dimmed"><em>[Sub elements]</em><span>');
+                                               '<a href="'.htmlspecialchars($this->doc->backPath.t3lib_extMgm::extRelPath('version').'cm1/index.php?id='.$uid.'&details='.rawurlencode('pages:'.$uid).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'">'.
+                                               '<span class="typo3-dimmed"><em>' . $GLOBALS['LANG']->getLL('subElementsClick')  . '</em><span></a>' :
+                                               '<span class="typo3-dimmed"><em>' . $GLOBALS['LANG']->getLL('subElements') . '</em><span>');
                } else {        // For an offline workspace, show sub elements:
 
                        $tCell = array();
@@ -1290,7 +1419,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                                '</div>';
                                                } else {
                                                        $diffCode =
-                                                               ($diffPct<0 ? 'N/A' : ($diffPct ? $diffPct.'% change:' : '')).
+                                                               ($diffPct<0 ? $GLOBALS['LANG']->getLL('notAvailable') : ($diffPct ? $diffPct . '% ' . $GLOBALS['LANG']->getLL('change') : '')).
                                                                $diffHTML;
                                                }
                                        }
@@ -1367,8 +1496,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $tRows = array();
                        $tRows[] = '
                                <tr class="bgColor5 tableheader">
-                                       <td>Fieldname:</td>
-                                       <td width="98%" nowrap="nowrap">Colored diff-view:</td>
+                                       <td>' . $GLOBALS['LANG']->getLL('fieldname')  . ':</td>
+                                       <td width="98%" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('coloredDiffView') . ':</td>
                                </tr>
                        ';
 
@@ -1452,9 +1581,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                        if (count($tRows)>1)    {
                                $content.= '<table border="0" cellpadding="1" cellspacing="1" class="diffTable">'.implode('',$tRows).'</table>';
                        } else {
-                               $content.= '<span class="nobr">'.$this->doc->icons(1).'Complete match on editable fields.</span>';
+                               $content.= '<span class="nobr">'.$this->doc->icons(1) . $GLOBALS['LANG']->getLL('completeMatch') . '</span>';
                        }
-               } else $content.= $this->doc->icons(3).'ERROR: Records could strangely not be found!';
+               } else $content.= $this->doc->icons(3) . $GLOBALS['LANG']->getLL('errorRecordsNotFound');
 
                        // Return value:
                return array($content,$pctChange);
@@ -1472,31 +1601,31 @@ class tx_version_cm1 extends t3lib_SCbase {
                switch((int)$rec_off['t3ver_stage'])    {
                        case 0:
                                $sId = 1;
-                               $sLabel = 'Editing';
+                               $sLabel = $GLOBALS['LANG']->getLL('editing');
                                $color = '#666666';
-                               $label = 'Comment for Reviewer:';
-                               $titleAttrib = 'Send to Review';
+                               $label = $GLOBALS['LANG']->getLL('commentForReviewer');
+                               $titleAttrib = $GLOBALS['LANG']->getLL('sendToReview');
                        break;
                        case 1:
                                $sId = 10;
-                               $sLabel = 'Review';
+                               $sLabel = $GLOBALS['LANG']->getLL('review');
                                $color = '#6666cc';
-                               $label = 'Comment for Publisher:';
-                               $titleAttrib = 'Approve for Publishing';
+                               $label = $GLOBALS['LANG']->getLL('commentForPublisher');
+                               $titleAttrib = $GLOBALS['LANG']->getLL('approveForPublishing');
                        break;
                        case 10:
-                               $sLabel = 'Publish';
+                               $sLabel = $GLOBALS['LANG']->getLL('publish');
                                $color = '#66cc66';
                        break;
                        case -1:
-                               $sLabel = $this->doc->icons(2).'Rejected';
+                               $sLabel = $this->doc->icons(2) . $GLOBALS['LANG']->getLL('rejected');
                                $sId = 0;
                                $color = '#ff0000';
-                               $label = 'Comment:';
-                               $titleAttrib = 'Reset stage';
+                               $label = $GLOBALS['LANG']->getLL('comment');
+                               $titleAttrib = $GLOBALS['LANG']->getLL('resetStage');
                        break;
                        default:
-                               $sLabel = 'Undefined';
+                               $sLabel = $GLOBALS['LANG']->getLL('undefined');
                                $sId = 0;
                                $color = '';
                        break;
@@ -1506,7 +1635,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                $raiseOk = !$GLOBALS['BE_USER']->workspaceCannotEditOfflineVersion($table,$rec_off);
 
                if ($raiseOk && $rec_off['t3ver_stage']!=-1)    {
-                       $onClick = 'var commentTxt=window.prompt("Please explain why you reject:","");
+                       $onClick = 'var commentTxt=window.prompt("' . $GLOBALS['LANG']->getLL('rejectExplain') . '","");
                                                        if (commentTxt!=null) {window.location.href="'.$this->doc->issueCommand(
                                                        '&cmd['.$table.']['.$rec_off['uid'].'][version][action]=setStage'.
                                                        '&cmd['.$table.']['.$rec_off['uid'].'][version][stageId]=-1'
@@ -1514,8 +1643,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                        ' return false;';
                                // Reject:
                        $actionLinks.=
-                               '<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/down.gif','width="14" height="14"').' alt="" align="top" title="Reject" />'.
+                               '<a href="#" onclick="'.htmlspecialchars($onClick).'" title="' . $GLOBALS['LANG']->getLL('reject', TRUE) . '">'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-move-down') .
                                '</a>';
                } else {
                                // Reject:
@@ -1535,11 +1664,12 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                        ' return false;';
                        if ($rec_off['t3ver_stage']!=10)        {
                                $actionLinks.=
-                                       '<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/up.gif','width="14" height="14"').' alt="" align="top" title="'.htmlspecialchars($titleAttrib).'" />'.
+                                       '<a href="#" onclick="'.htmlspecialchars($onClick).'" title="' . htmlspecialchars($titleAttrib) . '">' .
+                                               t3lib_iconWorks::getSpriteIcon('actions-move-up') .
                                        '</a>';
 
                                $this->stageIndex[$sId][$table][] = $rec_off['uid'];
+                               $this->recIndex[$table][$rec_off['uid']] = $sId;
                        }
                }
                return $actionLinks;
@@ -1560,17 +1690,17 @@ class tx_version_cm1 extends t3lib_SCbase {
                                '<a href="'.htmlspecialchars($this->doc->issueCommand(
                                                '&cmd['.$table.']['.$rec_on['uid'].'][version][action]=swap'.
                                                '&cmd['.$table.']['.$rec_on['uid'].'][version][swapWith]='.$rec_off['uid']
-                                               )).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/insert1.gif','width="14" height="14"').' alt="" align="top" title="Publish" />'.
+                                               )).'" title="' . $GLOBALS['LANG']->getLL('publish', TRUE) . '">'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-version-swap-versions') .
                                '</a>';
-                       if ($GLOBALS['BE_USER']->workspaceSwapAccess() && (int)$rec_on['t3ver_state']!==1 && (int)$rec_off['t3ver_state']!==2)  {
+                       if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
                                $actionLinks.=
                                        '<a href="'.htmlspecialchars($this->doc->issueCommand(
                                                        '&cmd['.$table.']['.$rec_on['uid'].'][version][action]=swap'.
                                                        '&cmd['.$table.']['.$rec_on['uid'].'][version][swapWith]='.$rec_off['uid'].
                                                        '&cmd['.$table.']['.$rec_on['uid'].'][version][swapIntoWS]=1'
-                                                       )).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/swap.png','width="14" height="14"').' alt="" align="top" title="Swap" />'.
+                                                       )).'" title="' . $GLOBALS['LANG']->getLL('swap', TRUE) . '">'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-version-swap-workspace') .
                                        '</a>';
                        }
                }
@@ -1578,30 +1708,30 @@ class tx_version_cm1 extends t3lib_SCbase {
                if (!$GLOBALS['BE_USER']->workspaceCannotEditOfflineVersion($table,$rec_off))   {
                                // Release
                        $actionLinks.=
-                               '<a href="'.htmlspecialchars($this->doc->issueCommand('&cmd['.$table.']['.$rec_off['uid'].'][version][action]=clearWSID')).'" onclick="return confirm(\'Remove from workspace?\');">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/group_clear.gif','width="14" height="14"').' alt="" align="top" title="Remove from workspace" />'.
+                               '<a href="'.htmlspecialchars($this->doc->issueCommand('&cmd['.$table.']['.$rec_off['uid'].'][version][action]=clearWSID')).'" onclick="return confirm(\'' . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE) . '?\');" title="' . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE) . '">'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-version-document-remove') .
                                '</a>';
 
                                // Edit
                        if ($table==='pages' && $vType!=='element')     {
                                $tempUid = ($vType==='branch' || $GLOBALS['BE_USER']->workspace===0 ? $rec_off['uid'] : $rec_on['uid']);
                                $actionLinks.=
-                                       '<a href="#" onclick="top.loadEditId('.$tempUid.');top.goToModule(\''.$this->pageModule.'\'); return false;">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,t3lib_extMgm::extRelPath('cms').'layout/layout.gif','width="14" height="12"').' title="Edit page" alt="" />'.
+                                       '<a href="#" onclick="top.loadEditId('.$tempUid.');top.goToModule(\''.$this->pageModule.'\'); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE) . '">'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-version-page-open') .
                                        '</a>';
                        } else {
                                $params = '&edit['.$table.']['.$rec_off['uid'].']=edit';
                                $actionLinks.=
-                                       '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->doc->backPath)).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/edit2.gif','width="12" height="12"').' title="Edit element" alt="" />'.
+                                       '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->doc->backPath)).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE). '">'.
+                                               t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                        '</a>';
                        }
                }
 
                        // History/Log
                $actionLinks.=
-                       '<a href="'.htmlspecialchars($this->doc->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$rec_off['uid']).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/history2.gif','width="13" height="12"').' title="Show Log" alt="" />'.
+                       '<a href="'.htmlspecialchars($this->doc->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$rec_off['uid']).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'" title="' . $GLOBALS['LANG']->getLL('showLog', TRUE) . '">'.
+                               t3lib_iconWorks::getSpriteIcon('actions-document-history-open') .
                        '</a>';
 
                        // View
@@ -1609,7 +1739,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $tempUid = ($vType==='branch' || $GLOBALS['BE_USER']->workspace===0 ? $rec_off['uid'] : $rec_on['uid']);
                        $actionLinks.=
                                '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($tempUid,$this->doc->backPath,t3lib_BEfunc::BEgetRootLine($tempUid))).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/zoom.gif','width="12" height="12"').' title="" alt="" />'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                '</a>';
                }
 
@@ -1631,22 +1761,22 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        // Edit
                                if ($table==='pages')   {
                                        $actionLinks.=
-                                               '<a href="#" onclick="top.loadEditId('.$uid.');top.goToModule(\''.$this->pageModule.'\'); return false;">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,t3lib_extMgm::extRelPath('cms').'layout/layout.gif','width="14" height="12"').' title="Edit page" alt="" />'.
+                                               '<a href="#" onclick="top.loadEditId('.$uid.');top.goToModule(\''.$this->pageModule.'\'); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE) . '">'.
+                                                       t3lib_iconWorks::getSpriteIcon('apps-version-page-open') .
                                                '</a>';
                                } else {
                                        $params = '&edit['.$table.']['.$uid.']=edit';
                                        $actionLinks.=
-                                               '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->doc->backPath)).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/edit2.gif','width="12" height="12"').' title="Edit element" alt="" />'.
+                                               '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->doc->backPath)).'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE) . '">'.
+                                                       t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                                '</a>';
                                }
                        }
 
                                // History/Log
                        $actionLinks.=
-                               '<a href="'.htmlspecialchars($this->doc->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$uid).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/history2.gif','width="13" height="12"').' title="Show Log" alt="" />'.
+                               '<a href="'.htmlspecialchars($this->doc->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$uid).'&returnUrl='.rawurlencode($this->REQUEST_URI)).'" title="' . $GLOBALS['LANG']->getLL('showLog', TRUE) . '">'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-history-open') .
                                '</a>';
                }
 
@@ -1654,7 +1784,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                if ($table==='pages')   {
                        $actionLinks.=
                                '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($uid,$this->doc->backPath,t3lib_BEfunc::BEgetRootLine($uid))).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/zoom.gif','width="12" height="12"').' title="" alt="" />'.
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                '</a>';
                }
 
@@ -1696,6 +1826,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                $tce->start(array(), $cmd);
                                $tce->process_cmdmap();
 
+                               t3lib_BEfunc::setUpdateSignal('updatePageTree');
+
                                return $tce->errorLog;
                        }
                }