[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; |
---|
[2087] | 21 | isAnon context/@@plone_portal_state/anonymous|string:False; |
---|
[1631] | 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" |
---|
[2087] | 80 | tal:define="isAjaxReportAbuseEnabled view/ajax_report_abuse_enabled|python:here.portal_properties.qPloneComments.enable_ajax_report_abuse; |
---|
[1201] | 81 | visible show_form|request/show_form|nothing; |
---|
| 82 | portal_url portal_url|view/portal_url; |
---|
[2087] | 83 | isAnon isAnon|context/@@plone_portal_state/anonymous; |
---|
| 84 | member member|context/@@plone_portal_state/member;"> |
---|
[1201] | 85 | |
---|
| 86 | <span tal:define="email_from_address portal/email_from_address|view/email_from_address; |
---|
| 87 | comment_id comment_id|request/comment_id" |
---|
| 88 | tal:attributes="style python:not visible and 'display: none' or ''; |
---|
| 89 | id string:span-reply-form-${comment_id}"> |
---|
| 90 | |
---|
| 91 | <tal:if_not condition="not:email_from_address"> |
---|
| 92 | <p class="documentDescription" |
---|
[1204] | 93 | i18n:domain="quintagroup.plonecomments" |
---|
[1201] | 94 | i18n:translate="text_no_email_setup"> |
---|
| 95 | This site doesn't have a valid email setup, so you cannot use |
---|
| 96 | the report abuse form. |
---|
| 97 | </p> |
---|
| 98 | </tal:if_not> |
---|
| 99 | <tal:if condition="email_from_address"> |
---|
| 100 | <form name="feedback_form" |
---|
| 101 | method="post" |
---|
| 102 | class="enableAutoFocus" |
---|
| 103 | tal:attributes="action string:${here/absolute_url}/${template/id}" |
---|
| 104 | tal:define="errors errors|request/errors|python:{}" > |
---|
| 105 | |
---|
| 106 | <input type="hidden" name="comment_id" tal:attributes="value comment_id" /> |
---|
| 107 | |
---|
| 108 | <fieldset> |
---|
[1204] | 109 | <h1 i18n:domain="quintagroup.plonecomments" i18n:translate="heading_report_abuse_form">Report Abuse</h1> |
---|
[1201] | 110 | |
---|
| 111 | <tal:feedbackForm condition="isAnon"> |
---|
| 112 | <input type="hidden" name="Creator" tal:condition="not:isAnon" tal:attributes="value member/getUserName" /> |
---|
| 113 | |
---|
| 114 | <div class="field" |
---|
| 115 | tal:define="error errors/creator|nothing" |
---|
| 116 | tal:attributes="class python:error and 'field error' or 'field'"> |
---|
[1631] | 117 | <label for="creator" i18n:translate="label_name"> |
---|
[1201] | 118 | Name |
---|
| 119 | </label> |
---|
| 120 | <span class="fieldRequired" title="Required" |
---|
| 121 | i18n:attributes="title title_required;" |
---|
| 122 | i18n:translate="label_required">(Required)</span> |
---|
[1631] | 123 | <div class="formHelp" i18n:translate="help_name" i18n:domain="quintagroup.plonecomments"> |
---|
| 124 | Please enter your name. |
---|
[1201] | 125 | </div> |
---|
| 126 | <div tal:content="error">Validation error output</div> |
---|
| 127 | <input type="text" |
---|
| 128 | id="creator" |
---|
| 129 | name="creator" |
---|
| 130 | size="40" |
---|
| 131 | value="" |
---|
| 132 | tal:attributes="value request/creator|nothing" |
---|
| 133 | /> |
---|
| 134 | </div> |
---|
| 135 | <div class="field" |
---|
| 136 | tal:define="error errors/email|nothing" |
---|
| 137 | tal:attributes="class python:error and 'field error' or 'field'"> |
---|
| 138 | <label for="email" i18n:translate="label_email"> |
---|
| 139 | E-Mail |
---|
| 140 | </label> |
---|
| 141 | <span class="fieldRequired" title="Required" |
---|
| 142 | i18n:attributes="title title_required;" |
---|
| 143 | i18n:translate="label_required">(Required)</span> |
---|
[1631] | 144 | <div class="formHelp" i18n:translate="help_email" |
---|
| 145 | i18n:domain="quintagroup.plonecomments"> |
---|
| 146 | Please enter your e-mail address. |
---|
[1201] | 147 | </div> |
---|
| 148 | <div tal:content="error">Validation error output</div> |
---|
| 149 | <input type="text" |
---|
| 150 | id="email" |
---|
| 151 | name="email" |
---|
| 152 | size="40" |
---|
| 153 | value="" |
---|
| 154 | tal:attributes="value request/email|nothing" |
---|
| 155 | /> |
---|
| 156 | </div> |
---|
| 157 | </tal:feedbackForm> |
---|
| 158 | <tal:feedbackForm condition="not:isAnon" |
---|
| 159 | define="fullname python:request.get('fullname', member.getProperty('fullname', '')); |
---|
| 160 | email python:request.get('email', member.getProperty('email',''));"> |
---|
| 161 | <input type="hidden" name="sender_fullname" value="fullname" tal:attributes="value fullname" /> |
---|
| 162 | <input type="hidden" name="email" value="email" tal:attributes="value email" /> |
---|
| 163 | </tal:feedbackForm> |
---|
| 164 | <div class="field" |
---|
| 165 | tal:define="error errors/message|nothing" |
---|
| 166 | tal:attributes="class python:error and 'field error' or 'field'"> |
---|
| 167 | <label for="message" i18n:translate="label_message"> |
---|
| 168 | Description |
---|
| 169 | </label> |
---|
| 170 | <span class="fieldRequired" title="Required" |
---|
| 171 | i18n:attributes="title title_required;" |
---|
| 172 | i18n:translate="label_required">(Required)</span> |
---|
| 173 | |
---|
[1204] | 174 | <div class="formHelp" i18n:domain="quintagroup.plonecomments" i18n:translate="help_message"> |
---|
[1201] | 175 | Please state your reasons why you would like to report this comment as abusive. |
---|
| 176 | Our administrator will be notified with your message. |
---|
| 177 | </div> |
---|
| 178 | <div tal:content="error">Validation error output</div> |
---|
| 179 | <textarea name="message" id="message" rows="5" cols="25" tal:content="request/message|nothing"> </textarea> |
---|
| 180 | </div> |
---|
| 181 | <metal:macro define-macro="captcha"> |
---|
| 182 | <div tal:define="comment_id comment_id|request/comment_id" |
---|
| 183 | tal:attributes="id string:div-captcha-${comment_id}" |
---|
| 184 | tal:condition="nocall:here/captcha_widget|nothing"> |
---|
| 185 | <div metal:use-macro="here/captcha_widget/macros/captcha" /> |
---|
| 186 | </div> |
---|
| 187 | </metal:macro> |
---|
| 188 | |
---|
| 189 | <div class="formControls"> |
---|
| 190 | <input type="hidden" name="form.submitted" value="1" /> |
---|
| 191 | |
---|
| 192 | <input type="hidden" name="require_email:boolean" value="" |
---|
| 193 | tal:attributes="value python:isAnon" /> |
---|
| 194 | |
---|
| 195 | <input |
---|
| 196 | value="Send" |
---|
| 197 | type="submit" |
---|
[2087] | 198 | class="context" |
---|
| 199 | name="form.button.Send" |
---|
| 200 | tal:attributes="comment_id comment_id" |
---|
[1201] | 201 | i18n:attributes="value label_send;" |
---|
| 202 | /> |
---|
| 203 | |
---|
| 204 | <input |
---|
| 205 | id="input-report-abuse-cancel" |
---|
| 206 | class="destructive" |
---|
| 207 | value="Cancel" |
---|
[2087] | 208 | type="submit" |
---|
| 209 | name="form.button.Cancel" |
---|
[1201] | 210 | i18n:attributes="value label_cancel;" |
---|
| 211 | /> |
---|
| 212 | </div> |
---|
| 213 | </fieldset> |
---|
| 214 | </form> |
---|
| 215 | </tal:if> |
---|
| 216 | </span> |
---|
| 217 | </metal:macro> |
---|
| 218 | </tal:set> |
---|
| 219 | |
---|
| 220 | </form> |
---|
| 221 | </div> |
---|
| 222 | </body> |
---|
| 223 | </html> |
---|