source: products/qPloneComments/trunk/browser/comments.pt @ 1187

Last change on this file since 1187 was 1187, checked in by liebster, 15 years ago

Merged revisions 1946-1951,1957-1962,1964-1965,1967-1970,1972-1986,1990-1993,2199-2200 via svnmerge from
http://svn.quintagroup.com/products/qPloneComments/branches/jcbrand-abuseFeature

........

r1946 | jcbrand | 2009-04-01 16:52:52 +0300 (Срд, 01 Апр 2009) | 3 lines


Add enable_report_abuse property to propertiestool.xml
Add checkbox for this property on the prefs_comments_setup_form.cpt

........

r1947 | jcbrand | 2009-04-01 17:29:20 +0300 (Срд, 01 Апр 2009) | 2 lines


Add report_abuse.pt containing the report_abuse form.

........

r1948 | jcbrand | 2009-04-01 17:30:35 +0300 (Срд, 01 Апр 2009) | 2 lines


Add utility method necesary for the report abuse form.

........

r1949 | jcbrand | 2009-04-01 17:31:05 +0300 (Срд, 01 Апр 2009) | 2 lines


Add the report abuse button and form (hidden).

........

r1950 | jcbrand | 2009-04-01 17:43:31 +0300 (Срд, 01 Апр 2009) | 1 line


Add qcomments.kss and register

........

r1951 | jcbrand | 2009-04-01 17:43:54 +0300 (Срд, 01 Апр 2009) | 1 line


Add qcomments.js and register

........

r1957 | jcbrand | 2009-04-02 12:52:54 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add new mail action for the enable_report_abuse state.

........

r1958 | jcbrand | 2009-04-02 12:54:05 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add a form and new hidden input containing 'comment_id'

........

r1959 | jcbrand | 2009-04-02 12:59:12 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add CommentsKSS kss class and submit_abuse_report method.

........

r1960 | jcbrand | 2009-04-02 13:00:14 +0300 (Чтв, 02 Апр 2009) | 2 lines


Bugfix, preventDefault for all the forms.

........

r1961 | jcbrand | 2009-04-02 13:00:30 +0300 (Чтв, 02 Апр 2009) | 2 lines


remove comment_id passing.

........

r1962 | jcbrand | 2009-04-02 13:00:53 +0300 (Чтв, 02 Апр 2009) | 2 lines


get values from request if able.

........

r1964 | jcbrand | 2009-04-02 13:01:18 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add comments.CommentsKSS

........

r1965 | jcbrand | 2009-04-02 13:01:39 +0300 (Чтв, 02 Апр 2009) | 2 lines


Include browser.

........

r1967 | jcbrand | 2009-04-02 14:26:07 +0300 (Чтв, 02 Апр 2009) | 1 line


Add email template for the report_abuse function

........

r1968 | jcbrand | 2009-04-02 14:26:41 +0300 (Чтв, 02 Апр 2009) | 2 lines


Use the new email template.

........

r1969 | jcbrand | 2009-04-02 14:29:41 +0300 (Чтв, 02 Апр 2009) | 3 lines


Register remove_abuse_report_form as a kss command.
Add new code to it that adds an optional html. (Used for status message)

........

r1970 | jcbrand | 2009-04-02 15:18:24 +0300 (Чтв, 02 Апр 2009) | 3 lines


Add form action.
Add place holder for abuse count info.

........

r1972 | jcbrand | 2009-04-02 16:08:42 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add new portal_properties settings.

........

r1973 | jcbrand | 2009-04-02 19:39:27 +0300 (Чтв, 02 Апр 2009) | 1 line


Add controller python script for abuse reports

........

r1974 | jcbrand | 2009-04-02 19:39:55 +0300 (Чтв, 02 Апр 2009) | 1 line


Add validation script for abuse reporting

........

r1975 | jcbrand | 2009-04-02 19:40:43 +0300 (Чтв, 02 Апр 2009) | 1 line


Add template and metadata for rendering the report abuse form. Moved the macro form report_abuse.pt to this template

........

r1976 | jcbrand | 2009-04-02 19:41:22 +0300 (Чтв, 02 Апр 2009) | 1 line


remove old template

........

r1977 | jcbrand | 2009-04-02 19:41:52 +0300 (Чтв, 02 Апр 2009) | 3 lines


