view zpt/HTML_list_tables.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 source

<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>