Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/hgweb_mod.py @ 13964:616ad3f6fd33
hgweb: support alternate logo url
Clicking on the logo image/text in the hgweb interface brings the
user to the Mercurial project page. The majority of users expect that
this would bring them to the top level index. I have added a new template
variable named `logourl' which allows an administrator to change this
behavior. To stay compatible with existing behavior, `logourl' will
default to http://mercurial.selenic.com/. This change is very useful in
large installations where jumping to the index is common.
author | Steven Stallion <sstallion@gmail.com> |
---|---|
date | Tue, 19 Apr 2011 23:37:06 -0400 |
parents | 141f88ae5276 |
children | a1c31c64bcd3 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Tue Apr 19 12:42:53 2011 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Tue Apr 19 23:37:06 2011 -0400 @@ -233,6 +233,7 @@ port = req.env["SERVER_PORT"] port = port != default_port and (":" + port) or "" urlbase = '%s://%s%s' % (proto, req.env['SERVER_NAME'], port) + logourl = self.config("web", "logourl", "http://mercurial.selenic.com/") staticurl = self.config("web", "staticurl") or req.url + 'static/' if not staticurl.endswith('/'): staticurl += '/' @@ -272,6 +273,7 @@ tmpl = templater.templater(mapfile, defaults={"url": req.url, + "logourl": logourl, "staticurl": staticurl, "urlbase": urlbase, "repo": self.reponame,