[1201] | 1 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" |
---|
| 2 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
| 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
| 4 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
---|
| 5 | metal:use-macro="here/main_template/macros/master" |
---|
| 6 | i18n:domain="plone"> |
---|
| 7 | <body> |
---|
| 8 | |
---|
| 9 | <metal:block fill-slot="top_slot" |
---|
| 10 | tal:define="dummy python:request.set('disable_border',1)" /> |
---|
| 11 | |
---|
| 12 | <metal:block fill-slot="sub" /> |
---|
| 13 | |
---|
| 14 | <div metal:fill-slot="main" |
---|
| 15 | tal:define="errors options/state/getErrors; |
---|
[1631] | 16 | putils context/plone_utils; |
---|
| 17 | portal context/@@plone_portal_state/portal; |
---|
| 18 | toLocalizedTime nocall:context/@@plone/toLocalizedTime; |
---|
| 19 | here_url context/@@plone_context_state/object_url; |
---|
| 20 | template_id template/getId; |
---|
| 21 | isAnon context/@@plone_portal_state/anonymous; |
---|
| 22 | member context/@@plone_portal_state/member; |
---|
[1201] | 23 | thread python:putils.getDiscussionThread(here); |
---|
| 24 | discussable python:thread[0]; |
---|
| 25 | replies python:thread[1:]; |
---|
| 26 | props_sheet here/portal_properties/qPloneComments; |
---|
| 27 | require_email python:props_sheet.getProperty('require_email')"> |
---|
| 28 | |
---|
| 29 | <tal:discussable define="template python:getattr(here, discussable.getLayout(), None); |
---|
| 30 | macros template/macros | nothing; |
---|
| 31 | main_macro macros/main | nothing; |
---|
| 32 | showDiscussable python:main_macro;"> |
---|
| 33 | |
---|
| 34 | <div class="comment" |
---|
| 35 | tal:condition="showDiscussable" |
---|
| 36 | tal:define="here python:discussable"> |
---|
| 37 | <div metal:use-macro="main_macro"/> |
---|
| 38 | </div> |
---|
| 39 | </tal:discussable> |
---|
| 40 | |
---|
| 41 | <tal:thread tal:repeat="reply replies"> |
---|
| 42 | <tal:block tal:define="level repeat/reply/index"> |
---|
| 43 | <div class="comment" |
---|
| 44 | tal:attributes="style python:'margin-left:'+str((int(level)+1)*2)+'em'"> |
---|
| 45 | <h3> |
---|
| 46 | <tal:block replace="structure portal/discussionitem_icon.gif"/> |
---|
| 47 | <span tal:replace="reply/pretty_title_or_id">Comment title</span> |
---|
| 48 | </h3> |
---|
| 49 | <div class="documentByLine" |
---|
| 50 | tal:define="anonymous_creator python:reply.Creator()=='Anonymous User'"> |
---|
| 51 | <span i18n:translate="label_comment_by">Posted by</span> |
---|
| 52 | <span tal:content="reply/Creator" |
---|
| 53 | tal:condition="not:anonymous_creator">Poster Name</span> |
---|
| 54 | <span i18n:translate="label_anonymous_user" |
---|
| 55 | tal:condition="anonymous_creator">Anonymous User</span> |
---|
| 56 | <span i18n:translate="label_commented_at">at</span> |
---|
| 57 | <span tal:replace="python:toLocalizedTime(reply.ModificationDate(), |
---|
| 58 | long_format=1)">8/23/2001 12:40:44 PM</span> |
---|
| 59 | </div> |
---|
| 60 | <div class="commentBody" |
---|
| 61 | tal:content="structure reply/CookedBody"> |
---|
| 62 | This is the body text of the comment. |
---|
| 63 | </div> |
---|
| 64 | </div> |
---|
| 65 | |
---|
| 66 | </tal:block> |
---|
| 67 | </tal:thread> |
---|
| 68 | |
---|
| 69 | <a name="discussion"></a> |
---|
| 70 | <form name="edit_form" |
---|
| 71 | class="enableAutoFocus" |
---|
| 72 | method="post" |
---|
| 73 | action="talkback" |
---|
| 74 | tal:attributes="action string:$here_url/$template_id" |
---|
| 75 | tal:define="isForAnonymous python:here.portal_properties.qPloneComments.getProperty('enable_anonymous_commenting', 0)"> |
---|
| 76 | |
---|
| 77 | <tal:set define="show_form python:True; |
---|
| 78 | comment_id context/id"> |
---|
| 79 | <metal:macro define-macro="form" |
---|
| 80 | tal:define="isAjaxReportAbuseEnabled view/ajax_report_abuse_enabled|python:portal.portal_properties.qPloneComments.enable_ajax_report_abuse; |
---|
| 81 | visible show_form|request/show_form|nothing; |
---|
| 82 | portal_url portal_url|view/portal_url; |
---|
| 83 | member member|request/member|view/member;"> |
---|
| 84 | |
---|
| 85 | <span tal:define="email_from_address portal/email_from_address|view/email_from_address; |
---|
| 86 | comment_id comment_id|request/comment_id" |
---|
| 87 | tal:attributes="style python:not visible and 'display: none' or ''; |
---|
| 88 | id string:span-reply-form-${comment_id}"> |
---|
| 89 | |
---|
| 90 | <tal:if_not condition="not:email_from_address"> |
---|
| 91 | <p class="documentDescription" |
---|
[1204] | 92 | i18n:domain="quintagroup.plonecomments" |
---|
[1201] | 93 | i18n:translate="text_no_email_setup"> |
---|
| 94 | This site doesn't have a valid email setup, so you cannot use |
---|
| 95 | the report abuse form. |
---|
| 96 | </p> |
---|
| 97 | </tal:if_not> |
---|
| 98 | <tal:if condition="email_from_address"> |
---|
| 99 | <form name="feedback_form" |
---|
| 100 | method="post" |
---|
| 101 | class="enableAutoFocus" |
---|
| 102 | tal:attributes="action string:${here/absolute_url}/${template/id}" |
---|
| 103 | tal:define="errors errors|request/errors|python:{}" > |
---|
| 104 | |
---|
| 105 | <input type="hidden" name="comment_id" tal:attributes="value comment_id" /> |
---|
| 106 | |
---|
| 107 | <fieldset> |
---|
[1204] | 108 | <h1 i18n:domain="quintagroup.plonecomments" i18n:translate="heading_report_abuse_form">Report Abuse</h1> |
---|
[1201] | 109 | |
---|
| 110 | <tal:feedbackForm condition="isAnon"> |
---|
| 111 | <input type="hidden" name="Creator" tal:condition="not:isAnon" tal:attributes="value member/getUserName" /> |
---|
| 112 | |
---|
| 113 | <div class="field" |
---|
| 114 | tal:define="error errors/creator|nothing" |
---|
| 115 | tal:attributes="class python:error and 'field error' or 'field'"> |
---|
[1631] | 116 | <label for="creator" i18n:translate="label_name"> |
---|
[1201] | 117 | Name |
---|
| 118 | </label> |
---|
| 119 | <span class="fieldRequired" title="Required" |
---|
| 120 | i18n:attributes="title title_required;" |
---|
| 121 | i18n:translate="label_required">(Required)</span> |
---|
[1631] | 122 | <div class="formHelp" i18n:translate="help_name" i18n:domain="quintagroup.plonecomments"> |
---|
| 123 | Please enter your name. |
---|
[1201] | 124 | </div> |
---|
| 125 | <div tal:content="error">Validation error output</div> |
---|
| 126 | <input type="text" |
---|
| 127 | id="creator" |
---|
| 128 | name="creator" |
---|
| 129 | size="40" |
---|
| 130 | value="" |
---|
| 131 | tal:attributes="value request/creator|nothing" |
---|
| 132 | /> |
---|
| 133 | </div> |
---|
| 134 | <div class="field" |
---|
| 135 | tal:define="error errors/email|nothing" |
---|
| 136 | tal:attributes="class python:error and 'field error' or 'field'"> |
---|
| 137 | <label for="email" i18n:translate="label_email"> |
---|
| 138 | E-Mail |
---|
| 139 | </label> |
---|
| 140 | <span class="fieldRequired" title="Required" |
---|
| 141 | i18n:attributes="title title_required;" |
---|
| 142 | i18n:translate="label_required">(Required)</span> |
---|
[1631] | 143 | <div class="formHelp" i18n:translate="help_email" |
---|
| 144 | i18n:domain="quintagroup.plonecomments"> |
---|
| 145 | Please enter your e-mail address. |
---|
[1201] | 146 | </div> |
---|
| 147 | <div tal:content="error">Validation error output</div> |
---|
| 148 | <input type="text" |
---|
| 149 | id="email" |
---|
| 150 | name="email" |
---|
| 151 | size="40" |
---|
| 152 | value="" |
---|
| 153 | tal:attributes="value request/email|nothing" |
---|
| 154 | /> |
---|
| 155 | </div> |
---|
| 156 | </tal:feedbackForm> |
---|
| 157 | <tal:feedbackForm condition="not:isAnon" |
---|
| 158 | define="fullname python:request.get('fullname', member.getProperty('fullname', '')); |
---|
| 159 | email python:request.get('email', member.getProperty('email',''));"> |
---|
| 160 | <input type="hidden" name="sender_fullname" value="fullname" tal:attributes="value fullname" /> |
---|
| 161 | <input type="hidden" name="email" value="email" tal:attributes="value email" /> |
---|
| 162 | </tal:feedbackForm> |
---|
| 163 | <div class="field" |
---|
| 164 | tal:define="error errors/message|nothing" |
---|
| 165 | tal:attributes="class python:error and 'field error' or 'field'"> |
---|
| 166 | <label for="message" i18n:translate="label_message"> |
---|
| 167 | Description |
---|
| 168 | </label> |
---|
| 169 | <span class="fieldRequired" title="Required" |
---|
| 170 | i18n:attributes="title title_required;" |
---|
| 171 | i18n:translate="label_required">(Required)</span> |
---|
| 172 | |
---|
[1204] | 173 | <div class="formHelp" i18n:domain="quintagroup.plonecomments" i18n:translate="help_message"> |
---|
[1201] | 174 | Please state your reasons why you would like to report this comment as abusive. |
---|
| 175 | Our administrator will be notified with your message. |
---|
| 176 | </div> |
---|
| 177 | <div tal:content="error">Validation error output</div> |
---|
| 178 | <textarea name="message" id="message" rows="5" cols="25" tal:content="request/message|nothing"> </textarea> |
---|
| 179 | </div> |
---|
| 180 | <metal:macro define-macro="captcha"> |
---|
| 181 | <div tal:define="comment_id comment_id|request/comment_id" |
---|
| 182 | tal:attributes="id string:div-captcha-${comment_id}" |
---|
| 183 | tal:condition="nocall:here/captcha_widget|nothing"> |
---|
| 184 | <div metal:use-macro="here/captcha_widget/macros/captcha" /> |
---|
| 185 | </div> |
---|
| 186 | </metal:macro> |
---|
| 187 | |
---|
| 188 | <div class="formControls"> |
---|
| 189 | <input type="hidden" name="form.submitted" value="1" /> |
---|
| 190 | |
---|
| 191 | <input type="hidden" name="require_email:boolean" value="" |
---|
| 192 | tal:attributes="value python:isAnon" /> |
---|
| 193 | |
---|
| 194 | <input |
---|
| 195 | value="Send" |
---|
| 196 | type="submit" |
---|
| 197 | tal:attributes="comment_id comment_id; |
---|
| 198 | class python:isAjaxReportAbuseEnabled and 'context input-report-abuse-send' or 'context'" |
---|
| 199 | i18n:attributes="value label_send;" |
---|
| 200 | /> |
---|
| 201 | |
---|
| 202 | <input |
---|
| 203 | id="input-report-abuse-cancel" |
---|
| 204 | class="destructive" |
---|
| 205 | value="Cancel" |
---|
| 206 | type="button" |
---|
| 207 | tal:condition="isAjaxReportAbuseEnabled" |
---|
| 208 | tal:attributes="onclick string:javascript:remove_abuse_report_form(${comment_id})" |
---|
| 209 | i18n:attributes="value label_cancel;" |
---|
| 210 | /> |
---|
| 211 | </div> |
---|
| 212 | </fieldset> |
---|
| 213 | </form> |
---|
| 214 | </tal:if> |
---|
| 215 | </span> |
---|
| 216 | </metal:macro> |
---|
| 217 | </tal:set> |
---|
| 218 | |
---|
| 219 | </form> |
---|
| 220 | </div> |
---|
| 221 | </body> |
---|
| 222 | </html> |
---|