Mercurial > hg > mercurial-source
changeset 33542:265196cd7d7f
hgweb: consolidate search form for monoblue
Same deal as for paper.
line wrap: on
line diff
--- a/mercurial/templates/monoblue/bookmarks.tmpl +++ b/mercurial/templates/monoblue/bookmarks.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / bookmarks</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/branches.tmpl +++ b/mercurial/templates/monoblue/branches.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / branches</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/changelog.tmpl +++ b/mercurial/templates/monoblue/changelog.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / changelog</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/changeset.tmpl +++ b/mercurial/templates/monoblue/changeset.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / changeset</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/error.tmpl +++ b/mercurial/templates/monoblue/error.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / not found: {repo|escape}</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/fileannotate.tmpl +++ b/mercurial/templates/monoblue/fileannotate.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / annotate</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/filecomparison.tmpl +++ b/mercurial/templates/monoblue/filecomparison.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / file comparison</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/filediff.tmpl +++ b/mercurial/templates/monoblue/filediff.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / file diff</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/filelog.tmpl +++ b/mercurial/templates/monoblue/filelog.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / file revisions</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/filerevision.tmpl +++ b/mercurial/templates/monoblue/filerevision.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / file revision</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/graph.tmpl +++ b/mercurial/templates/monoblue/graph.tmpl @@ -10,13 +10,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / graph</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/help.tmpl +++ b/mercurial/templates/monoblue/help.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / help</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/helptopics.tmpl +++ b/mercurial/templates/monoblue/helptopics.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / help</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/manifest.tmpl +++ b/mercurial/templates/monoblue/manifest.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / files</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/map +++ b/mercurial/templates/monoblue/map @@ -279,3 +279,12 @@ hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />' graph = graph.tmpl breadcrumb = '> <a href="{url|urlescape}">{name|escape}</a> ' + +searchform = ' + <form action="{url|urlescape}log"> + {sessionvars%hiddenformentry} + <dl class="search"> + <dt><label>Search: </label></dt> + <dd><input type="text" name="rev" value="{query|escape}" /></dd> + </dl> + </form>'
--- a/mercurial/templates/monoblue/notfound.tmpl +++ b/mercurial/templates/monoblue/notfound.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / not found: {repo|escape}</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/search.tmpl +++ b/mercurial/templates/monoblue/search.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / search</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" value="{query|escape}" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/shortlog.tmpl +++ b/mercurial/templates/monoblue/shortlog.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / shortlog</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/mercurial/templates/monoblue/summary.tmpl +++ b/mercurial/templates/monoblue/summary.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / summary</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li class="current">summary</li>
--- a/mercurial/templates/monoblue/tags.tmpl +++ b/mercurial/templates/monoblue/tags.tmpl @@ -9,13 +9,7 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / tags</h1> - <form action="{url|urlescape}log"> - {sessionvars%hiddenformentry} - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + {searchform} <ul class="page-nav"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
--- a/tests/test-hgweb-descend-empties.t +++ b/tests/test-hgweb-descend-empties.t @@ -289,13 +289,14 @@ <div class="page-header"> <h1 class="breadcrumb"><a href="/">Mercurial</a> / files</h1> - <form action="/log"> - <input type="hidden" name="style" value="monoblue" /> - <dl class="search"> - <dt><label>Search: </label></dt> - <dd><input type="text" name="rev" /></dd> - </dl> - </form> + + <form action="/log"> + <input type="hidden" name="style" value="monoblue" /> + <dl class="search"> + <dt><label>Search: </label></dt> + <dd><input type="text" name="rev" value="" /></dd> + </dl> + </form> <ul class="page-nav"> <li><a href="/summary?style=monoblue">summary</a></li>