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

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

Building directory structure

File size: 6.2 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:define="indent python:reply_dict['depth']*2;
44                                reply python:reply_dict['object'];
45                                isPublished python:reply.review_state=='published';"
46                    tal:attributes="style string:margin-left:${indent}em;">
47                   
48                    <h3>
49                        <a name="comments" tal:attributes="name reply/id">
50                        <tal:block replace="structure portal/discussionitem_icon.gif"/>
51                        <span tal:replace="reply/pretty_title_or_id">Comment title</span>
52                        </a>
53                    </h3>
54                    <div class="documentByLine"
55                         tal:define="creator reply/Creator;
56                                     anonymous_creator python:reply.Creator()=='Anonymous User';
57                                     isMember python:not reply.getProperty('isAnon',1)">
58                        <span tal:content="python:test(isPublished, 'Published', 'Not Published')"
59                              tal:condition="ifModerate"> Publish state </span>
60                        <span i18n:translate="label_comment_by">Posted by</span>
61                        <strong tal:content="creator"
62                              tal:condition="isMember">Member's Name</strong>
63                        <tal:x tal:replace="creator"
64                               tal:condition="not:isMember">Anonymous Poster Name</tal:x>
65                        <span i18n:translate="label_anonymous_user"
66                              tal:condition="anonymous_creator">Anonymous User</span>
67                        <span i18n:translate="label_commented_at">at</span>
68                        <span tal:replace="python:portal.toLocalizedTime(reply.ModificationDate(),
69                                           long_format=1)">8/23/2001 12:40:44 PM</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:attributes="value label_reply;"
85                               />
86                    </form>
87                    <form name="delete"
88                          action=""
89                          method="post"
90                          style="display: inline;"
91                          tal:condition="python:checkPermission('Manage portal', here)"
92                          tal:attributes="action string:${reply/absolute_url}/deleteDiscussion">
93                        <input class="destructive"
94                               type="submit"
95                               value="Remove"
96                               i18n:attributes="value label_remove;"
97                               />
98                    </form>
99                    <form name="publish_discussion"
100                          action=""
101                          method="post"
102                          style="display: inline;"
103                          tal:condition="not:isPublished"
104                          tal:attributes="action string:${reply/absolute_url}/discussion_publish_comment">
105
106                        <input class="standalone"
107                               type="submit"
108                               value="Publish"
109                               i18n:attributes="value"
110                               />
111                    </form>
112                    <br/>
113                    <div class="documentByLine"
114                         tal:condition="not:isPublished">Until publishing this comment adding reply impossible.</div>
115
116                </div>
117            </tal:getreplies>
118        </tal:comments>
119    </tal:allowed>
120</div>
121</body>
122</html>
Note: See TracBrowser for help on using the repository browser.