source: products/qPloneComments/tags/3.1/browser/comments.pt @ 1591

Last change on this file since 1591 was 89, checked in by chervol, 18 years ago

added i18n in configlet

  • Property svn:eol-style set to native
File size: 5.4 KB
Line 
1<tal:block define="userHasReplyPermission view/can_reply;
2                   isDiscussionAllowed view/is_discussion_allowed;
3                   replies view/get_replies;
4                   isAnon view/is_anonymous;
5                   ifModerate view/is_moderation_enabled;
6                   isModerationAllowed view/can_moderate">
7    <div class="discussion"
8         tal:condition="python:replies or (userHasReplyPermission and isDiscussionAllowed) or (isAnon and not userHasReplyPermission and isDiscussionAllowed)">
9        <form name="reply"
10              action=""
11              method="post"
12              tal:condition="python:userHasReplyPermission and isDiscussionAllowed"
13              tal:attributes="action string:${context/absolute_url}/discussion_reply_form#discussion">
14
15              <input class="standalone"
16                     style="margin-bottom: 1.25em;"
17                     type="submit"
18                     value="Add Comment"
19                     i18n:attributes="value label_add_comment;"
20                     />
21        </form>
22        <form tal:condition="python:isAnon and not userHasReplyPermission and isDiscussionAllowed"
23              tal:attributes="action view/login_action">
24            <input class="standalone"
25                   style="margin-bottom: 1.25em;"
26                   type="submit"
27                   value="Log in to add comments"
28                   i18n:attributes="value label_login_to_add_comments;"
29                   />
30        </form>
31
32        <tal:getreplies repeat="reply_dict replies">
33            <div class="comment" style=""
34                tal:condition="python:isModerationAllowed or isPublished"
35                tal:define="indent python:reply_dict['depth']*2;
36                            reply python:reply_dict['object'];
37                            isPublished python:reply.review_state=='published';"
38                tal:attributes="style string:margin-left:${indent}em;">
39
40                <h3>
41                    <a name="comments" tal:attributes="name reply/id">
42                    <span tal:replace="reply/pretty_title_or_id">Comment title</span>
43                    </a>
44                </h3>
45                <div class="documentByLine"
46                     tal:define="creator reply/Creator;
47                                 anonymous_creator python:creator=='Anonymous User';
48                                 mi python:not anonymous_creator and view.member_info(creator);
49                                 fullname python: mi and mi['fullname'] or creator;" >
50                    <span i18n:translate="label_comment_by">Posted by</span>
51                    <span tal:content="fullname"
52                          tal:condition="not:anonymous_creator">Poster Name</span>
53                    <span i18n:translate="label_anonymous_user"
54                          tal:condition="anonymous_creator">Anonymous User</span>
55                    <span i18n:translate="label_commented_at">at</span>
56                    <span tal:replace="python:view.format_time(reply.ModificationDate())">8/23/2001 12:40:44 PM</span>
57                    <span tal:condition="python:ifModerate and not isPublished">[pending]</span>
58                </div>
59                <div class="commentBody"
60                     tal:content="structure reply/CookedBody">
61                     This is the body text of the comment.
62                </div>
63                <form name="reply"
64                      action="discussion_reply_form"
65                      method="post"
66                      style="display: inline;"
67                      tal:attributes="action string:${reply/absolute_url}/discussion_reply_form"
68                      tal:condition="python:userHasReplyPermission and isPublished">
69                    <input class="standalone"
70                           type="submit"
71                           value="Reply"
72                           i18n:domain="plonecomments"
73                           i18n:attributes="value label_reply;"
74                           />
75                </form>
76                <form name="delete"
77                      action=""
78                      method="post"
79                      style="display: inline;"
80                      tal:condition="isModerationAllowed"
81                      tal:attributes="action string:${reply/absolute_url}/deleteDiscussion">
82                    <input class="destructive"
83                           type="submit"
84                           value="Remove"
85                           i18n:attributes="value label_remove;"
86                           />
87                </form>
88                <form name="publish_discussion"
89                      action=""
90                      method="post"
91                      style="display: inline;"
92                      tal:condition="not:isPublished"
93                      tal:attributes="action string:${reply/absolute_url}/discussion_publish_comment">
94
95                    <input class="standalone"
96                           type="submit"
97                           value="Publish"
98                           i18n:attributes="value"
99                           />
100                </form>
101                <br/>
102                <div class="documentByLine"
103                     i18n:translate="text_no_add_reply"
104                     i18n:domain="plonecomments"
105                     tal:condition="not:isPublished">Comment must be approved before replies to comment accepted.</div>
106
107            </div>
108        </tal:getreplies>
109    </div>
110</tal:block>
Note: See TracBrowser for help on using the repository browser.