Update of /cvsroot/happydoc/HappyDoc3/happydoclib/docset/docset_TAL/templates/default
In directory sc8-pr-cvs1:/tmp/cvs-serv13085/happydoclib/docset/docset_TAL/templates/default
Modified Files:
python_macros.pt
Log Message:
Add a macro for producing a descriptive list in a table format.
Add a list of classes to the output of a Python module.
Index: python_macros.pt
===================================================================
RCS file: /cvsroot/happydoc/HappyDoc3/happydoclib/docset/docset_TAL/templates/default/python_macros.pt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** python_macros.pt 16 Mar 2003 23:43:50 -0000 1.1
--- python_macros.pt 18 Mar 2003 17:23:14 -0000 1.2
***************
*** 11,14 ****
--- 11,49 ----
<body>
+ <!-- DUMP A LIST OF SUBNODES -->
+ <!-- Caller should set up "subnodes" variable -->
+
+ <tal:block metal:define-macro="subnode_list"
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal">
+ <metal:block metal:define-slot="title_slot">
+ Descriptive list title
+ </metal:block>
+ <table class="descriptive_list">
+
+ <tr tal:repeat="subnode subnodes">
+ <td><a href=""
+ tal:attributes="href python: docset.getHREFToNode(node, subnode)"
+ tal:content="subnode/getName">
+ Plain Text File Name
+ </a>
+ </td>
+ <td>
+ <span tal:condition="subnode/getOneLiner|nothing"
+ tal:content="structure subnode/getOneLiner">
+ One line description
+ </span>
+ <span tal:condition="not: subnode/getOneLiner|nothing">
+
+ </span>
+ </td>
+ </tr>
+
+ </table>
+ </tal:block>
+
+ <!-- DUMP ALL OF THE STUFF FOR A PYTHON MODULE -->
+ <!-- Caller should set up "current_module" variable. -->
+
<tal:block metal:define-macro="python_module"
xmlns:tal="http://xml.zope.org/namespaces/tal"
***************
*** 39,43 ****
--- 74,87 ----
</tal:block>
+ <tal:block tal:define="subnodes python: current_module.getSubNodes(['application/x-class']);"
+ tal:condition="subnodes|nothing">
+ <div
+ metal:use-macro="templates/python_macros.pt/macros/subnode_list">
+ <h2 metal:fill-slot="title_slot">Classes</h2>
+ </div>
+ </tal:block>
+
</tal:block>
+
<p>This template contains the macros for formatting information
|