Mercurial > p > roundup > code
annotate roundup/templates/classic/html/file.item @ 1204:b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
changed the default CSS style to be less offensive to some ;)
better handling of Page Template compilation errors
removed dependency on ComputedAttribute
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 25 Sep 2002 02:10:25 +0000 |
| parents | 49aebf5a8691 |
| children | 9e7b2a54f862 |
| rev | line source |
|---|---|
|
1204
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
1 <tal:block metal:use-macro="templates/page/macros/page"> |
|
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
2 <title metal:fill-slot="head_title">File display</title> |
|
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
3 <td class="page-header-top" metal:fill-slot="body_title"> |
|
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
4 <h2>File display</h2> |
|
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
5 </td> |
|
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
6 |
|
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
7 <td class="content" metal:fill-slot="content"> |
|
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
8 |
| 1166 | 9 <span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())"> |
| 10 You are not allowed to view this page. | |
| 11 </span> | |
| 12 | |
| 13 <form method="POST" onSubmit="return submit_once()" | |
| 14 enctype="multipart/form-data" tal:condition="context/is_edit_ok"> | |
| 15 | |
| 16 <input type="hidden" name=":template" value="item"> | |
| 17 <input type="hidden" name=":required" value="name,type"> | |
| 18 | |
|
1181
49aebf5a8691
some speedups, some fixes to the benchmarking
Richard Jones <richard@users.sourceforge.net>
parents:
1166
diff
changeset
|
19 <input type="hidden" name=":multilink" |
| 1166 | 20 tal:condition="python:request.form.has_key(':multilink')" |
| 21 tal:attributes="value request/form/:multilink/value"> | |
| 22 | |
| 23 <table class="form"> | |
| 24 <tr> | |
| 25 <th>Name</th> | |
| 26 <td tal:content="structure context/name/field"></td> | |
| 27 </tr> | |
| 28 <tr> | |
| 29 <th>Content Type</th> | |
| 30 <td tal:content="structure context/type/field"></td> | |
| 31 </tr> | |
| 32 <tr> | |
| 33 <th>Content</th> | |
| 34 <td><input type="file" name="content" size="40"></td> | |
| 35 </tr> | |
| 36 | |
| 37 <tr> | |
| 38 <td> </td> | |
| 39 <td tal:content="structure context/submit">submit button here</td> | |
| 40 </tr> | |
| 41 </table> | |
| 42 </form> | |
| 43 | |
| 44 <a tal:condition="python:context.id and context.is_view_ok()" | |
| 45 tal:attributes="href string:file${context/id}/${context/name}">download</a> | |
| 46 | |
| 47 <table class="form" tal:condition="context/is_only_view_ok"> | |
| 48 <tr> | |
| 49 <th>Name</th> | |
| 50 <td tal:content="context/name"></td> | |
| 51 </tr> | |
| 52 <tr> | |
| 53 <th>Content Type</th> | |
| 54 <td tal:content="context/type"></td> | |
| 55 </tr> | |
| 56 </table> | |
| 57 | |
| 58 <tal:block tal:condition="python:context.id and context.is_view_ok()" | |
| 59 tal:replace="structure context/history" /> | |
|
1204
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
60 </td> |
| 1166 | 61 |
|
1204
b862bbf2067a
Replaced the content() callback ickiness with Page Template macro usage
Richard Jones <richard@users.sourceforge.net>
parents:
1181
diff
changeset
|
62 </tal:block> |
