fix bug #2010181: The name of a commenter who commented while not logged in should not appear as a link.

svn path=/plone.app.discussion/trunk/; revision=32535
This commit is contained in:
Timo Stollenwerk 2009-12-19 13:35:49 +00:00
parent 2bb8f514e8
commit 5f9e443b9c

View File

@ -32,6 +32,7 @@
tal:define="reply reply_dict/comment; tal:define="reply reply_dict/comment;
depth reply_dict/depth|python:0; depth reply_dict/depth|python:0;
author_home_url python:view.get_commenter_home_url(username=reply.author_username); author_home_url python:view.get_commenter_home_url(username=reply.author_username);
has_author_link python:author_home_url and not isAnon;
portrait_url python:view.get_commenter_portrait(reply.author_username); portrait_url python:view.get_commenter_portrait(reply.author_username);
published python:wtool.getInfoFor(reply, 'review_state') == 'published';" published python:wtool.getInfoFor(reply, 'review_state') == 'published';"
tal:attributes="class python:'comment replyTreeLevel'+str(depth); tal:attributes="class python:'comment replyTreeLevel'+str(depth);
@ -40,8 +41,7 @@
tal:condition="python:canManage or published"> tal:condition="python:canManage or published">
<div class="commentImage" tal:condition="showCommenterImage"> <div class="commentImage" tal:condition="showCommenterImage">
<a href="" tal:condition="has_author_link"
<a href="" tal:condition="not:isAnon"
tal:attributes="href author_home_url"> tal:attributes="href author_home_url">
<img src="defaultUser.gif" <img src="defaultUser.gif"
alt="" alt=""
@ -54,7 +54,7 @@
alt="" alt=""
border="0" border="0"
width="75" width="75"
tal:condition="isAnon" tal:condition="not: has_author_link"
tal:attributes="src portrait_url; tal:attributes="src portrait_url;
alt reply/Creator" /> alt reply/Creator" />
</div> </div>
@ -69,12 +69,12 @@
<tal:posted i18n:translate="label_comment_by">Posted by</tal:posted> <tal:posted i18n:translate="label_comment_by">Posted by</tal:posted>
<tal:name> <tal:name>
<a href="" <a href=""
tal:condition="not:isAnon" tal:condition="has_author_link"
tal:content="reply/Creator" tal:content="reply/Creator"
tal:attributes="href author_home_url"> tal:attributes="href author_home_url">
Poster Name Poster Name
</a> </a>
<span tal:condition="isAnon" <span tal:condition="not: has_author_link"
tal:replace="reply/Creator" /> tal:replace="reply/Creator" />
</tal:name> </tal:name>
<tal:name i18n:translate="label_anonymous_user" <tal:name i18n:translate="label_anonymous_user"