diff zpt/HTML_schema.zpt @ 8:a9a49f5765c9

reworking templates and schema
author casties
date Wed, 21 Jul 2010 17:01:04 +0200
parents zpt/HTML_list_tables.zpt@e3ee1f358fe6
children 76ac7a721273
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zpt/HTML_schema.zpt	Wed Jul 21 17:01:04 2010 +0200
@@ -0,0 +1,21 @@
+<html tal:define="format python:request.get('format','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 tables for schema <span tal:replace="options/schema"/></h2>
+    <tal:block tal:condition="python:format=='select'">
+    <select tal:attributes="id element_id">
+      <option tal:repeat="tbl options/data/rows" tal:content="python:tbl[0]"/>
+    </select>
+    </tal:block>
+    <tal:block tal:condition="python:format=='table'">
+    <table tal:attributes="id element_id">
+      <tr tal:repeat="row options/data/rows">
+        <td><a tal:define="tbl python:row[0]" tal:attributes="href tbl" tal:content="tbl"/></td>
+      </tr>
+    </table>
+    </tal:block>
+  </body>
+</html>
\ No newline at end of file