Added icon to edit record of page overlay for a translated page
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Sun, 4 Feb 2007 21:23:18 +0000 (21:23 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Sun, 4 Feb 2007 21:23:18 +0000 (21:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1985 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tsfebeuserauth.php
typo3/sysext/lang/locallang_tsfe.xml

index e3ff5f5..e095475 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+
+2007-02-04  Martin Kutschker  <martin.t.kutschker@blackbox.net>
+
+       * Added icon to edit record of page overlay for a translated page
+
 2007-02-04  Michael Stucki  <michael@typo3.org>
 
        * Extended db_mountpoint and file_mountpoint fields into to 255 bytes size
@@ -24,7 +29,7 @@
 
 2007-02-02  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
-       * Changed class.t3lib_cipboard.php and class.db_list_extra.inc to use new mod.php?M=xMOD_tximpexp (instead old impexp/app/index.php)
+       * Changed class.t3lib_clipboard.php and class.db_list_extra.inc to use new mod.php?M=xMOD_tximpexp (instead old impexp/app/index.php)
 
 2007-01-30  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index d401df2..5044a1b 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2006 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2007 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -607,7 +607,7 @@ $query.
                $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
                $langAllowed = $GLOBALS['BE_USER']->checkLanguageAccess($GLOBALS['TSFE']->sys_language_uid);
 
-               $toolBar='';
+               $toolBar = '';
                $id = $GLOBALS['TSFE']->id;
                $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'show_rechis.php?element='.rawurlencode('pages:'.$id).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'#latest">'.
                                        '<img src="'.TYPO3_mainDir.'gfx/history2.gif" width="13" height="12" hspace="2" border="0" align="top" title="'.$this->extGetLL('edit_recordHistory').'" alt="" /></a>';
@@ -630,6 +630,20 @@ $query.
                        $params='&edit[pages]['.$id.']=edit';
                        $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'alt_doc.php?'.$params.'&noView=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
                                        '<img src="'.TYPO3_mainDir.'gfx/edit2.gif" width="11" height="12" hspace="2" border="0" align="top" title="'.$this->extGetLL('edit_editPageProperties').'" alt="" /></a>';
+
+                       if ($GLOBALS['TSFE']->sys_language_uid && $langAllowed) {
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                                       'uid,pid,t3ver_state',  'pages_language_overlay',
+                                       'pid='.intval($id).' AND sys_language_uid='.$GLOBALS['TSFE']->sys_language_uid.$GLOBALS['TSFE']->sys_page->enableFields('pages_language_overlay'),
+                                       '', '', '1');
+                               $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               $GLOBALS['TSFE']->sys_page->versionOL('pages_language_overlay',$row);
+                               if (is_array($row))     {
+                                       $params='&edit[pages_language_overlay]['.$row['uid'].']=edit';
+                                       $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'alt_doc.php?'.$params.'&noView=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
+                                                       '<img src="'.TYPO3_mainDir.'gfx/edit3.gif" width="11" height="12" hspace="2" border="0" align="top" title="'.$this->extGetLL('edit_editPageOverlay').'" alt="" /></a>';
+                               }
+                       }
                }
                if ($this->check('modules','web_list')) {
                        $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'db_list.php?id='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
@@ -1112,4 +1126,4 @@ $query.
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tsfebeuserauth.php'])   {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tsfebeuserauth.php']);
 }
-?>
\ No newline at end of file
+?>
index 9886a46..1602de3 100755 (executable)
@@ -32,6 +32,7 @@
                        <label index="edit_move_page">Move page</label>
                        <label index="edit_newPage">Create new page</label>
                        <label index="edit_editPageProperties">Edit page properties</label>
+                       <label index="edit_editPageOverlay">Edit properties of translated page</label>
                        <label index="edit_db_list">Web&gt;List module</label>
                        <label index="tsdebug">TypoScript</label>
                        <label index="tsdebug_tree">Tree display:</label>