[Zope3-checkins] CVS: Zope3/src/zope/products/statictree/skins - configure.zcml:1.2 navigation_macros.pt:1.3

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Feb 15 14:00:27 EST 2004


Update of /cvs-repository/Zope3/src/zope/products/statictree/skins
In directory cvs.zope.org:/tmp/cvs-serv15926/src/zope/products/statictree/skins

Modified Files:
	configure.zcml navigation_macros.pt 
Log Message:
Upgraded static tree to display lines, so it is visually easier to keep
track of the levels.

Just check it out!

PS: Fixes to apidoc follow soon.


=== Zope3/src/zope/products/statictree/skins/configure.zcml 1.1 => 1.2 ===
--- Zope3/src/zope/products/statictree/skins/configure.zcml:1.1	Fri Jan 16 07:39:03 2004
+++ Zope3/src/zope/products/statictree/skins/configure.zcml	Sun Feb 15 13:59:56 2004
@@ -1,5 +1,4 @@
 <configure 
-  xmlns="http://namespaces.zope.org/zope"
   xmlns:browser="http://namespaces.zope.org/browser">
 
   <browser:layer name="statictree" />


=== Zope3/src/zope/products/statictree/skins/navigation_macros.pt 1.2 => 1.3 ===
--- Zope3/src/zope/products/statictree/skins/navigation_macros.pt:1.2	Fri Jan 16 09:15:50 2004
+++ Zope3/src/zope/products/statictree/skins/navigation_macros.pt	Sun Feb 15 13:59:56 2004
@@ -16,11 +16,11 @@
         <h4 i18n:translate="">Navigation</h4>
 
 
-<table cellspacing="0"
-       tal:define="root      context/@@root_cookie_tree;
-                   result    root/getFlatDicts;
-                   flatdicts python:result[0];
-                   maxdepth  python:result[1];">
+<table cellspacing="0" cellpadding="0"
+       tal:define="root           context/@@root_cookie_tree;
+                   result         root/getFlatDicts;
+                   nodeDictList   python:result[0];
+                   maxDepth       python:result[1]">
 
 <tr>
   <td width="16">
@@ -29,28 +29,47 @@
   </td>
 
   <td class="list-item"
-      tal:attributes="colspan python:maxdepth+2">
+      tal:attributes="colspan python:maxDepth+2">
     <a href=""
-       tal:attributes="href string:${root/context/@@absolute_url}/@@SelectedManagementView.html"
+       tal:attributes="href 
+           string:${root/context/@@absolute_url}/@@SelectedManagementView.html"
        tal:content="root/getId() | string:[top]"></a>
   </td>
 </tr>
 
-<tr tal:repeat="dict flatdicts">
-<tal:block tal:define="node dict/node">
+<tr tal:repeat="nodeInfo nodeDictList">
+<tal:block tal:define="node nodeInfo/node">
 
-  <td style="width:16px" tal:repeat="depth python:range(dict['depth'])">
+  <td style="width:16px" tal:repeat="state nodeInfo/row-state">
+    <img tal:attributes="src context/++resource++tree_images/empty.png"
+         tal:condition="not:state" alt="" border="0" />
+    <img tal:attributes="src context/++resource++tree_images/vline.png"
+         tal:condition="state" alt="|" border="0" />
   </td>
 
   <td style="width:16px">
     <a href=""
-       tal:attributes="href string:?tree-state=${dict/tree-state}"
+       tal:attributes="href string:?tree-state=${nodeInfo/tree-state}"
        tal:condition="node/hasChildren">
-      <img tal:attributes="src context/++resource++pl.gif"
-           tal:condition="not:node/expanded" alt="+" border="0" />
-      <img tal:attributes="src context/++resource++mi.gif"
-           tal:condition="node/expanded" alt="-" border="0" />
+      <tal:block condition="not:nodeInfo/last-level-node">
+        <img tal:attributes="src context/++resource++tree_images/plus_vline.png"
+             tal:condition="not:node/expanded" alt="+" border="0" />
+        <img tal:attributes="src context/++resource++tree_images/minus_vline.png"
+             tal:condition="node/expanded" alt="-" border="0" />
+      </tal:block>
+      <tal:block condition="nodeInfo/last-level-node">
+        <img tal:attributes="src context/++resource++tree_images/plus.png"
+             tal:condition="not:node/expanded" alt="+" border="0" />
+        <img tal:attributes="src context/++resource++tree_images/minus.png"
+             tal:condition="node/expanded" alt="-" border="0" />
+      </tal:block>
     </a>
+    <tal:block condition="not:node/hasChildren">
+      <img tal:attributes="src context/++resource++tree_images/tline.png"
+           tal:condition="not:nodeInfo/last-level-node" alt="T" border="0" />
+      <img tal:attributes="src context/++resource++tree_images/lline.png"
+           tal:condition="nodeInfo/last-level-node" alt="L" border="0" />
+    </tal:block>
   </td>
 
   <td style="width:16px"
@@ -59,11 +78,12 @@
     <img src="" tal:replace="structure icon" />
   </td>
 
-  <td colspan="1" class="list-item"
-      tal:attributes="colspan python:maxdepth - dict['depth'] + 1">
-    <a href=""
-       tal:attributes="href string:${node/context/@@absolute_url}/@@SelectedManagementView.html"
-       tal:content="node/context/__name__">
+  <td class="list-item"
+      tal:attributes="colspan python:maxDepth-len(nodeInfo['row-state'])+1">
+    &nbsp;<a href=""
+       tal:attributes="href 
+           string:${node/context/@@absolute_url}/@@SelectedManagementView.html"
+       tal:content="node/context/zope:name">
       node/id
     </a>
   </td>




More information about the Zope3-Checkins mailing list