diff --git a/plone/app/discussion/browser/comments_approved.pt b/plone/app/discussion/browser/comments_approved.pt deleted file mode 100644 index 1149e97..0000000 --- a/plone/app/discussion/browser/comments_approved.pt +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - -

- Comments approved -

- -
- Warning - - Moderation workflow is disabled. You have to - - enable the 'Comment Review Workflow' for the Comment content - type before you can moderate comments here. - -
- -
-
-

- No comments approved -

-
-
- -
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - -
CommenterDateIn Response ToCommentApproved byAction
- Name - -
- Email - -
-
- - - - - show full comment text - - - last history entry - - - - -
-
-
-
- -
-
- - - diff --git a/plone/app/discussion/browser/configure.zcml b/plone/app/discussion/browser/configure.zcml index 6caff55..7bb5aac 100644 --- a/plone/app/discussion/browser/configure.zcml +++ b/plone/app/discussion/browser/configure.zcml @@ -29,23 +29,6 @@ permission="plone.app.discussion.ReviewComments" /> - - - - - Moderate comments -

- > Comments approved -

-
-
-

- No comments to moderate. -

+
+
+ + Moderate comments +
+ +
+

+ No comments to moderate. +

+
+ + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
CommenterDateIn Response ToCommentAction
+ + + + Name + +
+ Email + +
+
+ + + + + show full comment text + + + +
+
+
+
+
- +
+ + Approved comments +
+
+
+

+ No comments approved +

+
+
-
+ -
+
-
+
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
CommenterDateIn Response ToCommentAction
- - - - Name - -
- Email - -
-
- - - - - show full comment text - - - -
-
+ + + + + + + + + + + + + + + + + + + + + + + +
CommenterDateIn Response ToCommentApproved byAction
+ Name + +
+ Email + +
+
+ + + + + show full comment text + + + last history entry + + + + +
+
+
+ + +
- +
+ + diff --git a/plone/app/discussion/browser/moderation.py b/plone/app/discussion/browser/moderation.py index 52c85a2..ac9af20 100644 --- a/plone/app/discussion/browser/moderation.py +++ b/plone/app/discussion/browser/moderation.py @@ -35,6 +35,10 @@ class View(BrowserView): review_state='pending', sort_on='created', sort_order='reverse') + self.comments_approved = catalog(object_provides=IComment.__identifier__, + review_state='published', + sort_on='created', + sort_order='reverse') return self.template() def moderation_enabled(self): @@ -54,31 +58,6 @@ class View(BrowserView): return False -class ApprovedView(View): - """Overview comments already approved.""" - template = ViewPageTemplateFile('comments_approved.pt') - try: - template.id = '@@comments-approved' - except AttributeError: - # id is not writeable in Zope 2.12 - pass - - def __call__(self): - self.request.set('disable_border', True) - context = aq_inner(self.context) - catalog = getToolByName(context, 'portal_catalog') - self.comments = catalog(object_provides=IComment.__identifier__, - review_state='published', - sort_on='created', - sort_order='reverse') - - # print("*** approved comments") - # print(self.comments) - # for el in self.comments: - # print(el.id, el.review_state) - return self.template() - - class ModerateCommentsEnabled(BrowserView): def __call__(self):