Commit bc01295a584042d8c33249b7d7088788292cbb45

Authored by nbm
1 parent 09924229

Use the browser columns method to determine table width for table-wide

announcements.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3081 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc
@@ -91,6 +91,7 @@ function displayCategoryLink($sCategoryName) { @@ -91,6 +91,7 @@ function displayCategoryLink($sCategoryName) {
91 * @param array the category browse results 91 * @param array the category browse results
92 */ 92 */
93 function renderCategoryResults($aResults) { 93 function renderCategoryResults($aResults) {
  94 + global $oBrowser;
94 $sToRender = ""; 95 $sToRender = "";
95 96
96 //var_dump($aResults["categories"][0]); 97 //var_dump($aResults["categories"][0]);
@@ -119,7 +120,7 @@ function renderCategoryResults($aResults) { @@ -119,7 +120,7 @@ function renderCategoryResults($aResults) {
119 // else the first entry is the category name, so display the documents in the category 120 // else the first entry is the category name, so display the documents in the category
120 $sToRender .= renderDocumentList($aResults, _("This category contains no documents"), _("You don't have access to the documents in this category")); 121 $sToRender .= renderDocumentList($aResults, _("This category contains no documents"), _("You don't have access to the documents in this category"));
121 } else { 122 } else {
122 - $sToRender .= "<tr><td colspan=\"5\"><font color=\"red\">" . _("There is no Category Document Field- contact a System Administrator.") . "</font></td></tr>"; 123 + $sToRender .= "<tr><td colspan=\"" . ($oBrowser->columns() + 1) . "\"><font color=\"red\">" . _("There is no Category Document Field- contact a System Administrator.") . "</font></td></tr>";
123 } 124 }
124 } 125 }
125 return $sToRender; 126 return $sToRender;
@@ -220,7 +221,7 @@ function renderFolderResults($aResults, $bTemplateBrowsing = false) { @@ -220,7 +221,7 @@ function renderFolderResults($aResults, $bTemplateBrowsing = false) {
220 $sToRender .= "</tr>\n"; 221 $sToRender .= "</tr>\n";
221 } 222 }
222 } else { 223 } else {
223 - $sToRender .= "<tr><td colspan=\"5\">" . _("This folder contains no sub folders") . "</td></tr>"; 224 + $sToRender .= "<tr><td colspan=\"" . ($oBrowser->columns() + 1) . "\">" . _("This folder contains no sub folders") . "</td></tr>";
224 } 225 }
225 226
226 $sToRender .= renderDocumentList($aResults, _("This folder contains no documents"), 227 $sToRender .= renderDocumentList($aResults, _("This folder contains no documents"),
@@ -327,10 +328,10 @@ function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessa @@ -327,10 +328,10 @@ function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessa
327 $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); 328 $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
328 $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); 329 $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
329 330
330 - $sToRender .= "<tr bgcolor=\"". $sTDBGColour . "\"><td colspan=\"5\" valign=\"bottom\">" . 331 + $sToRender .= "<tr bgcolor=\"". $sTDBGColour . "\"><td colspan=\"" . ($oBrowser->columns() + 1) . "\" valign=\"bottom\">" .
331 "<input type=\"checkbox\" name=\"selectall\" onClick=\"selectAll()\"/> " . _("Select all documents") . "</td></tr>"; 332 "<input type=\"checkbox\" name=\"selectall\" onClick=\"selectAll()\"/> " . _("Select all documents") . "</td></tr>";
332 333
333 - $sToRender .= "<tr><td colspan=\"5\" >"; 334 + $sToRender .= "<tr><td colspan=\"" . ($oBrowser->columns() + 1) . "\" >";
334 $sToRender .= "<input type=\"hidden\" name=\"fActions\">"; 335 $sToRender .= "<input type=\"hidden\" name=\"fActions\">";
335 336
336 $sToRender .= "<input type=\"image\" onclick=\"document.MainForm.fActions.value='move'; document.MainForm.submit()\" src=\"" . KTHtml::getMoveButton() . "\" border=\"0\"/>"; 337 $sToRender .= "<input type=\"image\" onclick=\"document.MainForm.fActions.value='move'; document.MainForm.submit()\" src=\"" . KTHtml::getMoveButton() . "\" border=\"0\"/>";
@@ -340,9 +341,9 @@ function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessa @@ -340,9 +341,9 @@ function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessa
340 341
341 342
342 } else if ($aResults["accessDenied"]) { 343 } else if ($aResults["accessDenied"]) {
343 - $sToRender .= "<tr><td colspan=\"5\">$sNoPermissionMessage</td></tr>"; 344 + $sToRender .= "<tr><td colspan=\"" . ($oBrowser->columns() + 1) . "\">$sNoPermissionMessage</td></tr>";
344 } else { 345 } else {
345 - $sToRender .= "<tr><td colspan=\"5\">$sNoDocumentsMessage</td></tr>"; 346 + $sToRender .= "<tr><td colspan=\"" . ($oBrowser->columns() + 1) . "\">$sNoDocumentsMessage</td></tr>";
346 } 347 }
347 return $sToRender; 348 return $sToRender;
348 } 349 }