loops/browser/node.pt
helmutm 03e1500809 Added smart editing upon click
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1006 fd906abe-77d9-0310-91a1-e0d9ade77398
2006-01-13 14:04:01 +00:00

88 lines
2.6 KiB
XML

<tal:show i18n:domain="loops">
<html metal:use-macro="context/@@skin_macros/page">
<head></head>
<body>
<metal:css fill-slot="style_slot">
<style type="text/css" media="all"
tal:content="string:@import url(${context/++resource++node.css});">
@import url(view.css);
</style>
</metal:css>
<metal:body fill-slot="body">
<tal:content define="item view/content;
level level|python: 1">
<metal:block define-macro="content">
<tal:body define="body item/body"
condition="body">
<div class="content-1"
tal:define="onclick string:
zmi=window.open('${item/url}/@@edit.html', 'zmi');;
zmi.focus();; return false;;"
tal:attributes="class string:content-$level;
onclick python: item['editable'] and onclick or ''"
tal:content="structure body">
The body
</div>
</tal:body>
<tal:sub define="level python:level+1">
<tal:items repeat="item item/items">
<metal:portlet use-macro="views/node_macros/content" />
</tal:items>
</tal:sub>
</metal:block>
</tal:content>
</metal:body>
<div class="box" metal:fill-slot="navigators">
<h4>Navigation</h4>
<tal:menu define="item view/menu;
level level|python: 1"
condition="item">
<div class="body">
<metal:menu define-macro="menu">
<div class="menu-3"
tal:attributes="class python: 'content '
+ (item['selected'] and 'even' or 'odd')
+ ' menu-%i' % level">
<a href="#" class=""
tal:content="item/title"
tal:attributes="href item/url">Menu Text</a>
</div>
<tal:sub tal:define="level python:level+1">
<tal:items repeat="item item/items">
<metal:portlet use-macro="views/node_macros/menu" />
</tal:items>
</tal:sub>
</metal:menu>
</div>
</tal:menu>
</div>
</body>
</html>
</tal:show>
<tal:hide condition="nothing">
<metal:editlink define-macro="editlink">
<a target="zmi"
tal:define="url string:${item/url}/@@edit.html'"
tal:attributes="href url;
onclick string:
zmi=window.open('$url', 'zmi');;
zmi.focus();; return false;;">
<img src="edit.gif"
tal:attributes="src context/++resource++edit.gif" border="0" />
</a>
</metal:editlink>
</tal:hide>