Commit e6e7c4c966221221426904ea5557fe1957892003

Authored by Michael Joseph
1 parent 02d7adac

added appropriate no documents message


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1365 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc
@@ -74,7 +74,7 @@ function renderCategoryResults($aResults) { @@ -74,7 +74,7 @@ function renderCategoryResults($aResults) {
74 } else { 74 } else {
75 // else the first entry is the category name, so display the documents in the category 75 // else the first entry is the category name, so display the documents in the category
76 // with full paths 76 // with full paths
77 - $sToRender .= renderDocumentList($aResults["documents"], true); 77 + $sToRender .= renderDocumentList($aResults["documents"], "This category contains no documents", true);
78 } 78 }
79 return $sToRender; 79 return $sToRender;
80 } 80 }
@@ -120,7 +120,7 @@ function renderDocumentTypeResults($aResults) { @@ -120,7 +120,7 @@ function renderDocumentTypeResults($aResults) {
120 } else { 120 } else {
121 // else the first entry is the document type name, so display the documents in the document type 121 // else the first entry is the document type name, so display the documents in the document type
122 // with full paths 122 // with full paths
123 - $sToRender .= renderDocumentList($aResults["documents"], true); 123 + $sToRender .= renderDocumentList($aResults["documents"], "This document type contains no documents", true);
124 } 124 }
125 return $sToRender; 125 return $sToRender;
126 } 126 }
@@ -140,19 +140,19 @@ function renderFolderResults($aResults) { @@ -140,19 +140,19 @@ function renderFolderResults($aResults) {
140 } 140 }
141 141
142 $sToRender .= "<tr><td>&nbsp;</td></tr>"; 142 $sToRender .= "<tr><td>&nbsp;</td></tr>";
143 - $sToRender .= "<tr><td>" . renderDocumentList($aResults["documents"]) . "</td></tr>\n"; 143 + $sToRender .= "<tr><td>" . renderDocumentList($aResults["documents"], "This folder contains no documents") . "</td></tr>\n";
144 144
145 return $sToRender; 145 return $sToRender;
146 } 146 }
147 147
148 -function renderDocumentList($aDocuments, $bDisplayFullPath = false) { 148 +function renderDocumentList($aDocuments, $sNoDocumentsMessage, $bDisplayFullPath = false) {
149 // loop through the files and display links 149 // loop through the files and display links
150 if (count($aDocuments) > 0) { 150 if (count($aDocuments) > 0) {
151 for ($i=0; $i<count($aDocuments); $i++) { 151 for ($i=0; $i<count($aDocuments); $i++) {
152 $sToRender .= "<tr><td bgcolor=\"" . getColour($i) . "\">" . displayDocumentLink($aDocuments[$i], $bDisplayFullPath) . "</td></tr>"; 152 $sToRender .= "<tr><td bgcolor=\"" . getColour($i) . "\">" . displayDocumentLink($aDocuments[$i], $bDisplayFullPath) . "</td></tr>";
153 } 153 }
154 } else { 154 } else {
155 - $sToRender .= "<tr><td>This folder contains no documents</td></tr>"; 155 + $sToRender .= "<tr><td>$sNoDocumentsMessage</td></tr>";
156 } 156 }
157 return $sToRender; 157 return $sToRender;
158 } 158 }