Mercurial > p > roundup > code
annotate share/roundup/templates/devel/html/file.item.html @ 8566:e4191aa7b402 default tip
doc: issue2551415 correct doc for change input->input_payload
in 2.5 the rest interface changed a variable name from input to
input_payload. An earlier commit changed the rest docs. This commit
adds an item for it to the upgrading 2.4.0->2.5.0 section. Also cross
reference added to the rest docs with the updated examples.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 09 Apr 2026 00:19:06 -0400 |
| parents | 7a41dd2abbbd |
| children |
| rev | line source |
|---|---|
| 4434 | 1 <tal:block metal:use-macro="templates/page/macros/frame"> |
| 2 <title metal:fill-slot="head_title" i18n:translate="">File display - <span | |
| 3 i18n:name="tracker" tal:replace="config/TRACKER_NAME" /></title> | |
| 4 <span metal:fill-slot="body_title" tal:omit-tag="python:1" | |
| 5 i18n:translate="">File display</span> | |
| 6 | |
| 7 <td class="content" metal:fill-slot="content"> | |
| 8 | |
| 9 <p tal:condition="python:not (context.is_view_ok() | |
| 10 or request.user.hasRole('Anonymous'))" i18n:translate=""> | |
| 11 You are not allowed to view this page.</p> | |
| 12 | |
| 13 <p tal:condition="python:not context.is_view_ok() | |
| 14 and request.user.hasRole('Anonymous')" i18n:translate=""> | |
| 15 Please login with your username and password.</p> | |
| 16 | |
| 17 <form method="POST" onSubmit="return submit_once()" | |
| 18 enctype="multipart/form-data" tal:condition="context/is_view_ok" | |
| 19 tal:attributes="action context/designator"> | |
| 20 | |
| 21 <table class="form"> | |
| 22 <tr> | |
| 23 <th i18n:translate="">Name</th> | |
| 24 <td tal:content="structure context/name/field"></td> | |
| 25 </tr> | |
| 26 <tr> | |
| 27 <th i18n:translate="">Description</th> | |
| 28 <td tal:content="structure context/description/field"></td> | |
| 29 </tr> | |
| 30 <tr> | |
| 31 <th i18n:translate="">Content Type</th> | |
| 32 <td tal:content="structure context/type/field"/> | |
| 33 <td style="border: none" tal:condition="python: context.is_edit_ok()">Please note that | |
| 34 for security reasons, it's not permitted to set content type to <i>text/html</i>.</td> | |
| 35 </tr> | |
| 36 <tr tal:condition="python:context.is_edit_ok()"> | |
| 37 <td> | |
| 38 | |
| 39 <input type="hidden" name="@template" value="item"> | |
| 40 <input type="hidden" name="@required" value="name,type"> | |
| 41 <input type="hidden" name="@multilink" | |
|
5413
7a41dd2abbbd
Python 3 preparation: HTML templates.
Joseph Myers <jsm@polyomino.org.uk>
parents:
5207
diff
changeset
|
42 tal:condition="python:'@multilink' in request.form" |
| 4434 | 43 tal:attributes="value request/form/@multilink/value"> |
| 44 </td> | |
| 45 <td tal:content="structure context/submit">submit button here</td> | |
| 46 </tr> | |
| 47 </table> | |
| 48 </form> | |
| 49 | |
| 50 <!--<p tal:condition="python:utils.sb_is_spam(context)" class="error-message"> | |
| 51 File has been classified as spam.</p>--> | |
| 52 | |
| 53 <a tal:condition="python:context.id and context.content.is_view_ok()" | |
| 54 tal:attributes="href string:file${context/id}/${context/name}" | |
| 55 i18n:translate="">download</a> | |
| 56 | |
| 57 <!--<p tal:condition="python:context.id and not context.content.is_view_ok()"> | |
| 58 Files classified as spam are not available for download by | |
| 59 unathorized users. If you think the file has been misclassified, | |
| 60 please login and click on the button for reclassification. | |
| 61 </p>--> | |
| 62 | |
| 63 | |
| 64 <!-- <form method="POST" onSubmit="return submit_once()" | |
| 65 enctype="multipart/form-data" | |
| 66 tal:attributes="action context/designator" | |
| 67 tal:condition="python:request.user.hasPermission('SB: May Classify')"> | |
|
5207
4a157824f933
changes to try to deploy anti-csrf defense to other templates.
John Rouillard <rouilj@ieee.org>
parents:
4434
diff
changeset
|
68 <input name="@csrf" type="hidden" |
|
4a157824f933
changes to try to deploy anti-csrf defense to other templates.
John Rouillard <rouilj@ieee.org>
parents:
4434
diff
changeset
|
69 tal:attributes="value python:utils.anti_csrf_nonce()"> |
| 4434 | 70 <input type="hidden" name="@action" value="spambayes_classify"> |
| 71 <input type="submit" name="trainspam" value="Mark as SPAM" i18n:attributes="value"> | |
| 72 <input type="submit" name="trainham" value="Mark as HAM (not SPAM)" i18n:attributes="value"> | |
| 73 </form>--> | |
| 74 | |
| 75 <tal:block tal:condition="context/id" tal:replace="structure context/history" /> | |
| 76 | |
| 77 </td> | |
| 78 | |
| 79 </tal:block> |
