annotate zpt/HTML_schema_table.zpt @ 8:a9a49f5765c9

reworking templates and schema
author casties
date Wed, 21 Jul 2010 17:01:04 +0200
parents zpt/HTML_table.zpt@e3ee1f358fe6
children 76ac7a721273
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
e3ee1f358fe6 new version that doesn't use ZSQLExtend but the database connection more directly.
casties
parents: 3
diff changeset
1 <html tal:define="format python:request.get('format','table'); element_id python:request.get('element_id',None);
e3ee1f358fe6 new version that doesn't use ZSQLExtend but the database connection more directly.
casties
parents: 3
diff changeset
2 fields options/data/fields; rows options/data/rows;">
2
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
3 <head>
4
e3ee1f358fe6 new version that doesn't use ZSQLExtend but the database connection more directly.
casties
parents: 3
diff changeset
4 <meta http-equiv="content-type" content="text/html;charset=utf-8">
2
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
5 <title tal:content="template/title">The title</title>
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
6 </head>
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
7 <body>
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
8 <h2>table <span tal:replace="options/tablename"/></h2>
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
9 <tal:block tal:condition="python:format=='table'">
4
e3ee1f358fe6 new version that doesn't use ZSQLExtend but the database connection more directly.
casties
parents: 3
diff changeset
10 <table tal:attributes="id element_id">
3
0e2d167d0983 nicer html table with id
casties
parents: 2
diff changeset
11 <thead>
0e2d167d0983 nicer html table with id
casties
parents: 2
diff changeset
12 <tr>
4
e3ee1f358fe6 new version that doesn't use ZSQLExtend but the database connection more directly.
casties
parents: 3
diff changeset
13 <th tal:repeat="field fields" tal:content="python:field[0]"/>
3
0e2d167d0983 nicer html table with id
casties
parents: 2
diff changeset
14 </tr>
0e2d167d0983 nicer html table with id
casties
parents: 2
diff changeset
15 </thead>
0e2d167d0983 nicer html table with id
casties
parents: 2
diff changeset
16 <tbody>
4
e3ee1f358fe6 new version that doesn't use ZSQLExtend but the database connection more directly.
casties
parents: 3
diff changeset
17 <tr tal:repeat="row rows">
e3ee1f358fe6 new version that doesn't use ZSQLExtend but the database connection more directly.
casties
parents: 3
diff changeset
18 <td tal:repeat="col row" tal:content="col"/>
3
0e2d167d0983 nicer html table with id
casties
parents: 2
diff changeset
19 </tr>
0e2d167d0983 nicer html table with id
casties
parents: 2
diff changeset
20 </tbody>
2
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
21 </table>
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
22 </tal:block>
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
23 </body>
61a3764cd5fb new version RestDbInterface with working traversal and templates
casties
parents:
diff changeset
24 </html>