Fixed bug: #11006: Tooltip for page path in Page/List module is missing
authorFrancois Suter <francois.suter@typo3.org>
Fri, 8 May 2009 18:38:26 +0000 (18:38 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Fri, 8 May 2009 18:38:26 +0000 (18:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5402 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/stylesheet.css
typo3/template.php

index 1ffb8a6..49e7de9 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-08  Francois Suter  <francois@typo3.org>
+
+       * Fixed bug: #11006: Tooltip for page path in Page/List module is missing (thanks to Steffen Gebert)
+
 2009-05-08  Oliver Hader  <oliver@typo3.org>
 
        * Fixed bug #11053: TYPO3_DB uses $GLOBALS['TYPO3_DB'] instead of $this (thanks to Stefan Geith)
index fc46b1e..f555f81 100644 (file)
@@ -1706,6 +1706,9 @@ span.typo3-docheader-pagePath {
        font-weight: bold;
 }
 
+span.typo3-docheader-pagePath abbr {
+       border-bottom: none;
+}
 
 /* - - - - - - - - - - - - - - - - - - - - -
 
index 225f9d4..a04b7ba 100644 (file)
@@ -1942,15 +1942,24 @@ $str.=$this->docBodyTagBegin().
         * @return      string  Page path
         */
        protected function getPagePath($pageRecord) {
-               global $LANG;
                        // Is this a real page
                if ($pageRecord['uid']) {
-                       $title = $pageRecord['_thePath'];
+                       $title = $pageRecord['_thePathFull'];
                } else {
                        $title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
                }
                        // Setting the path of the page
-               $pagePath = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path', 1) . ': <span class="typo3-docheader-pagePath">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($title, -50)) . '</span>';
+               $pagePath = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.path', 1) . ': <span class="typo3-docheader-pagePath">';
+
+                       // crop the title to title limit (or 50, if not defined)
+               $cropLength = (empty($GLOBALS['BE_USER']->uc['titleLen'])) ? 50 : $GLOBALS['BE_USER']->uc['titleLen'];
+               $croppedTitle = t3lib_div::fixed_lgd_cs($title, -$cropLength);
+               if ($croppedTitle !== $title) {
+                       $pagePath .= '<abbr title="' . htmlspecialchars($title) . '">' . htmlspecialchars($croppedTitle) . '</abbr>';
+               } else {
+                       $pagePath .= htmlspecialchars($title);
+               }
+               $pagePath .= '</span>';
                return $pagePath;
        }