Fix form action.
Fix bug with form nesting.

........

r1978 | jcbrand | 2009-04-02 19:42:46 +0300 (Чтв, 02 Апр 2009) | 1 line


Add new utility methods. Use newly registered kss command

........

r1979 | jcbrand | 2009-04-02 19:43:20 +0300 (Чтв, 02 Апр 2009) | 2 lines


Bugfixes after the introduction of new portal_properties props.

........

r1980 | jcbrand | 2009-04-02 19:44:14 +0300 (Чтв, 02 Апр 2009) | 2 lines


Bugfixes

........

r1981 | jcbrand | 2009-04-02 19:44:31 +0300 (Чтв, 02 Апр 2009) | 2 lines


Register the remove_abuse_report_form kss action.

........

r1982 | jcbrand | 2009-04-03 11:41:32 +0300 (Птн, 03 Апр 2009) | 2 lines


Fix bug whereby emails were sent twice

........

r1983 | jcbrand | 2009-04-03 11:42:08 +0300 (Птн, 03 Апр 2009) | 1 line


Bugfixes related to anonymous comment adding

........

r1984 | jcbrand | 2009-04-03 11:59:44 +0300 (Птн, 03 Апр 2009) | 2 lines


Add macro for the captcha widget.

........

r1985 | jcbrand | 2009-04-03 12:00:22 +0300 (Птн, 03 Апр 2009) | 2 lines


Render a new captcha after hiding form.

........

r1986 | jcbrand | 2009-04-03 12:00:32 +0300 (Птн, 03 Апр 2009) | 2 lines


Change fade out time.

........

r1990 | jcbrand | 2009-04-03 13:37:13 +0300 (Птн, 03 Апр 2009) | 1 line


Add test suite

........

r1991 | jcbrand | 2009-04-03 13:37:38 +0300 (Птн, 03 Апр 2009) | 1 line


remove redundant line

........

r1992 | jcbrand | 2009-04-03 13:48:21 +0300 (Птн, 03 Апр 2009) | 1 line


bugfix

........

r1993 | jcbrand | 2009-04-03 13:56:51 +0300 (Птн, 03 Апр 2009) | 1 line


remove explicit microseconds

........

r2199 | jcbrand | 2009-07-25 02:07:58 +0300 (Сбт, 25 Июл 2009) | 1 line


Fixed a bug with syntax recognition of an older version of jquery

........

r2200 | jcbrand | 2009-07-25 02:08:58 +0300 (Сбт, 25 Июл 2009) | 1 line


Log email errors, so that the report abuse form still closes

........

  • Property svn:eol-style set to native
