Commit 44f9179505474129c3a572b9194bcb5ac4c5724a

Authored by michael
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
presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc
... ... @@ -29,7 +29,6 @@ function displayFolderPathLink($aPathArray, $aPathNameArray, $sLinkPage = "") {
29 29 for ($i=0; $i<count($aPathArray); $i++) {
30 30 $iFolderID = $aPathArray[$i];
31 31 // retrieve the folder name for this folder
32   - //$sFolderName = Folder::getFolderName($iFolderID);
33 32 $sFolderName = $aPathNameArray[$i];
34 33 // generate a link back to this page setting fFolderID
35 34 $sLink = generateLink($sLinkPage,
... ... @@ -61,11 +60,15 @@ function displayFolderLink($oFolder, $sLinkPage = &quot;&quot;) {
61 60 $oFolder->getName());
62 61 }
63 62  
64   -function renderFolderPath($iFolderID, $sLinkURL) {
  63 +function renderFolderPath($iFolderID, $sLinkURL, $bDisplayLinks = true) {
65 64 global $default;
66 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 72 return "<table border=\"0\" cellpadding=\"5\" width=\"600\"><tr><td bgcolor=\"$sTDBGColour\">$sFolderPath</td></tr></table>\n";
70 73 }
71 74  
... ...