gitweb: add "more" and "less" navigation links in filelog template
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 22 Feb 2017 12:09:17 +0100
changeset 31094 0f39055c9be5
parent 31093 0e07855e6054
child 31095 a113284f54a0
gitweb: add "more" and "less" navigation links in filelog template
mercurial/templates/gitweb/filelog.tmpl
tests/test-hgweb-symrev.t
--- a/mercurial/templates/gitweb/filelog.tmpl	Mon Jan 16 17:14:36 2017 +0100
+++ b/mercurial/templates/gitweb/filelog.tmpl	Wed Feb 22 12:09:17 2017 +0100
@@ -38,6 +38,8 @@
 </table>
 
 <div class="page_nav">
+<a href="{url|urlescape}log/{symrev}/{file|urlescape}{lessvars%urlparameter}">less</a>
+<a href="{url|urlescape}log/{symrev}/{file|urlescape}{morevars%urlparameter}">more</a>
 {nav%filenav}
 </div>
 
--- a/tests/test-hgweb-symrev.t	Mon Jan 16 17:14:36 2017 +0100
+++ b/tests/test-hgweb-symrev.t	Wed Feb 22 12:09:17 2017 +0100
@@ -616,6 +616,8 @@
   <a href="/file/43c799df6e75/foo?style=gitweb">file</a> |
   <a href="/diff/43c799df6e75/foo?style=gitweb">diff</a> |
   <a href="/annotate/43c799df6e75/foo?style=gitweb">annotate</a>
+  <a href="/log/xyzzy/foo?revcount=30&style=gitweb">less</a>
+  <a href="/log/xyzzy/foo?revcount=120&style=gitweb">more</a>
   <a href="/log/43c799df6e75/foo?style=gitweb">(0)</a> <a href="/log/tip/foo?style=gitweb">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT 'annotate/xyzzy/foo?style=gitweb' | egrep $REVLINKS