File size: 7.5 KB
RevLine 
[1]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;
[1187]6                   isModerationAllowed view/can_moderate;
7                   isAuthenticatedReportAbuseEnabled view/authenticated_report_abuse_enabled;
8                   isAjaxReportAbuseEnabled view/ajax_report_abuse_enabled;
9                   isAnonymousReportAbuseEnabled view/anonymous_report_abuse_enabled;
10                   isReportAbuseEnabled python:isAnonymousReportAbuseEnabled or not isAnon and isAuthenticatedReportAbuseEnabled"
[326]11                   i18n:domain="plone">
[1]12    <div class="discussion"
13         tal:condition="python:replies or (userHasReplyPermission and isDiscussionAllowed) or (isAnon and not userHasReplyPermission and isDiscussionAllowed)">
14        <form name="reply"
15              action=""
16              method="post"
17              tal:condition="python:userHasReplyPermission and isDiscussionAllowed"
18              tal:attributes="action string:${context/absolute_url}/discussion_reply_form#discussion">
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:attributes="action view/login_action">
29            <input class="standalone"
30                   style="margin-bottom: 1.25em;"
31                   type="submit"
32                   value="Log in to add comments"
33                   i18n:attributes="value label_login_to_add_comments;"
34                   />
35        </form>
36
37        <tal:getreplies repeat="reply_dict replies">
38            <div class="comment" style=""
39                tal:condition="python:isModerationAllowed or isPublished"
40                tal:define="indent python:reply_dict['depth']*2;
41                            reply python:reply_dict['object'];
[1187]42                            comment_id python:reply_dict['object'].id;
[1]43                            isPublished python:reply.review_state=='published';"
44                tal:attributes="style string:margin-left:${indent}em;">
[89]45
[1]46                <h3>
47                    <a name="comments" tal:attributes="name reply/id">
48                    <span tal:replace="reply/pretty_title_or_id">Comment title</span>
49                    </a>
50                </h3>
51                <div class="documentByLine"
52                     tal:define="creator reply/Creator;
53                                 anonymous_creator python:creator=='Anonymous User';
54                                 mi python:not anonymous_creator and view.member_info(creator);
[552]55                                 fullname python: mi and mi['fullname'] or creator;
[553]56                                 gavatar_src python:view.getGravatar(reply)" >
[552]57                    <img alt="Avatar" class="avatar" height="40" width="40"
58                         src="http://default.gavatar.gif"
59                         tal:attributes="src gavatar_src">
[1]60                    <span i18n:translate="label_comment_by">Posted by</span>
61                    <span tal:content="fullname"
62                          tal:condition="not:anonymous_creator">Poster Name</span>
63                    <span i18n:translate="label_anonymous_user"
64                          tal:condition="anonymous_creator">Anonymous User</span>
[89]65                    <span i18n:translate="label_commented_at">at</span>
[1]66                    <span tal:replace="python:view.format_time(reply.ModificationDate())">8/23/2001 12:40:44 PM</span>
67                    <span tal:condition="python:ifModerate and not isPublished">[pending]</span>
68                </div>
69                <div class="commentBody"
70                     tal:content="structure reply/CookedBody">
71                     This is the body text of the comment.
72                </div>
73                <form name="reply"
74                      action="discussion_reply_form"
75                      method="post"
76                      style="display: inline;"
77                      tal:attributes="action string:${reply/absolute_url}/discussion_reply_form"
78                      tal:condition="python:userHasReplyPermission and isPublished">
79                    <input class="standalone"
80                           type="submit"
81                           value="Reply"
82                           i18n:attributes="value label_reply;"
83                           />
84                </form>
85                <form name="delete"
86                      action=""
87                      method="post"
88                      style="display: inline;"
89                      tal:condition="isModerationAllowed"
90                      tal:attributes="action string:${reply/absolute_url}/deleteDiscussion">
91                    <input class="destructive"
92                           type="submit"
93                           value="Remove"
94                           i18n:attributes="value label_remove;"
95                           />
96                </form>
[1187]97                <tal:if tal:condition="python:isReportAbuseEnabled and isPublished">
98                    <form class="report_abuse"
99                          name="report_abuse"
100                          method="post"
101                          style="display: inline;"
102                          tal:attributes="action string:${reply/absolute_url}/report_abuse_form#discussion">
103                        <input type="hidden" name="comment_id" tal:attributes="value comment_id" />
104                        <input class="standalone"
105                            type="submit"
106                            value="Report Abuse"
107                            tal:define="onclick string:javascript:render_abuse_report_form(${comment_id})"
108                            tal:attributes="onclick python:isAjaxReportAbuseEnabled and onclick or '';
109                                            id string:input-render-abuse-cancel-${comment_id}"
110                            i18n:attributes="value label_report_abuse;"
111                            />
112                    </form>
113                    <span tal:attributes="id string:span-reply-form-holder-${comment_id}"
114                            tal:condition="isReportAbuseEnabled">
115                        <metal:macro use-macro="here/report_abuse_form/macros/form"/>
116                    </span>
117                    <span tal:attributes="id string:span-abuse-count-holder-${comment_id}"></span>
118                </tal:if>
[1]119                <form name="publish_discussion"
120                      action=""
121                      method="post"
122                      style="display: inline;"
123                      tal:condition="not:isPublished"
124                      tal:attributes="action string:${reply/absolute_url}/discussion_publish_comment">
125
126                    <input class="standalone"
127                           type="submit"
128                           value="Publish"
129                           i18n:attributes="value"
130                           />
131                </form>
132                <br/>
133                <div class="documentByLine"
134                     i18n:translate="text_no_add_reply"
135                     i18n:domain="plonecomments"
136                     tal:condition="not:isPublished">Comment must be approved before replies to comment accepted.</div>
137            </div>
138        </tal:getreplies>
139    </div>
[89]140</tal:block>
Note: See TracBrowser for help on using the repository browser.