[797] | 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" |
---|
[1691] | 15 | tal:define="template_id template/getId; |
---|
| 16 | errors options/state/getErrors; |
---|
| 17 | putils context/plone_utils; |
---|
[797] | 18 | thread python:putils.getDiscussionThread(here); |
---|
| 19 | discussable python:thread[0]; |
---|
[1691] | 20 | here_url context/@@plone_context_state/object_url; |
---|
| 21 | member context/@@plone_portal_state/member; |
---|
| 22 | isAnon context/@@plone_portal_state/anonymous; |
---|
| 23 | toLocalizedTime nocall:context/@@plone/toLocalizedTime; |
---|
[797] | 24 | replies python:thread[1:]"> |
---|
| 25 | |
---|
| 26 | <tal:discussable define="template python:getattr(here, discussable.getLayout(), None); |
---|
| 27 | macros template/macros | nothing; |
---|
| 28 | main_macro macros/main | nothing; |
---|
| 29 | showDiscussable python:main_macro;"> |
---|
| 30 | |
---|
| 31 | <div class="comment" |
---|
| 32 | tal:condition="showDiscussable" |
---|
[817] | 33 | tal:define="here python:discussable; |
---|
| 34 | context python:discussable"> |
---|
[797] | 35 | <div metal:use-macro="main_macro"/> |
---|
| 36 | </div> |
---|
| 37 | </tal:discussable> |
---|
| 38 | |
---|
| 39 | <tal:thread tal:repeat="reply replies"> |
---|
| 40 | <tal:block tal:define="level repeat/reply/index"> |
---|
| 41 | <div class="comment" |
---|
| 42 | tal:attributes="style python:'margin-left:'+str((int(level)+1)*2)+'em'"> |
---|
| 43 | <h3> |
---|
| 44 | <tal:block replace="structure portal/discussionitem_icon.gif"/> |
---|
| 45 | <span tal:replace="reply/pretty_title_or_id">Comment title</span> |
---|
| 46 | </h3> |
---|
| 47 | <div class="documentByLine" |
---|
| 48 | tal:define="anonymous_creator python:reply.Creator()=='Anonymous User'"> |
---|
| 49 | <span i18n:translate="label_comment_by">Posted by</span> |
---|
| 50 | <span tal:content="reply/Creator" |
---|
| 51 | tal:condition="not:anonymous_creator">Poster Name</span> |
---|
| 52 | <span i18n:translate="label_anonymous_user" |
---|
| 53 | tal:condition="anonymous_creator">Anonymous User</span> |
---|
| 54 | <span i18n:translate="label_commented_at">at</span> |
---|
| 55 | <span tal:replace="python:toLocalizedTime(reply.ModificationDate(), |
---|
| 56 | long_format=1)">8/23/2001 12:40:44 PM</span> |
---|
| 57 | </div> |
---|
| 58 | <div class="commentBody" |
---|
| 59 | tal:content="structure reply/CookedBody"> |
---|
| 60 | This is the body text of the comment. |
---|
| 61 | </div> |
---|
| 62 | </div> |
---|
| 63 | |
---|
| 64 | </tal:block> |
---|
| 65 | </tal:thread> |
---|
| 66 | |
---|
| 67 | <form name="edit_form" |
---|
| 68 | class="enableAutoFocus" |
---|
| 69 | method="post" |
---|
| 70 | action="talkback" |
---|
| 71 | tal:attributes="action string:$here_url/$template_id"> |
---|
| 72 | |
---|
| 73 | <fieldset> |
---|
| 74 | |
---|
| 75 | <legend i18n:translate="legend_add_comment">Add comment</legend> |
---|
| 76 | <p i18n:translate="description_add_comment"> |
---|
| 77 | You can add a comment by filling out the form below. Plain text |
---|
| 78 | formatting. |
---|
| 79 | </p> |
---|
| 80 | |
---|
| 81 | <input type="hidden" name="Creator" value="" |
---|
| 82 | tal:attributes="value member/getUserName" /> |
---|
| 83 | |
---|
| 84 | <div tal:condition="isAnon"> |
---|
| 85 | <dl class="portalMessage warning"> |
---|
| 86 | <dt i18n:translate=""> |
---|
| 87 | Info |
---|
| 88 | </dt> |
---|
| 89 | <dd i18n:translate="legend_note_reply_anonymous"> |
---|
| 90 | You are not logged in. You may optionally enter your |
---|
| 91 | username and password below. If you don't enter anything, |
---|
| 92 | this comment will be posted as 'Anonymous User'. |
---|
| 93 | </dd> |
---|
| 94 | </dl> |
---|
| 95 | |
---|
| 96 | <div class="field"> |
---|
| 97 | |
---|
| 98 | <label for="username" i18n:translate="label_name">Name</label> |
---|
| 99 | |
---|
| 100 | <input name="username" |
---|
| 101 | id="username" |
---|
| 102 | value="" alt="Username" title="Name" |
---|
| 103 | size="40" |
---|
| 104 | i18n:attributes="title label_name; alt label_username;" /> |
---|
| 105 | |
---|
| 106 | </div> |
---|
| 107 | |
---|
| 108 | <div class="field"> |
---|
| 109 | |
---|
| 110 | <label for="password" i18n:translate="label_password">Password</label> |
---|
| 111 | |
---|
| 112 | <input type="password" |
---|
| 113 | id="password" |
---|
| 114 | name="password" |
---|
| 115 | value="" alt="Password" title="Password" |
---|
| 116 | size="40" |
---|
| 117 | i18n:attributes="title label_password; alt label_password;" /> |
---|
| 118 | |
---|
| 119 | </div> |
---|
| 120 | |
---|
| 121 | </div> |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | <div class="field" |
---|
| 125 | tal:define="error errors/subject|nothing;" |
---|
| 126 | tal:attributes="class python:test(error, 'field error', 'field')"> |
---|
| 127 | |
---|
| 128 | <label for="subject" i18n:translate="label_subject">Subject</label> |
---|
| 129 | |
---|
| 130 | <span class="fieldRequired" title="Required" |
---|
| 131 | i18n:attributes="title title_required;" |
---|
| 132 | i18n:translate="label_required">(Required)</span> |
---|
| 133 | |
---|
| 134 | <div tal:content="error">Validation error output</div> |
---|
| 135 | |
---|
| 136 | <input name="subject" |
---|
| 137 | id="subject" |
---|
| 138 | value="" |
---|
| 139 | size="40" |
---|
| 140 | tal:attributes="value request/subject|request/title_override|nothing;" /> |
---|
| 141 | |
---|
| 142 | </div> |
---|
| 143 | |
---|
| 144 | <div class="field" |
---|
| 145 | tal:define="error errors/body_text|nothing;" |
---|
| 146 | tal:attributes="class python:test(error, 'field error', 'field')"> |
---|
| 147 | |
---|
| 148 | <label for="body_text" i18n:translate="label_comment">Comment</label> |
---|
| 149 | |
---|
| 150 | <span class="fieldRequired" title="Required" |
---|
| 151 | i18n:attributes="title title_required;" |
---|
| 152 | i18n:translate="label_required">(Required)</span> |
---|
| 153 | |
---|
| 154 | <div tal:content="error">Validation error output</div> |
---|
| 155 | |
---|
| 156 | <textarea name="body_text" |
---|
| 157 | id="body_text" |
---|
| 158 | cols="40" |
---|
| 159 | rows="8" |
---|
| 160 | tal:content="request/body_text|request/text_override | nothing" |
---|
| 161 | ></textarea> |
---|
| 162 | |
---|
| 163 | </div> |
---|
| 164 | <div metal:use-macro="here/captcha_widget/macros/captcha"></div> |
---|
| 165 | <div class="formControls"> |
---|
| 166 | |
---|
| 167 | <input class="context" |
---|
| 168 | type="submit" |
---|
| 169 | value="Save" |
---|
| 170 | name="form.button.Save" |
---|
| 171 | i18n:attributes="value label_save;" |
---|
| 172 | tal:attributes="name string:discussion_reply:method;" /> |
---|
| 173 | |
---|
| 174 | </div> |
---|
| 175 | <input type="hidden" name="form.submitted" value="1" /> |
---|
| 176 | |
---|
| 177 | </fieldset> |
---|
| 178 | |
---|
| 179 | </form> |
---|
| 180 | |
---|
| 181 | </div> |
---|
| 182 | |
---|
| 183 | </body> |
---|
| 184 | </html> |
---|