From 00253e4954f12ac0894d466ec8096ce9b3de357a Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Thu, 22 May 2003 10:20:04 +0000 Subject: [PATCH] fixed candy striping --- presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc index a2e2183..6f64fd9 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc @@ -190,14 +190,15 @@ function renderDocumentTypeResults($aResults) { function renderFolderResults($aResults) { global $default; $sToRender = ""; - + // now loop through the rest of the folders and display links if (count($aResults["folders"]) > 1) { for ($i=1; $igetCreatorID()); - $sToRender .= ""; + // the first element of the array contains the current folder name + $sToRender .= ""; // folder name $sToRender .= "" . $sFolderLink . ""; // blank filename (??: folder description?) @@ -272,11 +273,13 @@ function renderSortHeadings($sSortBy, $sSortDirection) { * @param boolean whether to display the complete path to the document or not */ function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessage, $bDisplayFullPath = false) { + $iFolderCount = count($aResults["folders"]) - 1; // loop through the files and display links if (count($aResults["documents"]) > 0) { for ($i=0; $i" . displayDocumentLink($aResults["documents"][$i], $bDisplayFullPath) . ""; - //$sToRender .= ""; + // in order for candy striping to work we need to take the number of folders + // into account when alternating + $sToRender .= "" . displayDocumentLink($aResults["documents"][$i], $bDisplayFullPath) . ""; $sToRender .= "" . $aResults["documents"][$i]->getFileName() . ""; $oCreator = User::get($aResults["documents"][$i]->getCreatorID()); $sToRender .= "" . $oCreator->getName() . ""; -- libgit2 0.21.4