1 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" |
---|
2 | i18n:domain="plone"> |
---|
3 | |
---|
4 | <body> |
---|
5 | |
---|
6 | <div metal:define-macro="discussionView" |
---|
7 | class="discussion" |
---|
8 | tal:define="userHasReplyPermission python:checkPermission('Reply to item', here); |
---|
9 | portal_discussion portal/portal_discussion; |
---|
10 | isDiscussionAllowed python:portal_discussion.isDiscussionAllowedFor(here); |
---|
11 | "> |
---|
12 | <tal:allowed condition="isViewTemplate"> |
---|
13 | <tal:comments> |
---|
14 | |
---|
15 | <tal:getreplies repeat="reply_dict python:here.getReplyReplies(here)"> |
---|
16 | <div class="comment" tal:define="reply python:reply_dict['object']; |
---|
17 | poster reply/Creator; |
---|
18 | posterinfo python:mtool.getHomeFolder(poster); |
---|
19 | "> |
---|
20 | |
---|
21 | <div class="commentBody" |
---|
22 | tal:content="structure reply/CookedBody"> |
---|
23 | PLACEHOLDER |
---|
24 | </div> |
---|
25 | |
---|
26 | <div class="documentByLine"> |
---|
27 | <span i18n:translate="label_comment_by">Posted by</span> |
---|
28 | <a href="#" tal:attributes="href posterinfo/absolute_url" tal:content="posterinfo/NiceName">PLACEHOLDER</a> |
---|
29 | <span i18n:translate="label_commented_at">at</span> |
---|
30 | <span tal:replace="python:portal.toLocalizedTime(reply.ModificationDate(), |
---|
31 | long_format=1)">8/23/2001 12:40:44 PM</span> |
---|
32 | </div> |
---|
33 | |
---|
34 | <form name="delete" |
---|
35 | action="" |
---|
36 | method="post" |
---|
37 | style="display: inline;" |
---|
38 | tal:condition="python:checkPermission('Manage portal', here)" |
---|
39 | tal:attributes="action string:${reply/absolute_url}/deleteDiscussion"> |
---|
40 | <input class="destructive" |
---|
41 | type="submit" |
---|
42 | value="Remove" |
---|
43 | i18n:attributes="value label_remove;" |
---|
44 | /> |
---|
45 | </form> |
---|
46 | </div> |
---|
47 | </tal:getreplies> |
---|
48 | <form name="reply" |
---|
49 | action="" |
---|
50 | method="post" |
---|
51 | tal:condition="python:userHasReplyPermission and isDiscussionAllowed and wf_state!='hidden'" |
---|
52 | tal:attributes="action string:$here_url/discussion_reply" |
---|
53 | tal:define="fieldName string:body_text; |
---|
54 | value nothing; |
---|
55 | widget python:{'rows':10, 'cols':40, 'WYSIWYMLines':False}" |
---|
56 | > |
---|
57 | <h3 i18n:translate="comment_box_header">Comment</h3> |
---|
58 | |
---|
59 | <div metal:use-macro="here/wysiwym/macros/area_edit" /> |
---|
60 | |
---|
61 | <input class="standalone" |
---|
62 | style="margin-bottom: 1.25em;" |
---|
63 | type="submit" |
---|
64 | value="Add Comment" |
---|
65 | i18n:attributes="value label_add_comment;" |
---|
66 | /> |
---|
67 | </form> |
---|
68 | <form tal:condition="python:isAnon and not userHasReplyPermission and isDiscussionAllowed" |
---|
69 | tal:define="pss modules/Products/PythonScripts/standard" |
---|
70 | tal:attributes="action python:'%s/login_form?came_from=%s' % |
---|
71 | (here.portal_url(), |
---|
72 | pss.url_quote(request['URL']))"> |
---|
73 | <input class="standalone" |
---|
74 | style="margin-bottom: 1.25em;" |
---|
75 | type="submit" |
---|
76 | value="Log in to add comments" |
---|
77 | i18n:attributes="value label_login_to_add_comments;" |
---|
78 | /> |
---|
79 | </form> |
---|
80 | |
---|
81 | |
---|
82 | </tal:comments> |
---|
83 | </tal:allowed> |
---|
84 | </div> |
---|
85 | </body> |
---|
86 | </html> |
---|