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:
parent
c145378f34
commit
241c17df72
@ -29,10 +29,8 @@
|
|||||||
<div class="comment"
|
<div class="comment"
|
||||||
tal:define="reply reply_dict/comment;
|
tal:define="reply reply_dict/comment;
|
||||||
depth reply_dict/depth|python:0;
|
depth reply_dict/depth|python:0;
|
||||||
creator reply/Creator;
|
|
||||||
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);
|
||||||
portrait_url python:view.get_commenter_portrait(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';"
|
published python:wtool.getInfoFor(reply, 'review_state') == 'published';"
|
||||||
tal:attributes="class python:'comment replyTreeLevel'+str(depth);
|
tal:attributes="class python:'comment replyTreeLevel'+str(depth);
|
||||||
style string:margin-left: ${depth}em;
|
style string:margin-left: ${depth}em;
|
||||||
@ -78,7 +76,7 @@
|
|||||||
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"
|
||||||
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>
|
<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>
|
<span tal:replace="python:view.format_time(reply.modification_date)">8/23/2001 12:40:44 PM</span>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user