move the access of reply/Creator into a nested tag. tal:defines are

evaluated before tal:condition so we may have no permission to access
Creator.

svn path=/plone.app.discussion/trunk/; revision=29207
This commit is contained in:
Carsten Senger 2009-08-20 02:21:23 +00:00
parent c145378f34
commit 241c17df72

View File

@ -29,10 +29,8 @@
<div class="comment"
tal:define="reply reply_dict/comment;
depth reply_dict/depth|python:0;
creator reply/Creator;
author_home_url python:view.get_commenter_home_url(username=reply.author_username);
portrait_url python:view.get_commenter_portrait(reply.author_username);
anonymous_creator python:creator in ('Anonymous User', '');
published python:wtool.getInfoFor(reply, 'review_state') == 'published';"
tal:attributes="class python:'comment replyTreeLevel'+str(depth);
style string:margin-left: ${depth}em;
@ -78,7 +76,7 @@
tal:replace="reply/Creator" />
</tal:name>
<tal:name i18n:translate="label_anonymous_user"
condition="anonymous_creator">Anonymous User</tal:name>
condition="python:reply.Creator() in ('Anonymous User', '')">Anonymous User</tal:name>
<tal:at i18n:translate="label_commented_at">at</tal:at>
<span tal:replace="python:view.format_time(reply.modification_date)">8/23/2001 12:40:44 PM</span>
</div>