From cfd70d8cc82a77a163cc41a47dce06d5f7563341 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 30 Jun 2009 23:17:40 +0000 Subject: [PATCH] add pagination to moderate comment view. svn path=/plone.app.discussion/trunk/; revision=27752 --- plone/app/discussion/browser/moderation.pt | 57 +++++++++++-------- plone/app/discussion/browser/moderation.py | 1 + .../browser/stylesheets/discussion.css | 13 +++-- 3 files changed, 41 insertions(+), 30 deletions(-) diff --git a/plone/app/discussion/browser/moderation.pt b/plone/app/discussion/browser/moderation.pt index a7763de..dd77ea8 100644 --- a/plone/app/discussion/browser/moderation.pt +++ b/plone/app/discussion/browser/moderation.pt @@ -10,7 +10,11 @@ + filter view/filter|nothing; + Batch python:modules['Products.CMFPlone'].Batch; + b_size python:30; + b_start python:0; + b_start request/b_start | b_start;">

Moderate comments @@ -49,31 +53,33 @@
+ tal:attributes="action string:${context/absolute_url}/@@bulk-actions" + tal:condition="items" + tal:define="batch python:Batch(items, b_size, int(b_start), orphan=1);"> - +
+ + + +
+ +
+ +
- - - @@ -85,7 +91,7 @@ - + @@ -137,6 +143,7 @@
- - - -
Commenter
+
diff --git a/plone/app/discussion/browser/moderation.py b/plone/app/discussion/browser/moderation.py index 54201b1..56a12b9 100644 --- a/plone/app/discussion/browser/moderation.py +++ b/plone/app/discussion/browser/moderation.py @@ -10,6 +10,7 @@ class View(BrowserView): """ template = ViewPageTemplateFile('moderation.pt') + template.id = '@@moderate-comments' def __call__(self): diff --git a/plone/app/discussion/browser/stylesheets/discussion.css b/plone/app/discussion/browser/stylesheets/discussion.css index 2b93ff6..28615b8 100644 --- a/plone/app/discussion/browser/stylesheets/discussion.css +++ b/plone/app/discussion/browser/stylesheets/discussion.css @@ -71,8 +71,15 @@ ul.filter { background-color: #DEE7EC; border-bottom: 1px solid #DEE7EC; } -.bulkactions { + +#bulkactions { text-align: left; + background: #DEE7EC; + border: 1px solid #8CACBB; +} + +#bulkactions select { + margin: 0.1em 0; } #dobulkaction { @@ -90,7 +97,3 @@ ul.filter { #review-comments { margin: 0; } - -#review-comments select { - margin: 0.1em 0; -}