diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseBL.php b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseBL.php
index 96ce88f..7194527 100644
--- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseBL.php
+++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseBL.php
@@ -4,6 +4,7 @@ require_once("../../../../config/dmsDefaults.php");
require_once("$default->fileSystemRoot/lib/browse/BrowserFactory.inc");
require_once("$default->fileSystemRoot/lib/browse/Browser.inc");
require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentType.inc");
+require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTransaction.inc");
require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc");
require_once("$default->uiDirectory/documentmanagement/browseUI.inc");
require_once("$default->fileSystemRoot/presentation/Html.inc");
diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc
index 727096c..186a289 100644
--- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc
+++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc
@@ -17,16 +17,6 @@ require_once("$default->uiDirectory/foldermanagement/addFolderUI.inc");
* @package presentation.lookAndFeel.knowledgeTree.documentmanagement
*/
-/*function renderHeading($sHeading) {
- global $default;
- $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
- $sColor = $default->siteMap->getSectionColour($sSectionName, "th");
- $sToRender = "
\n";
- $sToRender .= "| $sHeading |
\n";
- $sToRender .= "
\n";
- return $sToRender;
-}*/
-
/**
* Generates radio button selects for document browse by type
* Javascript refreshes the form when it changes
@@ -95,20 +85,20 @@ function renderCategoryResults($aResults) {
// category name
$sToRender .= "" . displayCategoryLink($aResults["categories"][$i]) . " | ";
// blank filename
- $sToRender .= " | ";
+ $sToRender .= " | ";
// creator name
- $sToRender .= " | ";
+ $sToRender .= " | ";
// modified date
- $sToRender .= " | ";
+ $sToRender .= " | ";
// document type
- $sToRender .= " | ";
+ $sToRender .= " | ";
$sToRender .= "\n";
}
} else {
// else the first entry is the category name, so display the documents in the category
// with full paths
- $sToRender .= renderDocumentList($aResults, "This category contains no documents", "You don't have access to the documents in this category", true);
+ $sToRender .= renderDocumentList($aResults, "This category contains no documents", "You don't have access to the documents in this category");
}
return $sToRender;
}
@@ -160,19 +150,19 @@ function renderDocumentTypeResults($aResults) {
// document type name
$sToRender .= "" . displayDocumentTypeLink($aResults["documentTypes"][$i]) . " | ";
// blank filename
- $sToRender .= " | ";
+ $sToRender .= " | ";
// creator name
- $sToRender .= " | ";
+ $sToRender .= " | ";
// modified date
- $sToRender .= " | ";
+ $sToRender .= " | ";
// document type
- $sToRender .= " | ";
+ $sToRender .= " | ";
$sToRender .= "\n";
}
} else {
// else the first entry is the document type name, so display the documents in the document type
// with full paths
- $sToRender .= renderDocumentList($aResults, "This document type contains no documents", "You don't have access to the documents in this document type", true);
+ $sToRender .= renderDocumentList($aResults, "This document type contains no documents", "You don't have access to the documents in this document type");
}
return $sToRender;
}
@@ -200,13 +190,13 @@ function renderFolderResults($aResults) {
// folder name
$sToRender .= "" . $sFolderLink . " | ";
// blank filename (??: folder description?)
- $sToRender .= " | ";
+ $sToRender .= " | ";
// creator name
- $sToRender .= "" . $oCreator->getName() . " | ";
+ $sToRender .= "" . ($oCreator ? $oCreator->getName() : " ") . " | ";
// modified date (TODO: add to db)
- $sToRender .= " | ";
+ $sToRender .= " | ";
// document type (??: display one of the mapped document types?)
- $sToRender .= " | ";
+ $sToRender .= " | ";
$sToRender .= "\n";
}
} else {
@@ -271,6 +261,8 @@ function renderSortHeadings($sSortBy, $sSortDirection) {
* @param boolean whether to display the complete path to the document or not
*/
function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessage, $bDisplayFullPath = false) {
+ global $default;
+
$iFolderCount = count($aResults["folders"]) - 1;
// loop through the files and display links
if (count($aResults["documents"]) > 0) {
@@ -280,8 +272,9 @@ function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessa
$sToRender .= "| " . displayDocumentLink($aResults["documents"][$i], $bDisplayFullPath) . " | ";
$sToRender .= "" . $aResults["documents"][$i]->getFileName() . " | ";
$oCreator = User::get($aResults["documents"][$i]->getCreatorID());
- $sToRender .= "" . $oCreator->getName() . " | ";
- $sToRender .= "" . $aResults["documents"][$i]->getLastModifiedDate() . " | ";
+ $sToRender .= "" . ($oCreator ? $oCreator->getName() : "") . " | ";
+ $aDocumentTransaction = DocumentTransaction::getList("transaction_id=1 AND document_id=" . $aResults["documents"][$i]->getID());
+ $sToRender .= "" . $aDocumentTransaction[0]->dDateTime . " | ";
$oDocumentType = DocumentType::get($aResults["documents"][$i]->getDocumentTypeID());
if ($oDocumentType) {
$sToRender .= "" . $oDocumentType->getName() . " | ";