Commit 44f9179505474129c3a572b9194bcb5ac4c5724a
1 parent
7ff0d22e
added option to display a folder path without links
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2411 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
7 additions
and
4 deletions
presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc
| @@ -29,7 +29,6 @@ function displayFolderPathLink($aPathArray, $aPathNameArray, $sLinkPage = "") { | @@ -29,7 +29,6 @@ function displayFolderPathLink($aPathArray, $aPathNameArray, $sLinkPage = "") { | ||
| 29 | for ($i=0; $i<count($aPathArray); $i++) { | 29 | for ($i=0; $i<count($aPathArray); $i++) { |
| 30 | $iFolderID = $aPathArray[$i]; | 30 | $iFolderID = $aPathArray[$i]; |
| 31 | // retrieve the folder name for this folder | 31 | // retrieve the folder name for this folder |
| 32 | - //$sFolderName = Folder::getFolderName($iFolderID); | ||
| 33 | $sFolderName = $aPathNameArray[$i]; | 32 | $sFolderName = $aPathNameArray[$i]; |
| 34 | // generate a link back to this page setting fFolderID | 33 | // generate a link back to this page setting fFolderID |
| 35 | $sLink = generateLink($sLinkPage, | 34 | $sLink = generateLink($sLinkPage, |
| @@ -61,11 +60,15 @@ function displayFolderLink($oFolder, $sLinkPage = "") { | @@ -61,11 +60,15 @@ function displayFolderLink($oFolder, $sLinkPage = "") { | ||
| 61 | $oFolder->getName()); | 60 | $oFolder->getName()); |
| 62 | } | 61 | } |
| 63 | 62 | ||
| 64 | -function renderFolderPath($iFolderID, $sLinkURL) { | 63 | +function renderFolderPath($iFolderID, $sLinkURL, $bDisplayLinks = true) { |
| 65 | global $default; | 64 | global $default; |
| 66 | $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); | 65 | $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); |
| 67 | - $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); | ||
| 68 | - $sFolderPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), $sLinkURL); | 66 | + $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); |
| 67 | + if ($bDisplayLinks) { | ||
| 68 | + $sFolderPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), $sLinkURL); | ||
| 69 | + } else { | ||
| 70 | + $sFolderPath = implode(" > ", Folder::getFolderPathNamesAsArray($iFolderID)); | ||
| 71 | + } | ||
| 69 | return "<table border=\"0\" cellpadding=\"5\" width=\"600\"><tr><td bgcolor=\"$sTDBGColour\">$sFolderPath</td></tr></table>\n"; | 72 | return "<table border=\"0\" cellpadding=\"5\" width=\"600\"><tr><td bgcolor=\"$sTDBGColour\">$sFolderPath</td></tr></table>\n"; |
| 70 | } | 73 | } |
| 71 | 74 |