loops/browser/resource_macros.pt
2021-05-27 11:57:28 +02:00

134 lines
4.7 KiB
XML

<html i18n:domain="loops">
<metal:block define-macro="render">
<div metal:define-macro="render_base"
tal:define="itemNum view/itemNum;
id string:$itemNum.body;"
tal:attributes="ondblclick python: item.openEditWindow('configure.html')">
<tal:actions condition="view/showObjectActions">
<div metal:use-macro="views/node_macros/object_actions" />
</tal:actions>
<h1><a tal:omit-tag="python: level > 1"
tal:attributes="href view/requestUrl"
tal:content="item/title">Title</a></h1>
<tal:desc define="description description|item/renderedDescription"
condition="description">
<div class="description"
tal:content="structure description">Description</div>
</tal:desc>
<metal:fields define-slot="fields" />
<div class="content-1" id="1.body"
tal:attributes="id id;"
tal:content="structure item/render">
The body
</div>
</div>
<metal:fields use-macro="view/comment_macros/comments" />
</metal:block>
<metal:block define-macro="render_note">
<metal:block tal:define="description nothing">
<metal:render use-macro="item/template/macros/render_base" />
</metal:block>
<div class="content-1" id="1.link"
tal:define="linkUrl item/linkUrl"
tal:condition="python: linkUrl and linkUrl != 'http://'">
<b>
<a href="."
i18n:translate=""
tal:attributes="href linkUrl"
tal:define="linkText item/adapted/linkText|nothing"
tal:content="python: linkText or 'more...'">more...</a>
</b>
<metal:fields use-macro="view/comment_macros/comments" />
</div>
</metal:block>
<metal:block define-macro="image">
<div tal:attributes="ondblclick python: item.openEditWindow('edit.html')">
<div metal:use-macro="views/node_macros/object_actions" />
<h1><a tal:omit-tag="python: level > 1"
tal:attributes="href view/requestUrl"
tal:content="item/title">Title</a></h1><br />
<img tal:attributes="src
string:${view/url}/.${view/targetId}/view?version=this" />
<div class="description"
tal:content="structure item/renderedDescription">Description</div>
<metal:fields use-macro="view/comment_macros/comments" />
</div>
</metal:block>
<metal:block define-macro="download">
<div tal:attributes="ondblclick python: item.openEditWindow('edit.html')">
<div metal:use-macro="views/node_macros/object_actions" />
<h1 tal:content="item/title">Title</h1>
<div class="description"
tal:content="structure item/renderedDescription">Description</div>
<br />
<div>
<span class="button">
<a i18n:translate=""
target="_blank"
tal:attributes="href
string:${view/virtualTargetUrl}/download.html?version=this">
Download
</a>
</span>
<span class="button"
tal:define="viewable item/viewable|nothing"
tal:condition="python: viewable and not view.typeOptions('no_view_button')">
<a i18n:translate=""
tal:attributes="href
string:${view/virtualTargetUrl}/view?version=this">
View
</a>
</span>
<span class="button"
tal:condition="item/xeditable">
<a title="Edit with external editor"
i18n:translate="" i18n:attributes="title"
tal:define="url view/virtualTargetUrl"
tal:attributes="href string:$url/external_edit?version=this">
Open for editing
</a>
</span>
</div>
<metal:custom define-slot="custom_info" />
<metal:fields use-macro="view/comment_macros/comments" />
</div>
</metal:block>
<form action="." method="post"
metal:define-macro="delete_object"
tal:define="action view/deleteObjectAction|nothing"
tal:condition="action"
tal:attributes="action action"
id="form.object.delete">
<span class="actionButtons"><br />
<input type="hidden" name="ids:list" value="obj"
tal:attributes="value context/zope:name" />
<input type="submit" id="object.delete"
name="container_delete_button"
value="Delete object" class="button"
onclick="return confirm('Do you really want to delete this object?')" />
</span>
</form>
<metal:actions define-macro="related">
<div tal:repeat="concept macro/info/conceptsForPortlet">
<a tal:attributes="href python: view.getUrlForTarget(concept);
title concept/relationInfo">
<span i18n:translate="" tal:content="concept/title">Concept</span>
(<i i18n:translate="" tal:content="concept/typeTitle">Type</i>)
</a>
</div>
</metal:actions>
</html>