Mercurial > hg > ChinaGisRestApi
diff zpt/HTML_index.zpt @ 9:76ac7a721273
more rework of templates
author | casties |
---|---|
date | Wed, 21 Jul 2010 19:09:02 +0200 |
parents | a9a49f5765c9 |
children | ed8db63fab4f |
line wrap: on
line diff
--- a/zpt/HTML_index.zpt Wed Jul 21 17:01:04 2010 +0200 +++ b/zpt/HTML_index.zpt Wed Jul 21 19:09:02 2010 +0200 @@ -1,19 +1,19 @@ -<html tal:define="format python:request.get('format','table'); element_id python:request.get('element_id',None)"> +<html tal:define="layout python:request.get('layout','table'); element_id python:request.get('element_id',None)"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title tal:content="template/title">The title</title> </head> <body> <h2>List of schemas</h2> - <tal:block tal:condition="python:format=='select'"> + <tal:block tal:condition="python:layout=='select'"> <select tal:attributes="id element_id"> <option tal:repeat="sch options/data/data" tal:content="sch"/> </select> </tal:block> - <tal:block tal:condition="python:format=='table'"> + <tal:block tal:condition="python:layout=='table'"> <table tal:attributes="id element_id"> - <tr tal:repeat="sch options/data/data"> - <td><a tal:attributes="href sch" tal:content="sch"/></td> + <tr tal:repeat="row options/data/rows"> + <td><a tal:define="sch python:row[0]" tal:attributes="href sch" tal:content="sch"/></td> </tr> </table> </tal:block>