From 77490ec0d5098b4c86334405be48ec0634b72d27 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 28 May 2009 06:11:09 +0000 Subject: [PATCH] Redirect directly to the comment and not to the content object after adding a comment. svn path=/plone.app.discussion/trunk/; revision=27189 --- plone/app/discussion/browser/comments.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 1960da1..62f7047 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -94,8 +94,8 @@ class AddComment(BrowserView): # Add comment to the conversation comment_id = conversation.addComment(comment) - # Redirect to the comment - self.request.response.redirect(aq_parent(aq_inner(self.context)).absolute_url()) + # Redirect to comment (inside a content object page) + self.request.response.redirect(aq_parent(aq_inner(self.context)).absolute_url() + '#comment-' + str(comment_id)) class ReplyToComment(BrowserView): """Reply to a comment @@ -125,5 +125,5 @@ class ReplyToComment(BrowserView): # Add the reply to the comment new_re_id = replies.addComment(comment) - # Redirect to the document object page - self.request.response.redirect(aq_parent(aq_inner(self.context)).absolute_url()) + # Redirect to comment (inside a content object page) + self.request.response.redirect(aq_parent(aq_inner(self.context)).absolute_url() + '#comment-' + str(comment_id))