[PATCH 6 of 6] gitweb: Fixed-up search template

Josef 'Jeff' Sipek jeffpc at josefsipek.net
Fri Jun 1 00:36:03 UTC 2007


2 files changed, 22 insertions(+), 16 deletions(-)
mercurial/hgweb/hgweb_mod.py |    3 ++-
templates/gitweb/search.tmpl |   35 ++++++++++++++++++++---------------


# HG changeset patch
# User Josef "Jeff" Sipek <jeffpc at josefsipek.net>
# Date 1180656760 14400
# Node ID 8af65bc092b09d435f1eb70a761b20f30a7d9fc2
# Parent  d189b19936ecc6f52f75fd5d5fe0331df09375b7
gitweb: Fixed-up search template

It seems that the search template has been forgoten over time, and needed
major revamping.

diff -r d189b19936ec -r 8af65bc092b0 mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Thu May 31 19:59:02 2007 -0400
+++ b/mercurial/hgweb/hgweb_mod.py	Thu May 31 20:12:40 2007 -0400
@@ -285,7 +285,8 @@ class hgweb(object):
         yield self.t('search',
                      query=query,
                      node=hex(cl.tip()),
-                     entries=changelist)
+                     entries=changelist,
+                     archives=self.archivelist("tip"))
 
     def changeset(self, ctx):
         n = ctx.node()
diff -r d189b19936ec -r 8af65bc092b0 templates/gitweb/search.tmpl
--- a/templates/gitweb/search.tmpl	Thu May 31 19:59:02 2007 -0400
+++ b/templates/gitweb/search.tmpl	Thu May 31 20:12:40 2007 -0400
@@ -1,27 +1,32 @@
 #header#
+<title>#repo|escape#: Search</title>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for #repo|escape#">
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="{url}summary{sessionvars%urlparameter}">#repo|escape#</a> / search
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev" value="#query|escape#" />
+</div>
+</form>
+</div>
+
 <div class="page_nav">
 <a href="{url}summary{sessionvars%urlparameter}">summary</a> |
 <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
 <a href="{url}log{sessionvars%urlparameter}">changelog</a> |
 <a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a><br/>
+<a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a>#archives%archiveentry#
+<br/>
 </div>
 
-<h2>searching for #query|escape#</h2>
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-search:
-<input name="rev" type="text" width="30" value="#query|escape#">
-</form>
+<div class="title">searching for #query|escape#</div>
 
 #entries#
 
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-search:
-<input type="hidden" name="style" value="gitweb">
-<input name="rev" type="text" width="30">
-</form>
-
 #footer#


More information about the Mercurial-devel mailing list