From c93f8e237630df1d292f2188351ab5a2aeca46b5 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Tue, 27 May 2003 15:01:46 +0000 Subject: [PATCH] added displayDocumentPath method --- presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc index 1bdd7a4..5f86a4c 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc @@ -11,7 +11,24 @@ * @author Michael Joseph , Jam Warehouse (Pty) Ltd, South Africa * @package presentation.lookAndFeel.knowledgeTree.documentmanagement */ - + +/** + * + */ +function displayDocumentPath($iDocumentID) { + global $default; + $oDocument = Document::get($iDocumentID); + if ($oDocument) { + $iFolderID = $oDocument->getFolderID(); + $sDocumentName = $oDocument->getName(); + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); + $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); + $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse") . " > " . $sDocumentName; + return "
$sDocumentPath
\n"; + } else { + return ""; + } +} /* only used when users choose a template document when setting up document linking * on the folder collaboration page. Formats the link so that the child window -- libgit2 0.21.4