diff zpt/HTML_list_schemas.zpt @ 4:e3ee1f358fe6

new version that doesn't use ZSQLExtend but the database connection more directly. new templates to go with that (returned data structures are different)
author casties
date Mon, 07 Jun 2010 14:02:17 +0000
parents 61a3764cd5fb
children
line wrap: on
line diff
--- a/zpt/HTML_list_schemas.zpt	Wed Jun 02 15:44:03 2010 +0000
+++ b/zpt/HTML_list_schemas.zpt	Mon Jun 07 14:02:17 2010 +0000
@@ -1,19 +1,19 @@
-<html tal:define="format python:request.get('format','table')">
+<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>
-    <meta http-equiv="content-type" content="text/html;charset=utf-8">
   </head>
   <body>
     <h2>List of schemas</h2>
     <tal:block tal:condition="python:format=='select'">
-    <select id="schemas">
-      <option tal:repeat="sch options/data" tal:content="sch"/>
+    <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'">
-    <table id="schemas">
-      <tr tal:repeat="sch options/data">
-	<td><a tal:attributes="href sch" tal:content="sch"/></td>
+    <table tal:attributes="id element_id">
+      <tr tal:repeat="sch options/data/data">
+        <td><a tal:attributes="href sch" tal:content="sch"/></td>
       </tr>
     </table>
     </tal:block>