2009-05-28 08:35:47 +02:00
|
|
|
<tal:block define="userHasReplyPermission view/can_reply;
|
|
|
|
isDiscussionAllowed view/is_discussion_allowed;
|
2009-06-08 10:00:15 +02:00
|
|
|
isAnonymousDiscussionAllowed view/anonymous_discussion_allowed;
|
2009-05-28 08:35:47 +02:00
|
|
|
isAnon view/is_anonymous;
|
2009-06-13 18:46:37 +02:00
|
|
|
canManage view/can_manage;
|
|
|
|
replies python:view.get_replies(canManage);
|
2009-06-08 10:23:18 +02:00
|
|
|
showCommenterImage view/show_commenter_image;
|
2009-06-21 10:29:42 +02:00
|
|
|
errors options/state/getErrors|nothing;
|
|
|
|
wtool context/@@plone_tools/workflow"
|
2009-06-03 19:05:26 +02:00
|
|
|
tal:condition="isDiscussionAllowed"
|
2009-05-22 19:30:52 +02:00
|
|
|
i18n:domain="plone">
|
2009-08-14 11:02:42 +02:00
|
|
|
|
2009-05-28 13:39:36 +02:00
|
|
|
<div class="reply"
|
2009-06-08 10:00:15 +02:00
|
|
|
tal:condition="python:isAnon and not isAnonymousDiscussionAllowed">
|
2009-05-28 13:39:36 +02:00
|
|
|
<form tal:attributes="action view/login_action">
|
|
|
|
<input class="standalone"
|
|
|
|
style="margin-bottom: 1.25em;"
|
|
|
|
type="submit"
|
|
|
|
value="Log in to add comments"
|
|
|
|
i18n:attributes="value label_login_to_add_comments;"
|
|
|
|
/>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2009-05-28 08:35:47 +02:00
|
|
|
<div class="discussion"
|
|
|
|
tal:condition="python:replies or (userHasReplyPermission and isDiscussionAllowed) or (isAnon and not userHasReplyPermission and isDiscussionAllowed)">
|
|
|
|
<tal:getreplies repeat="reply_dict replies">
|
2009-05-25 21:24:21 +02:00
|
|
|
|
|
|
|
<div class="comment"
|
2009-05-27 08:58:00 +02:00
|
|
|
tal:define="reply reply_dict/comment;
|
2009-05-28 08:08:55 +02:00
|
|
|
depth reply_dict/depth|python:0;
|
2009-06-14 13:10:45 +02:00
|
|
|
author_home_url python:view.get_commenter_home_url(username=reply.author_username);
|
|
|
|
portrait_url python:view.get_commenter_portrait(reply.author_username);
|
2009-06-21 10:29:42 +02:00
|
|
|
published python:wtool.getInfoFor(reply, 'review_state') == 'published';"
|
2009-05-27 08:58:00 +02:00
|
|
|
tal:attributes="class python:'comment replyTreeLevel'+str(depth);
|
2009-05-27 09:33:13 +02:00
|
|
|
style string:margin-left: ${depth}em;
|
2009-08-20 04:17:02 +02:00
|
|
|
id string:${reply/getId}"
|
2009-06-21 15:00:28 +02:00
|
|
|
tal:condition="python:canManage or published">
|
2009-05-25 21:24:21 +02:00
|
|
|
|
2009-06-08 10:23:18 +02:00
|
|
|
<div class="commentImage" tal:condition="showCommenterImage">
|
2009-06-14 13:10:45 +02:00
|
|
|
|
2009-06-08 09:28:59 +02:00
|
|
|
<a href="" tal:condition="not:isAnon"
|
|
|
|
tal:attributes="href author_home_url">
|
2009-05-29 09:12:20 +02:00
|
|
|
<img src="defaultUser.gif"
|
|
|
|
alt=""
|
|
|
|
border="0"
|
|
|
|
width="75"
|
2009-06-14 13:10:45 +02:00
|
|
|
tal:attributes="src portrait_url;
|
2009-08-20 04:17:02 +02:00
|
|
|
alt reply/Creator" />
|
2009-05-28 08:08:55 +02:00
|
|
|
</a>
|
2009-05-31 12:43:35 +02:00
|
|
|
<img src="defaultUser.gif"
|
|
|
|
alt=""
|
|
|
|
border="0"
|
|
|
|
width="75"
|
2009-06-08 09:28:59 +02:00
|
|
|
tal:condition="isAnon"
|
2009-06-14 13:10:45 +02:00
|
|
|
tal:attributes="src portrait_url;
|
2009-08-20 04:17:02 +02:00
|
|
|
alt reply/Creator" />
|
2009-05-28 09:00:40 +02:00
|
|
|
</div>
|
2009-05-28 08:08:55 +02:00
|
|
|
|
2009-05-25 21:24:21 +02:00
|
|
|
<h3>
|
|
|
|
<a name="comments" tal:attributes="name reply/title">
|
2009-08-20 04:17:02 +02:00
|
|
|
<span tal:replace="reply/Title">Comment title</span>
|
2009-05-25 21:24:21 +02:00
|
|
|
</a>
|
|
|
|
</h3>
|
|
|
|
|
2009-05-28 08:08:55 +02:00
|
|
|
<div class="documentByLine">
|
2009-05-25 21:24:21 +02:00
|
|
|
<tal:posted i18n:translate="label_comment_by">Posted by</tal:posted>
|
2009-06-08 09:28:59 +02:00
|
|
|
<tal:name>
|
2009-05-28 08:08:55 +02:00
|
|
|
<a href=""
|
2009-05-28 09:04:35 +02:00
|
|
|
tal:condition="not:isAnon"
|
2009-08-20 04:17:02 +02:00
|
|
|
tal:content="reply/Creator"
|
2009-06-08 09:28:59 +02:00
|
|
|
tal:attributes="href author_home_url">
|
2009-05-28 08:08:55 +02:00
|
|
|
Poster Name
|
|
|
|
</a>
|
2009-05-28 09:04:35 +02:00
|
|
|
<span tal:condition="isAnon"
|
2009-08-20 04:17:02 +02:00
|
|
|
tal:replace="reply/Creator" />
|
2009-05-28 08:08:55 +02:00
|
|
|
</tal:name>
|
2009-05-25 21:24:21 +02:00
|
|
|
<tal:name i18n:translate="label_anonymous_user"
|
2009-08-20 04:21:23 +02:00
|
|
|
condition="python:reply.Creator() in ('Anonymous User', '')">Anonymous User</tal:name>
|
2009-05-25 21:24:21 +02:00
|
|
|
<tal:at i18n:translate="label_commented_at">at</tal:at>
|
2009-05-26 09:24:52 +02:00
|
|
|
<span tal:replace="python:view.format_time(reply.modification_date)">8/23/2001 12:40:44 PM</span>
|
|
|
|
</div>
|
2009-05-25 21:24:21 +02:00
|
|
|
|
|
|
|
<div class="commentBody"
|
2009-08-20 04:17:02 +02:00
|
|
|
tal:content="structure reply/getText">
|
2009-05-25 21:24:21 +02:00
|
|
|
This is the body text of the comment.
|
|
|
|
</div>
|
|
|
|
|
2009-06-20 18:00:36 +02:00
|
|
|
<button style="display: inline;"
|
2009-06-20 22:10:09 +02:00
|
|
|
class="context reply-to-comment-button allowMultiSubmit"
|
2009-06-20 18:00:36 +02:00
|
|
|
tal:condition="python:userHasReplyPermission and isDiscussionAllowed or isAnonymousDiscussionAllowed"
|
|
|
|
i18n:translate="label_reply;">
|
|
|
|
Reply
|
|
|
|
</button>
|
|
|
|
|
2009-06-11 15:51:33 +02:00
|
|
|
<form name="delete"
|
|
|
|
action=""
|
|
|
|
method="post"
|
|
|
|
style="display: inline;"
|
|
|
|
tal:condition="view/can_manage"
|
|
|
|
tal:attributes="action string:${reply/absolute_url}/@@moderate-delete-comment">
|
2009-07-04 18:59:55 +02:00
|
|
|
<input name="form.button.DeleteComment"
|
|
|
|
class="destructive"
|
2009-06-11 15:51:33 +02:00
|
|
|
type="submit"
|
|
|
|
value="Remove"
|
|
|
|
i18n:attributes="value label_remove;"
|
|
|
|
/>
|
|
|
|
</form>
|
2009-06-16 15:13:40 +02:00
|
|
|
|
2009-06-11 15:51:33 +02:00
|
|
|
<!-- Workflow actions (e.g. 'publish') -->
|
|
|
|
<form name=""
|
|
|
|
action=""
|
|
|
|
method="get"
|
|
|
|
style="display: inline;"
|
2009-06-13 20:02:59 +02:00
|
|
|
tal:repeat="action reply_dict/actions|nothing"
|
2009-07-06 19:30:19 +02:00
|
|
|
tal:attributes="action string:${reply/absolute_url}/@@moderate-publish-comment;
|
2009-06-11 15:51:33 +02:00
|
|
|
name action/id">
|
|
|
|
<input type="hidden" name="workflow_action" tal:attributes="value action/id" />
|
2009-07-06 19:30:19 +02:00
|
|
|
<input name="form.button.PublishComment"
|
|
|
|
class="context"
|
2009-06-11 15:51:33 +02:00
|
|
|
type="submit"
|
|
|
|
tal:attributes="value action/title"
|
|
|
|
/>
|
2009-06-13 19:33:48 +02:00
|
|
|
</form>
|
2009-06-11 15:51:33 +02:00
|
|
|
|
2009-05-25 21:24:21 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</tal:getreplies>
|
|
|
|
</div>
|
|
|
|
|
2009-05-28 13:39:36 +02:00
|
|
|
<div class="reply"
|
2009-06-08 10:00:15 +02:00
|
|
|
tal:condition="python: isAnon and not isAnonymousDiscussionAllowed and replies">
|
2009-05-28 13:39:36 +02:00
|
|
|
<form tal:attributes="action view/login_action">
|
|
|
|
<input class="standalone"
|
|
|
|
style="margin-bottom: 1.25em;"
|
|
|
|
type="submit"
|
|
|
|
value="Log in to add comments"
|
|
|
|
i18n:attributes="value label_login_to_add_comments;"
|
|
|
|
/>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2009-08-14 11:02:00 +02:00
|
|
|
<div id="commenting" class="reply" tal:condition="python: isAnon and isAnonymousDiscussionAllowed or not isAnon">
|
2009-05-28 13:39:36 +02:00
|
|
|
|
2009-05-25 20:59:25 +02:00
|
|
|
<fieldset>
|
|
|
|
|
|
|
|
<legend i18n:translate="legend_add_comment">Add comment</legend>
|
|
|
|
<p i18n:translate="description_add_comment">
|
|
|
|
You can add a comment by filling out the form below. Plain text
|
|
|
|
formatting.
|
|
|
|
</p>
|
|
|
|
|
2009-08-01 23:47:50 +02:00
|
|
|
<div tal:replace="structure view/contents" />
|
2009-05-25 20:59:25 +02:00
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</tal:block>
|