source: products/qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/viewThreadsAtBottom.pt @ 1591

Last change on this file since 1591 was 1, checked in by myroslav, 19 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 6.4 KB
Line 
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            <form name="reply"
15                  action=""
16                  method="post"
17                  tal:condition="python:userHasReplyPermission and isDiscussionAllowed"
18                  tal:attributes="action string:$here_url/discussion_reply_form">
19
20                  <input class="standalone"
21                         style="margin-bottom: 1.25em;"
22                         type="submit"
23                         value="Add Comment"
24                         i18n:attributes="value label_add_comment;"
25                         />
26            </form>
27            <form tal:condition="python:isAnon and not userHasReplyPermission and isDiscussionAllowed"
28                  tal:define="pss modules/Products/PythonScripts/standard"
29                  tal:attributes="action python:'%s/login_form?came_from=%s' %
30                                                (here.portal_url(),
31                                                pss.url_quote(request['URL']))">
32                <input class="standalone"
33                       style="margin-bottom: 1.25em;"
34                       type="submit"
35                       value="Log in to add comments"
36                       i18n:attributes="value label_login_to_add_comments;"
37                       />
38            </form>
39
40            <tal:getreplies repeat="reply_dict python:here.getReplyReplies(here)"
41                            define="ifModerate python:here.portal_properties.qPloneComments.getProperty('enable_moderation', None);">
42                <div class="comment" style=""
43                    tal:condition="python:checkPermission('Moderate Discussion', here) or isPublished"
44                    tal:define="indent python:reply_dict['depth']*2;
45                                reply python:reply_dict['object'];
46                                isPublished python:reply.review_state=='published';"
47                    tal:attributes="style string:margin-left:${indent}em;">
48
49                    <h3>
50                        <a name="comments" tal:attributes="name reply/id">
51                        <tal:block replace="structure portal/discussionitem_icon.gif"/>
52                        <span tal:replace="reply/pretty_title_or_id">Comment title</span>
53                        </a>
54                    </h3>
55                    <div class="documentByLine"
56                         tal:define="creator reply/Creator;
57                                     anonymous_creator python:reply.Creator()=='Anonymous User';
58                                     isMember python:not reply.getProperty('isAnon',1)">
59                        <span i18n:translate="label_comment_by">Posted by</span>
60                        <strong tal:content="creator"
61                              tal:condition="isMember">Member's Name</strong>
62                        <tal:x tal:replace="creator"
63                               tal:condition="not:isMember">Anonymous Poster Name</tal:x>
64                        <span i18n:translate="label_anonymous_user"
65                              tal:condition="anonymous_creator">Anonymous User</span>
66                        <span i18n:translate="label_commented_at">at</span>
67                        <span tal:replace="python:portal.toLocalizedTime(reply.ModificationDate(),
68                                           long_format=1)">8/23/2001 12:40:44 PM</span>
69                        <span tal:condition="python:ifModerate and not isPublished">[pending]</span>
70                    </div>
71                    <div class="commentBody"
72                         tal:content="structure reply/CookedBody">
73                         This is the body text of the comment.
74                    </div>
75                    <form name="reply"
76                          action="discussion_reply_form"
77                          method="post"
78                          style="display: inline;"
79                          tal:attributes="action string:${reply/absolute_url}/discussion_reply_form"
80                          tal:condition="python:userHasReplyPermission and isPublished">
81                        <input class="standalone"
82                               type="submit"
83                               value="Reply"
84                               i18n:domain="plonecomments"
85                               i18n:attributes="value label_reply;"
86                               />
87                    </form>
88                    <form name="delete"
89                          action=""
90                          method="post"
91                          style="display: inline;"
92                          tal:condition="python:checkPermission('Moderate Discussion', here)"
93                          tal:attributes="action string:${reply/absolute_url}/deleteDiscussion">
94                        <input class="destructive"
95                               type="submit"
96                               value="Remove"
97                               i18n:attributes="value label_remove;"
98                               />
99                    </form>
100                    <form name="publish_discussion"
101                          action=""
102                          method="post"
103                          style="display: inline;"
104                          tal:condition="not:isPublished"
105                          tal:attributes="action string:${reply/absolute_url}/discussion_publish_comment">
106
107                        <input class="standalone"
108                               type="submit"
109                               value="Publish"
110                               i18n:attributes="value"
111                               />
112                    </form>
113                    <br/>
114                    <div class="documentByLine"
115                         i18n:domain="plonecomments"
116                         i18n:translate="text_no_add_reply"
117                         tal:condition="not:isPublished">Comment must be approved before replies to comment accepted.</div>
118
119                </div>
120            </tal:getreplies>
121        </tal:comments>
122    </tal:allowed>
123</div>
124</body>
125</html>
Note: See TracBrowser for help on using the repository browser.