cleanup pagetemplate code with string: literals

This commit is contained in:
Helmut Merz 2016-12-26 18:14:15 +01:00
parent 325f463ce8
commit c03e47ab3d

View file

@ -46,7 +46,7 @@
<thead> <thead>
<tr> <tr>
<tal:header repeat="column columns"> <tal:header repeat="column columns">
<th tal:attributes="class string:${column/baseField/cssClass|string:}" <th tal:attributes="class column/baseField/cssClass|string:"
tal:content="column/title">Column Title</th> tal:content="column/title">Column Title</th>
</tal:header> </tal:header>
</tr> </tr>
@ -54,31 +54,34 @@
<tbody tal:attributes="id string:tbody.$name"> <tbody tal:attributes="id string:tbody.$name">
<tr tal:repeat="row rows"> <tr tal:repeat="row rows">
<td tal:repeat="column columns" <td tal:repeat="column columns"
tal:attributes="class string:${column/baseField/cssClass|string:}"> tal:attributes="class column/baseField/cssClass|string:">
<input type="text" style="width: auto" <input type="text" style="width: auto"
tal:define="cname column/name" tal:define="cname column/name;
width column/baseField/width|string:auto"
tal:attributes="value row/?cname|nothing; tal:attributes="value row/?cname|nothing;
name string:$name.$cname:records; name string:$name.$cname:records;
style string:width: ${column/baseField/width|string:auto};" /></td> style string:width: $width" /></td>
</tr> </tr>
<tal:empty condition="python: not field.cardinality <tal:empty condition="python: not field.cardinality
or field.cardinality > len(rows)"> or field.cardinality > len(rows)">
<tr> <tr>
<td tal:repeat="column columns" <td tal:repeat="column columns"
tal:attributes="class string:${column/baseField/cssClass|string:}"> tal:attributes="class column/baseField/cssClass|string:">
<input type="text" <input type="text"
tal:define="cname column/name" tal:define="cname column/name;
width column/baseField/width|string:auto"
tal:attributes="name string:$name.$cname:records; tal:attributes="name string:$name.$cname:records;
style string:width: ${column/baseField/width|string:auto};" /></td> style string:width: $width" /></td>
</tr> </tr>
<tr style="display: none" <tr style="display: none"
tal:attributes="id string:$name.empty"> tal:attributes="id string:$name.empty">
<td tal:repeat="column columns" <td tal:repeat="column columns"
tal:attributes="class string:${column/baseField/cssClass|string:}"> tal:attributes="class column/baseField/cssClass|string:">
<input type="text" style="width: auto" <input type="text" style="width: auto"
tal:define="cname column/name" tal:define="cname column/name;
width column/baseField/width|string:auto"
tal:attributes="name string:$name.$cname:records; tal:attributes="name string:$name.$cname:records;
style string:width: ${column/baseField/width|string:auto};" /></td> style string:width: $width;" /></td>
</tr> </tr>
</tal:empty> </tal:empty>
</tbody> </tbody>