diff --git a/container/contents.pt b/container/contents.pt
index f3aab5e..89c0890 100644
--- a/container/contents.pt
+++ b/container/contents.pt
@@ -9,6 +9,16 @@
tal:attributes="action request/URL"
tal:define="container_contents view/listContentInfo">
+
+
+
+
+
+
>> bview.items()
[3, 4, 5, 6]
>>> bview.last
- {'url': 'http://127.0.0.1?b_page=5&b_size=4&b_overlap=1&b_orphan=0', 'title': 5}
+ {'url': 'http://127.0.0.1?b_size=4&b_overlap=1&b_page=5&b_orphan=0', 'title': 5}
The real reporting stuff
------------------------
diff --git a/reporter/batch.py b/reporter/batch.py
index 4fd7093..cdecbcb 100644
--- a/reporter/batch.py
+++ b/reporter/batch.py
@@ -77,7 +77,5 @@ class Batch(object):
def getIndexAbsolute(self, idx=0):
if idx < 0:
idx = max(len(self.pages) + idx, 0)
- #if idx < 0 or idx >= len(self.pages):
- # return None
return idx
diff --git a/reporter/browser/batch.py b/reporter/browser/batch.py
index 1bdb832..d9a705a 100644
--- a/reporter/browser/batch.py
+++ b/reporter/browser/batch.py
@@ -23,6 +23,7 @@ HTML providing template.
$Id$
"""
+import urllib
from zope.cachedescriptors.property import Lazy
from cybertools.reporter.batch import Batch
@@ -69,8 +70,16 @@ class BatchView(object):
def urlParams(self, page):
batch = self.batch
- return ('?b_page=%i&b_size=%i&b_overlap=%i&b_orphan=%i'
- % (page+1, batch.size, batch.overlap, batch.orphan) )
+ params = {'b_page': page + 1, 'b_size': batch.size,
+ 'b_overlap': batch.overlap, 'b_orphan': batch.orphan}
+ form = self.request.form
+ for p in form:
+ if p not in params:
+ break # we get UnicodeEncode errors here :-(
+ v = form.get(p)
+ if v:
+ params[p] = v
+ return '?' + urllib.urlencode(params)
def url(self, page):
return str(self.request.URL) + self.urlParams(page)