Commit c9a4da98deb87152df5701c83faa9317edf88211
1 parent
27b3f2a2
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
Showing
1 changed file
with
7 additions
and
6 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc
| ... | ... | @@ -91,6 +91,7 @@ function displayCategoryLink($sCategoryName) { |
| 91 | 91 | * @param array the category browse results |
| 92 | 92 | */ |
| 93 | 93 | function renderCategoryResults($aResults) { |
| 94 | + global $oBrowser; | |
| 94 | 95 | $sToRender = ""; |
| 95 | 96 | |
| 96 | 97 | //var_dump($aResults["categories"][0]); |
| ... | ... | @@ -119,7 +120,7 @@ function renderCategoryResults($aResults) { |
| 119 | 120 | // else the first entry is the category name, so display the documents in the category |
| 120 | 121 | $sToRender .= renderDocumentList($aResults, _("This category contains no documents"), _("You don't have access to the documents in this category")); |
| 121 | 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 | 126 | return $sToRender; |
| ... | ... | @@ -220,7 +221,7 @@ function renderFolderResults($aResults, $bTemplateBrowsing = false) { |
| 220 | 221 | $sToRender .= "</tr>\n"; |
| 221 | 222 | } |
| 222 | 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 | 227 | $sToRender .= renderDocumentList($aResults, _("This folder contains no documents"), |
| ... | ... | @@ -327,10 +328,10 @@ function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessa |
| 327 | 328 | $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); |
| 328 | 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 | 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 | 335 | $sToRender .= "<input type=\"hidden\" name=\"fActions\">"; |
| 335 | 336 | |
| 336 | 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 | 341 | |
| 341 | 342 | |
| 342 | 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 | 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 | 348 | return $sToRender; |
| 348 | 349 | } | ... | ... |