Commit d103cb85e07d0a65a496376940aef80cf5515601

Authored by michael
1 parent 9be2411c

added displayDocumentPath method


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1936 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc
... ... @@ -11,7 +11,24 @@
11 11 * @author Michael Joseph <michael@jamwarehouse.com>, Jam Warehouse (Pty) Ltd, South Africa
12 12 * @package presentation.lookAndFeel.knowledgeTree.documentmanagement
13 13 */
14   -
  14 +
  15 +/**
  16 + *
  17 + */
  18 +function displayDocumentPath($iDocumentID) {
  19 + global $default;
  20 + $oDocument = Document::get($iDocumentID);
  21 + if ($oDocument) {
  22 + $iFolderID = $oDocument->getFolderID();
  23 + $sDocumentName = $oDocument->getName();
  24 + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  25 + $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
  26 + $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse") . " > " . $sDocumentName;
  27 + return "<table border=\"0\" width=\"600\"><tr><td bgcolor=\"$sTDBGColour\">$sDocumentPath</td></tr></table>\n";
  28 + } else {
  29 + return "";
  30 + }
  31 +}
15 32  
16 33 /* only used when users choose a template document when setting up document linking
17 34 * on the folder collaboration page. Formats the link so that the child window
... ...