|
9 | 9 |
|
10 | 10 | <td class="content" metal:fill-slot="content"> |
11 | 11 |
|
12 | | -<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok() |
13 | | - or request.user.hasRole('Anonymous'))" |
14 | | - tal:omit-tag="python:1" i18n:translate="" |
15 | | ->You are not allowed to view this page.</span> |
| 12 | +<p tal:condition="python:not (context.is_view_ok() |
| 13 | + or request.user.hasRole('Anonymous'))" i18n:translate=""> |
| 14 | + You are not allowed to view this page.</p> |
16 | 15 |
|
17 | | -<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok()) |
18 | | - and request.user.hasRole('Anonymous')" |
19 | | - tal:omit-tag="python:1" i18n:translate="" |
20 | | ->Please login with your username and password.</span> |
| 16 | +<p tal:condition="python:not context.is_view_ok() |
| 17 | + and request.user.hasRole('Anonymous')" i18n:translate=""> |
| 18 | + Please login with your username and password.</p> |
| 19 | + |
| 20 | +<div tal:condition="context/is_view_ok"> |
21 | 21 |
|
22 | 22 | <form method="POST" onSubmit="return submit_once()" |
23 | | - enctype="multipart/form-data" tal:condition="context/is_edit_ok" |
| 23 | + enctype="multipart/form-data" tal:condition="context/is_view_ok" |
24 | 24 | tal:attributes="action context/designator"> |
25 | 25 |
|
26 | 26 | <input type="hidden" name="@template" value="item"> |
|
44 | 44 |
|
45 | 45 | </form> |
46 | 46 |
|
47 | | -<table class="form" tal:condition="context/is_only_view_ok"> |
48 | | - |
49 | | -<tr tal:repeat="prop python:db[context._classname].properties()"> |
50 | | - <tal:block tal:condition="python:prop._name not in ('id', 'creator', |
51 | | - 'creation', 'activity')"> |
52 | | - <th tal:content="prop/_name"></th> |
53 | | - <td tal:content="structure python:context[prop._name].field()"></td> |
54 | | - </tal:block> |
55 | | -</tr> |
56 | | -</table> |
57 | | - |
| 47 | +<tal:block tal:condition="context/id" |
| 48 | + tal:define="limit python:[10, None][request.form.has_key('show_all_history')]" |
| 49 | + tal:replace="structure python:context.history(limit=limit)" /> |
| 50 | +<p tal:condition="not:exists:request/form/show_all_history" i18n:translate="">Showing 10 items. |
| 51 | +<a tal:attributes="href string:${context/_classname}${context/id}?show_all_history=yes">Show all history</a> |
| 52 | +(warning: this could be VERY long)</p> |
58 | 53 |
|
59 | | -<tal:block tal:condition="python:context.id and context.is_view_ok()"> |
60 | | - <tal:block tal:replace="structure context/history" /> |
61 | | -</tal:block> |
| 54 | +</div> |
62 | 55 |
|
63 | 56 | </td> |
64 | 57 |
|
|
0 commit comments