Fixed bug: #11006: Tooltip for page path in Page/List module is missing (thanks to...
authorIngo Renner <ingo.renner@typo3.org>
Mon, 20 Jul 2009 16:05:21 +0000 (16:05 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Mon, 20 Jul 2009 16:05:21 +0000 (16:05 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@5729 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/stylesheet.css
typo3/template.php

index f82703c..7293eb7 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-20  Ingo Renner  <ingo@typo3.org>
+
+       * Fixed bug: #11006: Tooltip for page path in Page/List module is missing (thanks to Steffen Gebert)
+
 2009-07-19  Oliver Hader  <oliver@typo3.org>
 
        * Fixed bug #6875: IRRE - Sorting of child records is inverted on moving parent record to different page (thanks to Nabil Saleh)
index 966b7c8..6b007db 100755 (executable)
@@ -1667,6 +1667,9 @@ span.typo3-docheader-pagePath {
        font-weight: bold;
 }
 
+span.typo3-docheader-pagePath abbr {
+       border-bottom: none;
+}
 
 /* - - - - - - - - - - - - - - - - - - - - -
 
index e6fff16..1c4ed50 100755 (executable)
@@ -1936,15 +1936,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;
        }