From 1af2b435fd6071a7007300c904546ddf396edf8b Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sun, 7 Jun 2009 20:58:41 +0000 Subject: [PATCH] get_commenter_portrait and get_commenter_home_url methods added to comments viewlet. tests for get_commenter_portrait added. svn path=/plone.app.discussion/trunk/; revision=27349 --- plone/app/discussion/browser/comments.pt | 12 ++--- plone/app/discussion/browser/comments.py | 15 +++++- .../discussion/tests/test_comments_viewlet.py | 52 +++++++++++++++++-- 3 files changed, 69 insertions(+), 10 deletions(-) diff --git a/plone/app/discussion/browser/comments.pt b/plone/app/discussion/browser/comments.pt index c5ee7a4..b079652 100644 --- a/plone/app/discussion/browser/comments.pt +++ b/plone/app/discussion/browser/comments.pt @@ -26,16 +26,16 @@ tal:define="reply reply_dict/comment; depth reply_dict/depth|python:0; creator reply/Creator; - author_home_url string:${context/portal_url}/author/${reply/author_username}; - portrait python: here.portal_membership.getPersonalPortrait(reply.author_username); + commenter_home_url python:view.get_commenter_home_url(reply.author_username); + portrait python:view.get_commenter_portrait(reply.author_username); anonymous_creator python:creator in ('Anonymous User', '');" tal:attributes="class python:'comment replyTreeLevel'+str(depth); style string:margin-left: ${depth}em; id string:comment-${reply/id}">
- +
@@ -64,7 +64,7 @@ + tal:attributes="href commenter_home_url"> Poster Name