--- a/templates/results.html Thu May 28 15:36:56 2015 +0800
+++ b/templates/results.html Thu May 28 20:26:57 2015 +0800
- <a href="/results.html">back to tip</a>
+ <a href="{{ setrev() }}">back to tip</a>
{% set prevrev = changesets[0]['rev'] + 120 if changesets else None %}
{% if prevrev %}<a href="{{ setrev(prevrev) }}">prev page</a>{% end %}
{% set nextrev = changesets[-1]['rev'] - 1 if changesets else None %}
- <a href="/results.html">back to tip</a>
+ <a href="{{ setrev() }}">back to tip</a>
{% if prevrev %}<a href="{{ setrev(prevrev) }}">prev page</a>{% end %}
{% if nextrev > -1 %}<a href="{{ setrev(nextrev) }}">next page</a>{% end %}
--- a/viewer.py Thu May 28 15:36:56 2015 +0800
+++ b/viewer.py Thu May 28 20:26:57 2015 +0800
kwargs['local'] = [str(value)]
- return '?' + self.urlencode(**kwargs)
+ return '?' + self.urlencode(**kwargs)
+ return self.request.path
- def setrev(self, value):
+ def setrev(self, value=None):
kwargs = self.request.arguments.copy()
- kwargs['rev'] = ['rev({})'.format(value)]
- return '?' + self.urlencode(**kwargs)
+ kwargs['rev'] = ['rev({})'.format(value)]
+ return '?' + self.urlencode(**kwargs)
+ return self.request.path
changesets = self.getchangesets()