From 272584cb37236a77d712ecaf8171b77401b6e11b Mon Sep 17 00:00:00 2001 From: rob Date: Wed, 26 Feb 2003 12:32:15 +0000 Subject: [PATCH] Search bar is now hidden if you are browsing search results --- lib/visualpatterns/NavBar.inc | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/lib/visualpatterns/NavBar.inc b/lib/visualpatterns/NavBar.inc index 2873515..f477d40 100644 --- a/lib/visualpatterns/NavBar.inc +++ b/lib/visualpatterns/NavBar.inc @@ -30,6 +30,7 @@ class NavBar { var $help; var $logout; var $nwColourbar; + var $sSection; /** variables used for searching */ var $sBrowseType; @@ -78,6 +79,7 @@ class NavBar { */ function setHighlightedSection($section) { global $default; + $this->sSection = $section; // check for highlighting..and highlight as required if($section == "General") { @@ -94,8 +96,8 @@ class NavBar { $this->subscriptions = "$default->graphicsUrl/subscriptions/over.gif"; $this->nwColourBar = "$default->graphicsUrl/subscriptions/def.gif"; } - - if($section == "Advanced Search") { + + if(($section == "Standard Search") || ($section == "Advanced Search")) { $this->asearch = "$default->graphicsUrl/asearch/over.gif"; $this->nwColourBar = "$default->graphicsUrl/asearch/def.gif"; } @@ -121,6 +123,7 @@ class NavBar { $this->logout = "$default->graphicsUrl/logout/over.gif"; $this->nwColourBar = "$default->graphicsUrl/logout/def.gif"; } + } @@ -199,7 +202,7 @@ class NavBar { //array of coloured section images $row4 = $oColourTableLinks->render(); - $toRender = new PatternCustom; + $toRender = new PatternCustom; //bar is the actaul html creation of the nav bar $bar= " @@ -208,19 +211,24 @@ class NavBar { " \n " . "graphicsUrl/arrow.gif\" >\n " . "graphicsUrl/arrow.gif\" >\n " . - "\n " . - "\n " . - "sBrowseType . "\" />\n " . - "iFolderID . "\" />\n " . - "iDocumentID . "\" />\n " . - "sCategoryName . "\" />\n " . - "iDocTypeID . "\" />\n " . - "rootUrl . "/control.php')\" src=\"$default->graphicsUrl/search.gif\" align = \"absmiddle\" border=\"0\" />\n " . - "\n " . - "\n" . - "". $row3 . "\n" . - "". $row4 . "\n" . - "\n"; + "\n "; + //disable the search bar if we are browsing search results + if (strcmp($this->sSection,"Standard Search") == 0) { + $bar .= "\n "; + } else { + $bar .= "\n " . + "sBrowseType . "\" />\n " . + "iFolderID . "\" />\n " . + "iDocumentID . "\" />\n " . + "sCategoryName . "\" />\n " . + "iDocTypeID . "\" />\n " . + "rootUrl . "/control.php')\" src=\"$default->graphicsUrl/search.gif\" align = \"absmiddle\" border=\"0\" />\n "; + } + $bar .= "\n " . + "\n" . + "". $row3 . "\n" . + "". $row4 . "\n" . + "\n"; //set the bar as html to object $toRender->setHtml($bar); -- libgit2 0.21.4