Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 5087:39af8a0f3446
Applied patch attached to issue2550723. Problem in index page
@pagesize=0 not properly propigated to previous batch link (is set to
actual number of entries displayed).
Using demo.py verified original issue with 0 page size. Also verified
that a non-zero page size was properly propigated (values 5 and 20).
Applied patch attached to issue. Verified issue with size 0
fixed. Verified that values 5 and 20 worked correctly. Updated
CHANGES.txt.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 18 Jun 2016 23:49:41 -0400 |
| parents | c1f1465d5303 |
| children | 92d33d3125a0 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Sat Jun 18 22:48:21 2016 -0400 +++ b/roundup/cgi/templating.py Sat Jun 18 23:49:41 2016 -0400 @@ -2925,7 +2925,7 @@ def previous(self): if self.start == 1: return None - return Batch(self.client, self._sequence, self._size, + return Batch(self.client, self._sequence, self.size, self.first - self._size + self.overlap, 0, self.orphan, self.overlap) @@ -2934,7 +2934,7 @@ self._sequence[self.end] except IndexError: return None - return Batch(self.client, self._sequence, self._size, + return Batch(self.client, self._sequence, self.size, self.end - self.overlap, 0, self.orphan, self.overlap) class TemplatingUtils:
