diff --git a/presentation/lookAndFeel/knowledgeTree/dashboardBL.php b/presentation/lookAndFeel/knowledgeTree/dashboardBL.php
index 1f0073b..2f11f9f 100644
--- a/presentation/lookAndFeel/knowledgeTree/dashboardBL.php
+++ b/presentation/lookAndFeel/knowledgeTree/dashboardBL.php
@@ -50,8 +50,11 @@ if (checkSession()) {
// retrieve pending web documents
$aPendingWebDocuments = $oDashboard->getPendingWebDocuments();
+ //retrive dependant documents
+ $aDependantDocuments = $oDashboard->getDependantDocuments();
+
// generate the html
- $oContent->setHtml(renderPage($aPendingDocumentList, $aCheckedOutDocumentList, $aSubscriptionAlertList, $aQuickLinks, $aPendingWebDocuments));
+ $oContent->setHtml(renderPage($aPendingDocumentList, $aCheckedOutDocumentList, $aSubscriptionAlertList, $aQuickLinks, $aPendingWebDocuments, $aDependantDocuments));
// display
$main->setCentralPayload($oContent);
diff --git a/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc b/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc
index 3cd0a22..45b7719 100644
--- a/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc
+++ b/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc
@@ -103,6 +103,45 @@ function renderCheckedOutDocuments($aCheckedOutDocumentList) {
return $sToRender;
}
+function renderDependantDocuments($aDependantDocumentList) {
+ global $default;
+ if (count($aCheckedOutDocumentList) > 0) {
+ $sBgColor = "#9D9D7F";
+ } else {
+ $sBgColor = "#CECEBF";
+ }
+ $sToRender = "\t\t\t
\n";
+ $sToRender .= "\t\t\t\t| Dependant Documents | \n";
+ $sToRender .= "\t\t\t
\n";
+
+ if (count($aDependantDocumentList) > 0) {
+ $sToRender .= "\t\t\t\n";
+ $sToRender .= "\t\t\t\t| ";
+ $sToRender .= "Title";
+ $sToRender .= " | \n";
+ $sToRender .= "\t\t\t\t";
+ $sToRender .= "Template document";
+ $sToRender .= "\t\t\t\t | \n";
+ $sToRender .= "\t\t\t
\n";
+ }
+
+ for ($i = 0; $i < count($aDependantDocumentList); $i++) {
+ $oDependantDocument = $aDependantDocumentList[$i];
+ $oTemplateDocument = Document::get($oDependantDocument->getTemplateDocumentID());
+
+ $sToRender .= "\t\t\t\n";
+ $sToRender .= "\t\t\t\t| " . $oDependantDocument->getDocumentTitle() . " | ";
+ if (!($oTemplateDocument === false)) {
+ $sToRender .= "" . generateControllerLink("viewDocument", "fDocumentID=" . $oTemplateDocument->getID(), " graphicsUrl/widgets/dstatus.gif\" border=\"0\"/> " . $oTemplateDocument->getName()) . " | \n";
+ } else {
+ $sToRender .= "No template specified | \n";
+ }
+ $sToRender .= "\t\t\t
\n";
+ }
+ return $sToRender;
+
+}
+
/**
* Displays the subscription alerts
*
@@ -179,7 +218,7 @@ function renderDashboardNews() {
* @param array checked out documents for this user
* @param array subscription alerts for this user
*/
-function renderPage($aPendingDocumentList, $aCheckedOutDocumentList, $aSubscriptionAlertList, $aQuickLinks, $aWebDocuments) {
+function renderPage($aPendingDocumentList, $aCheckedOutDocumentList, $aSubscriptionAlertList, $aQuickLinks, $aWebDocuments, $aDependantDocuments) {
global $default;
$sToRender = "\n";
@@ -205,6 +244,7 @@ function renderPage($aPendingDocumentList, $aCheckedOutDocumentList, $aSubscript
$sToRender .= renderPendingCollaborationDocuments($aPendingDocumentList);
$sToRender .= renderCheckedOutDocuments($aCheckedOutDocumentList) . "\n";
$sToRender .= renderSubscriptionAlerts($aSubscriptionAlertList) . "\n";
+ $sToRender .= renderDependantDocuments($aDependantDocuments) . "\n";
$sToRender .= "\t\t\t
\n";
$sToRender .= "\t\t\n";
@@ -214,6 +254,7 @@ function renderPage($aPendingDocumentList, $aCheckedOutDocumentList, $aSubscript
$sToRender .= renderQuickLinks($aQuickLinks);
$sToRender .= "\t\t\t\n";
+
$sToRender .= "\t\t\n";
$sToRender .= "\t\n";
$sToRender .= "\n";