loops/compound/book/view_macros.pt

107 lines
4 KiB
XML

<html i18n:domain="loops">
<metal:children define-macro="children">
<div tal:repeat="related item/children">
<h3>
<a tal:attributes="href python:view.getUrlForTarget(related)"
tal:content="related/title" /></h3>
<div tal:content="structure related/renderedDescription" />
</div>
</metal:children>
<metal:book define-macro="book">
<metal:info use-macro="view/concept_macros/concepttitle" />
<metal:info use-macro="item/book_macros/children" />
</metal:book>
<metal:section define-macro="section">
<metal:navigation define-macro="navigation"
tal:condition="item/showNavigation">
<div tal:define="parent nocall:item/breadcrumbsParent;
pred nocall:item/predecessor;
succ nocall:item/successor">
<a tal:condition="nocall:pred"
tal:attributes="href pred/targetUrl;
title pred/title">
<img src="/@@/cybertools.icons/arrow_left.png" /></a>
<a tal:attributes="href parent/targetUrl;
title parent/title">
<img src="/@@/cybertools.icons/arrow_up.png" /></a>
<a tal:condition="nocall:succ"
tal:attributes="href succ/targetUrl;
title succ/title">
<img src="/@@/cybertools.icons/arrow_right.png" /></a>
</div>
</metal:navigation>
<metal:info use-macro="view/concept_macros/concepttitle" />
<metal:info use-macro="item/book_macros/children" />
<div tal:repeat="related item/textResources">
<div class="span-4">
<div tal:attributes="class python:
item.getCssClassForResource(related)"
tal:content="structure related/render" />
</div>
<div class="span-2 last" style="padding-top: 0.4em">
<div class="object-actions" style="padding-top: 0"
tal:define="url python:view.getUrlForTarget(related.context)"
tal:condition="related/editable">
<a i18n:translate="" i18n:attributes="title"
title="Edit"
tal:define="targetUid python:view.getUidForObject(related.context);
url
string:$url/edit_object.html?version=this&targetUid=$targetUid"
tal:attributes="href url;
onclick string:objectDialog('edit', '$url');;
return false">
<img tal:attributes="src
string:$resourceBase/cybertools.icons/vcard_edit.png" /></a>
<a i18n:translate="" i18n:attributes="title"
title="Edit with external editor."
xxtal:condition="related/xeditable"
tal:condition="nothing"
tal:attributes="href string:$url/external_edit?version=this">
<img tal:attributes="src
string:$resourceBase/cybertools.icons/application_edit.png" /></a>
</div>
<div tal:repeat="parent python:item.getParentsForResource(related)">
<a tal:content="parent/title"
tal:attributes="href python:view.getUrlForTarget(parent)" />
</div>
<div tal:repeat="image python:
item.images[repeat['related'].index() + 1]">
<a dojoType="dojox.image.Lightbox" group="mediasset"
i18n:attributes="title"
tal:attributes="href image/fullImageUrl;
title image/title">
<img tal:attributes="src image/src;
alt image/title" /></a>
</div>
</div>
</div>
<br style="clear: both" />
<metal:navigation use-macro="item/book_macros/navigation" />
<br />
</metal:section>
<!-- layout part macros - obsolete? -->
<metal:part define-macro="headline">
<div tal:define="cell part/getView">
<metal:headline use-macro="item/macros/headline" />
</div>
</metal:part>
<metal:part define-macro="text">
<tal:cell repeat="cell part/getResources">
<div tal:attributes="class cell/cssClass">
<h3 tal:content="cell/title" />
<span tal:content="structure cell/view/render" />
</div>
</tal:cell>
</metal:part>
</html>