2010-01-27 18:00:58 +01:00
|
|
|
<tal:block tal:define="isDiscussionAllowed view/is_discussion_allowed"
|
|
|
|
tal:condition="isDiscussionAllowed"
|
|
|
|
i18n:domain="plone">
|
2009-05-28 08:35:47 +02:00
|
|
|
<tal:block define="userHasReplyPermission view/can_reply;
|
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-10-07 22:07:55 +02:00
|
|
|
has_replies python:view.has_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;
|
2010-01-27 18:00:58 +01:00
|
|
|
wtool context/@@plone_tools/workflow;">
|
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"
|
2009-08-28 23:21:54 +02:00
|
|
|
tal:attributes="class python: showCommenterImage and 'discussion showCommenterImage' or 'discussion';"
|
2009-05-28 08:35:47 +02:00
|
|
|
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);
|
2010-01-27 15:54:07 +01:00
|
|
|
has_author_link python:author_home_url and not isAnon;
|
2009-06-14 13:10:45 +02:00
|
|
|
portrait_url python:view.get_commenter_portrait(reply.author_username);
|
2009-12-19 15:04:49 +01:00
|
|
|
review_state python:wtool.getInfoFor(reply, 'review_state');"
|
|
|
|
tal:attributes="class python:'comment replyTreeLevel'+str(depth)+' state-'+str(review_state);
|
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-12-19 15:04:49 +01:00
|
|
|
tal:condition="python:canManage or review_state == 'published'">
|
2009-05-25 21:24:21 +02:00
|
|
|
|
2009-06-08 10:23:18 +02:00
|
|
|
<div class="commentImage" tal:condition="showCommenterImage">
|
2009-12-19 14:35:49 +01:00
|
|
|
<a href="" tal:condition="has_author_link"
|
2009-06-08 09:28:59 +02:00
|
|
|
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-12-19 14:35:49 +01:00
|
|
|
tal:condition="not: has_author_link"
|
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
|
|
|
|
2010-01-28 12:48:44 +01:00
|
|
|
<h3 class="commentTitle"
|
|
|
|
tal:content="reply/Title" />
|
2009-05-25 21:24:21 +02:00
|
|
|
|
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-12-19 14:35:49 +01:00
|
|
|
tal:condition="has_author_link"
|
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-12-19 14:35:49 +01:00
|
|
|
<span tal:condition="not: has_author_link"
|
2009-08-20 04:17:02 +02:00
|
|
|
tal:replace="reply/Creator" />
|
2009-05-28 08:08:55 +02:00
|
|
|
</tal:name>
|
2010-03-16 14:06:08 +01:00
|
|
|
<tal:name condition="python:reply.Creator() in ('Anonymous User', '', None)"
|
|
|
|
tal:content="reply/author_name">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"
|
2010-01-24 22:19:18 +01:00
|
|
|
tal:content="reply/getText" />
|
2009-05-25 21:24:21 +02:00
|
|
|
|
2009-08-28 23:21:54 +02:00
|
|
|
<div class="commentActions">
|
|
|
|
<button class="context reply-to-comment-button hide allowMultiSubmit"
|
|
|
|
tal:condition="python:userHasReplyPermission and isDiscussionAllowed or isAnonymousDiscussionAllowed"
|
2010-01-24 14:47:39 +01:00
|
|
|
i18n:translate="label_reply">
|
2009-08-28 23:21:54 +02:00
|
|
|
Reply
|
|
|
|
</button>
|
2009-06-20 18:00:36 +02:00
|
|
|
|
2009-08-28 23:21:54 +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">
|
|
|
|
<input name="form.button.DeleteComment"
|
|
|
|
class="destructive"
|
|
|
|
type="submit"
|
2009-12-08 16:37:52 +01:00
|
|
|
value="Delete"
|
|
|
|
i18n:attributes="value label_delete;"
|
2009-08-28 23:21:54 +02:00
|
|
|
/>
|
|
|
|
</form>
|
2009-06-16 15:13:40 +02:00
|
|
|
|
2009-08-28 23:21:54 +02:00
|
|
|
<!-- Workflow actions (e.g. 'publish') -->
|
|
|
|
<form name=""
|
|
|
|
action=""
|
|
|
|
method="get"
|
|
|
|
style="display: inline;"
|
|
|
|
tal:repeat="action reply_dict/actions|nothing"
|
|
|
|
tal:attributes="action string:${reply/absolute_url}/@@moderate-publish-comment;
|
|
|
|
name action/id">
|
|
|
|
<input type="hidden" name="workflow_action" tal:attributes="value action/id" />
|
|
|
|
<input name="form.button.PublishComment"
|
|
|
|
class="context"
|
|
|
|
type="submit"
|
|
|
|
tal:attributes="value action/title"
|
2010-01-24 14:47:39 +01:00
|
|
|
i18n:attributes="value"
|
2009-08-28 23:21:54 +02:00
|
|
|
/>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
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-10-07 22:07:55 +02:00
|
|
|
tal:condition="python: isAnon and not isAnonymousDiscussionAllowed and has_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>
|
|
|
|
|
2010-02-16 21:25:56 +01:00
|
|
|
<div tal:replace="structure view/form/render" />
|
2009-05-25 20:59:25 +02:00
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
2010-01-27 18:00:58 +01:00
|
|
|
</tal:block>
|
2009-05-25 20:59:25 +02:00
|
|
|
</tal:block>
|