[Zope3-checkins] CVS: Zope3/src/zope/products/statictree/skins - __init__.py:1.1 __init__.pyc:1.1 configure.zcml:1.1 navigation_macros.pt:1.1

Philipp von Weitershausen philikon at philikon.de
Fri Jan 16 07:39:05 EST 2004


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

Added Files:
	__init__.py __init__.pyc configure.zcml navigation_macros.pt 
Log Message:
Checked the 'statictree' product in. This is a port of my original ZopeTree
product for Zope2, which was meant to replace the inflexible and
irreliable ZTUtils.Tree. This version for Zope 3 is released under the ZPL
and now added to the main distribution on people's request.

See README.txt for more infos.


=== Added File Zope3/src/zope/products/statictree/skins/__init__.py ===
# make this directory a package


=== Added File Zope3/src/zope/products/statictree/skins/__init__.pyc ===
  <Binary-ish file>

=== Added File Zope3/src/zope/products/statictree/skins/configure.zcml ===
<configure 
  xmlns="http://namespaces.zope.org/zope"
  xmlns:browser="http://namespaces.zope.org/browser">

  <browser:layer name="statictree" />

  <browser:skin
      name="StaticTree"
      layers="statictree rotterdam default"
      />

  <browser:page
      for="*"
      name="navigation_macros"
      permission="zope.View"
      layer="statictree"
      template="navigation_macros.pt"
      />

</configure>


=== Added File Zope3/src/zope/products/statictree/skins/navigation_macros.pt ===
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      i18n:domain="zope">
<body>

  <!-- Java scripts for the navigation tree - none! -->

  <metal:tree define-macro="navigation_tree_js">
  </metal:tree>

  <!-- Box containing the actual navigation tree -->

  <metal:tree define-macro="navigation_tree_box">
      <div class="box" id="navigationTree">
        <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];">

<tr>
  <td width="16">
    <img src="" tal:define="icon root/context/@@zmi_icon | nothing"
         tal:replace="structure icon" />
  </td>

  <td class="list-item"
      tal:attributes="colspan python:maxdepth+2">
    <a href=""
       tal:attributes="href root/context/@@absolute_url"
       tal:content="root/getId() | string:[top]"></a>
  </td>
</tr>

<tr tal:repeat="dict flatdicts">
<tal:block tal:define="node dict/node">

  <td style="width:16px" tal:repeat="depth python:range(dict['depth'])">
  </td>

  <td style="width:16px">
    <a href=""
       tal:attributes="href string:?tree-state=${dict/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" />
    </a>
  </td>

  <td style="width:16px"
      tal:define="object nocall:node/context;
                  icon   object/@@zmi_icon | nothing">
    <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 node/context/@@absolute_url"
       tal:content="node/context/__name__">
      node/id
    </a>
  </td>

</tal:block>
</tr>

</table>


    </div>
  </metal:tree>
</body>
</html>




More information about the Zope3-Checkins mailing list