avoid showing redundant search box on search results page
authorJoey Hess <joey@kitenet.net>
Sat, 15 May 2010 01:42:48 +0000 (21:42 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 15 May 2010 01:42:48 +0000 (21:42 -0400)
IkiWiki/Plugin/search.pm
templates/page.tmpl

index cc26b7ac18df88d8c336fbe4b1b3f709d3fe696f..a9089620b7511948dcc5fd35e4a04c4f7245a31b 100644 (file)
@@ -228,7 +228,8 @@ sub setupfiles () {
                
                # Avoid omega interpreting anything in the misctemplate
                # as an omegascript command.
-               my $misctemplate=IkiWiki::misctemplate(gettext("search"), "\0");
+               my $misctemplate=IkiWiki::misctemplate(gettext("search"), "\0",
+                       searching => 1);
                eval q{use HTML::Entities};
                error $@ if $@;
                $misctemplate=encode_entities($misctemplate, '\$');
index f7944e40ee1ae327afdd73605f2680a27ce9e1b9..a7d200466fd2a2280aabeca3065bcf8a7094429e 100644 (file)
 </TMPL_IF>
 </span>
 </span>
+<TMPL_UNLESS SEARCHING>
 <TMPL_IF SEARCHFORM>
 <TMPL_VAR SEARCHFORM>
 </TMPL_IF>
+</TMPL_UNLESS>
 <TMPL_IF HTML5></header><TMPL_ELSE></div></TMPL_IF>
 
 <TMPL_IF HAVE_ACTIONS>