changeset 31094:0f39055c9be5

gitweb: add "more" and "less" navigation links in filelog template
author Denis Laxalde <denis.laxalde@logilab.fr>
date Wed, 22 Feb 2017 12:09:17 +0100
parents 0e07855e6054
children a113284f54a0
files mercurial/templates/gitweb/filelog.tmpl tests/test-hgweb-symrev.t
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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