sapling/mercurial/templates/spartan/search.tmpl
Anton Shestakov ad43ca849f hgweb: don't point file links at tip hash where it doesn't make sense
Some pages, e.g. bookmarks, help and summary don't have a meaningful revision
context: they always either show information about tip or about the whole repo
(and not about any specific changeset). And error pages can just show hgweb
error messages, not related to any repo or changeset.

Having a hash in the links worked (even when '{node|short}' resolved to an
empty string on error pages), but seeing pages without revision context provide
links with hashes is a bit confusing (unless you keep current tip hash in your
head at all times) and not consistent with other template styles and other
links on the same page: they don't have a hash.

Let's just link to '/file', which is equal to '/file/tip'.
2015-06-12 18:34:10 +08:00

38 lines
931 B
Cheetah

{header}
<title>{repo|escape}: searching for {query|escape}</title>
</head>
<body>
<div class="buttons">
<a href="{url|urlescape}log{sessionvars%urlparameter}">changelog</a>
<a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a>
<a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a>
<a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a>
<a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a>
<a href="{url|urlescape}file{sessionvars%urlparameter}">files</a>
{archives%archiveentry}
<a href="{url|urlescape}help{sessionvars%urlparameter}">help</a>
</div>
<h2>searching for {query|escape}</h2>
<form>
{sessionvars%hiddenformentry}
<p>
search:
<input name="rev" type="text" width="30" value="{query|escape}">
</p>
</form>
{entries}
<form>
{sessionvars%hiddenformentry}
<p>
search:
<input name="rev" type="text" width="30" value="{query|escape}">
</p>
</form>
{footer}