<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<h2>Localize Objects</h2>
<form action="localize" method="post">
<h3>Title of <tal:block tal:replace="here/getId"/></h3>
<table>
<tr><td> </td><td>German</td><td>English</td></tr>
<tr><td>Title</td><td><input size="50" tal:attributes="value python:here.title" name="title"></td>
<td><input size="50" tal:attributes="value python:here.locale_en.title" name="en!title"></td></tr>
<tr><td>Label</td><td><input size="50" tal:attributes="value python:here.label" name="label"></td>
<td><input size="50" tal:attributes="value python:here.locale_en.label" name="en!label"></td>
</tr>
</table>
<input type="submit" value="submit">
<tal:block tal:repeat="content python:here.ZopeFind(here,obj_metatypes=['ECHO_link','ECHO_mapText'])">
<h3 tal:condition="python:content[1].meta_type=='ECHO_mapText'" tal:content="python:content[1].getId()"/>
<tal:block tal:condition="python:content[1].meta_type=='ECHO_link'" tal:define="global found python:here.ZopeFind(content[1],obj_metatypes=['ECHO_mapText'])">
<h3 tal:condition="found" tal:content="python:content[1].getId()+'/'+found[0][1].getId()"/>
</tal:block>
<table>
<tr><td> </td><td>German</td><td>English</td></tr>
<!--<tr><td>Title</td><td><input tal:attributes="value python:content[1].title; name python:content[1].getId()+'!title'"></td>
<td><input tal:attributes="value python:content[1].locale_en.title; name python:content[1].getId()+'!en!title'"></td></tr>
<tr><td>Label</td><td><input tal:attributes="value python:content[1].label; name python:content[1].getId()+'!label'"></td>
<td><input tal:attributes="value python:content[1].locale_en.label; name python:content[1].getId()+'!en!lable'"></td>
</tr>-->
<tr tal:condition="python:content[1].meta_type=='ECHO_mapText'">
<td>Text</td>
<td><textarea tal:attributes="name python:content[1].getId()+'!text'" cols="50" rows="10" tal:content="python:content[1].pt_render()"></textarea></td>
<td><textarea tal:attributes="name python:content[1].getId()+'!en!text'" cols="50" rows="10" tal:content="python:content[1].locale_en.pt_render()"></textarea></td>
</tr>
<tal:block tal:condition="python:content[1].meta_type=='ECHO_link'">
<tr tal:condition="found">
<td>Text</td>
<td><textarea tal:attributes="name python:content[1].getId()+'!text'" cols="50" rows="10" tal:content="python:found[0][1].pt_render()"></textarea></td>
<td><textarea tal:attributes="name python:content[1].getId()+'!en!text'" cols="50" rows="10" tal:content="python:content[1].locale_en.pt_render()"></textarea></td>
</tr>
</tal:block>
</table>
<input type="submit" value="submit">
</tal:block>
</form>
</body>
</html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>