diff --git a/roundup/cgi/ZTUtils/Batch.py b/roundup/cgi/ZTUtils/Batch.py index 66dde68..e0647e6 100644 --- a/roundup/cgi/ZTUtils/Batch.py +++ b/roundup/cgi/ZTUtils/Batch.py @@ -92,7 +92,9 @@ class Batch: def opt(start,end,size,orphan,sequence): if size < 1: - if start > 0 and end > 0 and end >= start: + if size == -1: + size=len(sequence) + elif start > 0 and end > 0 and end >= start: size=end+1-start else: size=7 diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index deacc88..4d9ef79 100644 --- a//roundup/cgi/templating.py +++ b//roundup/cgi/templating.py @@ -2812,6 +2812,11 @@ class Batch(ZTUtils.Batch): def previous(self): if self.start == 1: return None + + if self._size == -1: + return Batch(self.client, self._sequence, self._size, + 0, 0, self.orphan, self.overlap) + return Batch(self.client, self._sequence, self._size, self.first - self._size + self.overlap, 0, self.orphan, self.overlap)