diff mercurial/templates/paper/map @ 32758:cba4461aa0a0

hgweb: consolidate search form for paper AFAICT this was mostly a bunch of copy pasta. The only variation is some pages defined a "value" attribute. The "query" variable will just be empty on pages that don't accept it. So let's consolidate the template and remove the redundancy.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 09 Jun 2017 13:59:13 -0700
parents 266c2195651e
children 32331f54930c
line wrap: on
line diff
--- a/mercurial/templates/paper/map	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/map	Fri Jun 09 13:59:13 2017 -0700
@@ -243,5 +243,11 @@
 hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
 breadcrumb = '&gt; <a href="{url|urlescape}">{name|escape}</a> '
 
+searchform = '
+  <form class="search" action="{url|urlescape}log">
+    {sessionvars%hiddenformentry}
+    <p><input name="rev" id="search1" type="text" size="30" value="{query|escape}" /></p>
+    <div id="hint">{searchhint}</div>
+  </form>'
 searchhint = 'Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="{url|urlescape}help/revsets">revset expression</a>.'