Skip to content

Commit 27be7f5

Browse files
author
Alexander Smishlajev
committed
i18n markup;
if 'is_only_view_ok', show the list of items.
1 parent ade7437 commit 27be7f5

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

templates/classic/html/_generic.index.html

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,31 @@
77
tal:content="python:context._classname.capitalize()+' editing'"></span>
88
<td class="content" metal:fill-slot="content">
99

10-
<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())">
11-
You are not allowed to view this page.
12-
</span>
10+
<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())"
11+
tal:omit-tag="python:1" i18n:translate=""
12+
>You are not allowed to view this page.</span>
1313

1414
<tal:block tal:condition="context/is_edit_ok">
15+
<tal:block i18n:translate="">
1516
<p class="form-help">
16-
You may edit the contents of the <span tal:replace="request/classname" />
17+
You may edit the contents of the
18+
<span tal:replace="request/classname" i18n:name="classname"/>
1719
class using this form. Commas, newlines and double quotes (") must be
1820
handled delicately. You may include commas and newlines by enclosing the
1921
values in double-quotes ("). Double quotes themselves must be quoted by
2022
doubling ("").
2123
</p>
2224

2325
<p class="form-help">
24-
Multilink properties have their multiple values colon (":") separated
26+
Multilink properties have their multiple values colon (":") separated
2527
(... ,"one:two:three", ...)
2628
</p>
2729

2830
<p class="form-help">
2931
Remove entries by deleting their line. Add new entries by appending
3032
them to the table - put an X in the id column.
3133
</p>
32-
34+
</tal:block>
3335
<form onSubmit="return submit_once()" method="POST"
3436
tal:attributes="action context/designator">
3537
<textarea rows="15" cols="60" name="rows" tal:content="context/csv"></textarea>
@@ -39,9 +41,18 @@
3941
</form>
4042
</tal:block>
4143

42-
<tal:block tal:condition="context/is_only_view_ok">
43-
view ok
44-
</tal:block>
44+
<table tal:condition="context/is_only_view_ok" width="100%" class="list">
45+
<tr>
46+
<th tal:repeat="property context/propnames" tal:content="property">&nbsp;</th>
47+
</tr>
48+
<tr tal:repeat="item context/list"
49+
tal:attributes="class python:['normal', 'alt'][repeat['item'].index%6/3]"
50+
>
51+
<td tal:repeat="property context/propnames"
52+
tal:content="python: item[property] or default"
53+
>&nbsp;</td>
54+
</tr>
55+
</table>
4556

4657
</td>
4758

0 commit comments

Comments
 (0)