Mercurial > hg > mercurial-source
changeset 33544:cb5123eff7d1
hgweb: consistently add search form to all gitweb pages
Paper has it on all pages. Not sure why gitweb doesn't. I think it
should be everywhere because it is a useful feature.
Also, we weren't consistently adding the HTML in the same place. This
was OK since the element is absolutely positioned. But this bothered
me a bit, so I went ahead and fixed it.
line wrap: on
line diff
--- a/mercurial/templates/gitweb/bookmarks.tmpl +++ b/mercurial/templates/gitweb/bookmarks.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / bookmarks +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/branches.tmpl +++ b/mercurial/templates/gitweb/branches.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / branches +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/changelog.tmpl +++ b/mercurial/templates/gitweb/changelog.tmpl @@ -10,10 +10,9 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / changelog +{searchform} </div> -{searchform} - <div class="page_nav"> <a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a> | <a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">shortlog</a> |
--- a/mercurial/templates/gitweb/changeset.tmpl +++ b/mercurial/templates/gitweb/changeset.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / changeset +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/error.tmpl +++ b/mercurial/templates/gitweb/error.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / error +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/fileannotate.tmpl +++ b/mercurial/templates/gitweb/fileannotate.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / annotate +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/filecomparison.tmpl +++ b/mercurial/templates/gitweb/filecomparison.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / comparison +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/filediff.tmpl +++ b/mercurial/templates/gitweb/filediff.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / diff +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/filelog.tmpl +++ b/mercurial/templates/gitweb/filelog.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / file revisions +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/filerevision.tmpl +++ b/mercurial/templates/gitweb/filerevision.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / file revision +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/graph.tmpl +++ b/mercurial/templates/gitweb/graph.tmpl @@ -11,10 +11,9 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / graph +{searchform} </div> -{searchform} - <div class="page_nav"> <a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a> | <a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">shortlog</a> |
--- a/mercurial/templates/gitweb/help.tmpl +++ b/mercurial/templates/gitweb/help.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / help +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/helptopics.tmpl +++ b/mercurial/templates/gitweb/helptopics.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / help +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/manifest.tmpl +++ b/mercurial/templates/gitweb/manifest.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / files +{searchform} </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/search.tmpl +++ b/mercurial/templates/gitweb/search.tmpl @@ -10,9 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / search - {searchform} - </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/shortlog.tmpl +++ b/mercurial/templates/gitweb/shortlog.tmpl @@ -10,10 +10,9 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / shortlog +{searchform} </div> -{searchform} - <div class="page_nav"> <a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a> | shortlog |
--- a/mercurial/templates/gitweb/summary.tmpl +++ b/mercurial/templates/gitweb/summary.tmpl @@ -10,9 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / summary - {searchform} - </div> <div class="page_nav">
--- a/mercurial/templates/gitweb/tags.tmpl +++ b/mercurial/templates/gitweb/tags.tmpl @@ -10,6 +10,7 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / tags +{searchform} </div> <div class="page_nav">
--- a/tests/test-hgweb-commands.t +++ b/tests/test-hgweb-commands.t @@ -1534,14 +1534,12 @@ <a href="https://mercurial-scm.org/" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> / summary - <form action="/log"> <input type="hidden" name="style" value="gitweb" /> <div class="search"> <input type="text" name="rev" value="" /> </div> </form> - </div> <div class="page_nav"> @@ -1735,8 +1733,6 @@ <div class="page_header"> <a href="https://mercurial-scm.org/" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> / graph - </div> - <form action="/log"> <input type="hidden" name="style" value="gitweb" /> @@ -1744,6 +1740,7 @@ <input type="text" name="rev" value="" /> </div> </form> + </div> <div class="page_nav"> <a href="/summary?style=gitweb">summary</a> |
--- a/tests/test-hgweb-descend-empties.t +++ b/tests/test-hgweb-descend-empties.t @@ -405,6 +405,13 @@ <div class="page_header"> <a href="https://mercurial-scm.org/" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> / files + + <form action="/log"> + <input type="hidden" name="style" value="gitweb" /> + <div class="search"> + <input type="text" name="rev" value="" /> + </div> + </form> </div> <div class="page_nav">