loops/browser/node_macros.pt
helmutm e05caedc38 provide a resources list node view; sort all relations using the title attribute
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1295 fd906abe-77d9-0310-91a1-e0d9ade77398
2006-08-12 11:03:36 +00:00

147 lines
4.6 KiB
XML

<!-- content macros -->
<metal:block define-macro="content"
tal:define="bodyMacro item/bodyMacro">
<metal:body use-macro="views/node_macros/?bodyMacro" />
<tal:sub define="level python:level+1">
<tal:items repeat="item item/textItems">
<metal:content use-macro="views/node_macros/content" />
</tal:items>
</tal:sub>
</metal:block>
<metal:body define-macro="textbody">
<tal:body define="body item/body">
<div class="content-1"
tal:condition="body"
tal:attributes="class string:content-$level;
ondblclick item/openEditWindow"
tal:content="structure body">
The body
</div>
<div class="content-1"
tal:define="target item/target"
tal:condition="target"
tal:attributes="class string:content-$level;
ondblclick python: item.openEditWindow('configure.html')"
tal:content="structure item/renderTarget">
The body
</div>
</tal:body>
</metal:body>
<metal:body define-macro="conceptbody">
<tal:body define="body item/body;">
<div class="content-1"
tal:attributes="class string:content-$level;
ondblclick python: item.openEditWindow('configure.html')">
<span tal:content="structure body">Node Body</span>
</div>
<tal:concepts define="item item/target;
macro item/macro">
<div metal:use-macro="macro" />
<!--<div metal:use-macro="views/concept_macros/conceptlisting2" />-->
</tal:concepts>
</tal:body>
</metal:body>
<metal:body define-macro="filebody">
<tal:body define="body item/body">
<div class="content-1"
tal:attributes="class string:content-$level;
ondblclick python: item.openEditWindow('edit_target.html')">
<a href="#"
tal:attributes="href string:${item/url}/.target/view"
tal:content="structure body">The body</a>
</div>
</tal:body>
</metal:body>
<metal:body define-macro="imagebody">
<tal:body define="body item/body">
<div class="content-1" style="margin-top: 12px"
tal:attributes="class string:content-$level;
ondblclick python: item.openEditWindow('edit_target.html')">
<img src="target"
tal:attributes="src string:${item/url}/.target/view" />
</div>
<div class="content-1"
tal:condition="body"
tal:attributes="class string:content-$level;
ondblclick item/openEditWindow"
tal:content="structure body">
The body
</div>
</tal:body>
</metal:body>
<!-- named views -->
<metal:body define-macro="listpages">
<div class="content-1"
tal:content="structure view/body"
tal:attributes="ondblclick view/openEditWindow">
Listing
</div><br />
<div tal:repeat="item view/pageItems">
<a href="#"
tal:attributes="href item/url"
tal:content="item/title">Item</a>
</div>
</metal:body>
<metal:resources define-macro="listresources"
tal:define="item view/target">
<div class="content-1"
tal:content="structure view/body"
tal:attributes="ondblclick python: item.openEditWindow('resources.html')">
Listing
</div><br />
<div tal:attributes="ondblclick python: item.openEditWindow('resources.html')">
<div tal:repeat="related item/resources">
<a href="#"
tal:attributes="href string:${view/url}/.target${related/uniqueId}"
tal:content="related/title">Resource Title</a>
</div>
</div>
</metal:resources>
<!-- menu -->
<metal:menu define-macro="menu">
<div class="menu-3"
tal:attributes="class python: 'content '
+ (view.selected(item) and 'even' or 'odd')
+ ' menu-%i' % level">
<a href="#" class=""
tal:content="item/context/title"
tal:attributes="href item/url">Menu Text</a>
</div>
<tal:sub define="level python:level+1"
condition="python: level &lt; 4 or view.active(item)">
<tal:items repeat="item item/menuItems">
<metal:portlet use-macro="views/node_macros/menu" />
</tal:items>
</tal:sub>
</metal:menu>
<!-- and other stuff -->
<metal:editlink define-macro="editlink">
<a target="zmi"
tal:define="url string:${item/url}/@@edit.html'"
tal:attributes="href url;
onclick item/openEditWindow;">
<img src="edit.gif"
tal:attributes="src context/++resource++edit.gif" border="0" />
</a>
</metal:editlink>