diff zpt/HTML_schema.zpt @ 0:09361041be51

first checkin
author casties
date Fri, 11 Feb 2011 15:05:23 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zpt/HTML_schema.zpt	Fri Feb 11 15:05:23 2011 +0100
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+  tal:define="layout python:request.get('layout','table'); element_id python:request.get('element_id',None);
+  schema options/schema; data python:here.getListOfTables(schema)">
+  <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="schema"/></h2>
+    <tal:block tal:condition="python:layout=='select'">
+    <select tal:attributes="id element_id">
+      <option tal:repeat="tbl data/rows" tal:content="python:tbl[0]"/>
+    </select>
+    </tal:block>
+    <tal:block tal:condition="python:layout=='table'">
+    <table tal:attributes="id element_id">
+      <tr tal:repeat="row 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