2009-05-28 08:35:47 +02:00
|
|
|
<tal:block define="userHasReplyPermission view/can_reply;
|
|
|
|
isDiscussionAllowed view/is_discussion_allowed;
|
|
|
|
replies view/get_replies;
|
|
|
|
isAnon view/is_anonymous;
|
|
|
|
errors options/state/getErrors|nothing;"
|
2009-05-22 19:30:52 +02:00
|
|
|
i18n:domain="plone">
|
|
|
|
|
2009-05-28 13:39:36 +02:00
|
|
|
<div class="reply"
|
|
|
|
tal:condition="isAnon">
|
|
|
|
<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;
|
|
|
|
creator reply/Creator;
|
|
|
|
author_home_url string:${context/portal_url}/author/${reply/author_username};
|
2009-05-29 09:12:20 +02:00
|
|
|
portrait python: here.portal_membership.getPersonalPortrait(reply.author_username);
|
2009-05-28 08:08:55 +02:00
|
|
|
anonymous_creator python:creator in ('Anonymous User', '');"
|
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;
|
|
|
|
id string:comment-${reply/id}">
|
2009-05-25 21:24:21 +02:00
|
|
|
|
2009-05-28 09:00:40 +02:00
|
|
|
<div class="commentImage" tal:condition="not:anonymous_creator">
|
2009-05-28 09:04:35 +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"
|
|
|
|
tal:attributes="src portrait/absolute_url;
|
|
|
|
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-05-28 09:04:35 +02:00
|
|
|
tal:condition="isAnon"
|
2009-05-31 12:43:35 +02:00
|
|
|
tal:attributes="src portrait/absolute_url;
|
2009-05-28 09:04:35 +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">
|
|
|
|
<span tal:replace="reply/title">Comment title</span>
|
|
|
|
</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-05-28 08:08:55 +02:00
|
|
|
<tal:name condition="not:anonymous_creator">
|
|
|
|
<a href=""
|
2009-05-28 09:04:35 +02:00
|
|
|
tal:condition="not:isAnon"
|
2009-05-28 08:08:55 +02:00
|
|
|
tal:content="creator"
|
|
|
|
tal:attributes="href author_home_url">
|
|
|
|
Poster Name
|
|
|
|
</a>
|
2009-05-28 09:04:35 +02:00
|
|
|
<span tal:condition="isAnon"
|
|
|
|
tal:replace="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"
|
|
|
|
condition="anonymous_creator">Anonymous User</tal:name>
|
|
|
|
<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"
|
|
|
|
tal:content="structure reply/text">
|
|
|
|
This is the body text of the comment.
|
|
|
|
</div>
|
|
|
|
|
2009-05-26 21:58:33 +02:00
|
|
|
<a href="#" class="reply-to-comment-button" title="reply to this comment"
|
2009-05-28 17:16:49 +02:00
|
|
|
tal:condition="not:isAnon"
|
2009-05-26 21:58:33 +02:00
|
|
|
tal:attributes="onclick string:createReplyToCommentForm(${reply/id});
|
2009-05-27 09:33:13 +02:00
|
|
|
id string:reply-to-comment-${reply/id}-button;
|
|
|
|
href string:#comment-${reply/id}">
|
2009-05-26 21:58:33 +02:00
|
|
|
<img src="++resource++plone.app.discussion.images/reply.gif" />
|
|
|
|
</a>
|
|
|
|
|
2009-05-25 21:24:21 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</tal:getreplies>
|
|
|
|
</div>
|
|
|
|
|
2009-05-28 13:39:36 +02:00
|
|
|
<div class="reply"
|
2009-05-28 17:08:36 +02:00
|
|
|
tal:condition="python: isAnon 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>
|
|
|
|
|
|
|
|
<div class="reply"
|
|
|
|
tal:condition="not:isAnon">
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
<form name="reply"
|
|
|
|
action=""
|
|
|
|
method="get"
|
|
|
|
tal:attributes="action string:${context/absolute_url}/++conversation++default/@@add-comment">
|
|
|
|
|
|
|
|
<div class="field"
|
|
|
|
tal:define="error errors/subject|nothing;"
|
|
|
|
tal:attributes="class python: error and 'field error' or 'field'">
|
|
|
|
|
|
|
|
<label for="subject" i18n:translate="label_subject">Subject</label>
|
|
|
|
|
|
|
|
<span class="fieldRequired" title="Required"
|
|
|
|
i18n:attributes="title title_required;"
|
|
|
|
i18n:translate="label_required">(Required)</span>
|
|
|
|
|
|
|
|
<div tal:content="error">Validation error output</div>
|
|
|
|
|
|
|
|
<input name="subject"
|
|
|
|
id="subject"
|
|
|
|
value=""
|
|
|
|
size="40"
|
|
|
|
tal:attributes="value request/subject|request/title_override|nothing;" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="field"
|
|
|
|
tal:define="error errors/body_text|nothing;"
|
|
|
|
tal:attributes="class python: error and 'field error' or 'field'">
|
|
|
|
|
|
|
|
<label for="body_text" i18n:translate="label_comment">Comment</label>
|
|
|
|
|
|
|
|
<span class="fieldRequired" title="Required"
|
|
|
|
i18n:attributes="title title_required;"
|
|
|
|
i18n:translate="label_required">(Required)</span>
|
|
|
|
|
|
|
|
<div tal:content="error">Validation error output</div>
|
|
|
|
|
|
|
|
<textarea name="body_text"
|
|
|
|
id="body_text"
|
|
|
|
cols="40"
|
|
|
|
rows="8"
|
|
|
|
tal:content="request/body_text|request/text_override | nothing"></textarea>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="formControls">
|
|
|
|
|
|
|
|
<input class="context"
|
|
|
|
type="submit"
|
|
|
|
value="Add Comment"
|
|
|
|
name="form.button.AddComment"
|
|
|
|
i18n:attributes="value label_add_comment;" />
|
|
|
|
|
2009-06-02 17:09:25 +02:00
|
|
|
<input class="standalone cancelreplytocomment"
|
|
|
|
type="submit"
|
|
|
|
name="form.button.Cancel"
|
|
|
|
value="Cancel"
|
|
|
|
i18n:attributes="value label_cancel;" />
|
2009-05-25 20:59:25 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<input type="hidden" name="form.submitted" value="1" />
|
|
|
|
|
|
|
|
</form>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</tal:block>
|