loops/browser/concept_macros.pt
helmutm 0c789f3966 basic versioning OK, including search, versions portlet
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1658 fd906abe-77d9-0310-91a1-e0d9ade77398
2007-03-22 17:01:41 +00:00

155 lines
6 KiB
XML

<metal:data define-macro="conceptdata">
<div tal:attributes="class string:content-$level;">
<metal:fields use-macro="item/template/macros/concepttitle" />
<metal:fields use-macro="item/template/macros/conceptfields" /><br />
<metal:fields use-macro="item/template/macros/conceptchildren" /><br />
<metal:fields use-macro="item/template/macros/conceptresources" />
</div>
</metal:data>
<metal:title define-macro="concepttitle">
<h1 tal:attributes="ondblclick item/openEditWindow">
<span tal:content="item/title">Title</span>
</h1>
</metal:title>
<metal:fields define-macro="conceptfields">
<table tal:attributes="ondblclick item/openEditWindow">
<tr tal:repeat="field item/fieldData">
<td><span tal:content="field/title"
i18n:translate="" />:</td>
<td tal:content="structure field/widget"></td>
</tr>
</table>
</metal:fields>
<metal:parents define-macro="conceptparents">
<div tal:attributes="class string:content-$level;
ondblclick python: item.openEditWindow('configure.html')">
<h2>Parents</h2>
<div tal:repeat="related item/parents">
<a href="#"
tal:attributes="href string:${view/url}/.target${related/uniqueId}"
tal:content="related/title">Concept Title</a>
</div>
</div>
</metal:parents>
<metal:children define-macro="conceptchildren">
<div tal:attributes="class string:content-$level;
ondblclick python: item.openEditWindow('configure.html')"
tal:define="children python: list(item.children())"
tal:condition="children">
<h2>Children</h2><br />
<table class="listing">
<tr>
<th>Title</th>
<th>Type</th>
<th>Modification Date</th>
</tr>
<tal:items repeat="related children">
<tal:item define="class python: repeat['related'].odd() and 'even' or 'odd'">
<tr tal:attributes="class class">
<td valign="top">
<a href="#"
tal:attributes="href string:${view/url}/.target${related/uniqueId}">
<span tal:replace="related/title">Resource Title</span>
</a>
</td>
<td><span tal:replace="related/typeTitle">Type</span></td>
<td><span tal:replace="related/modified">Type</span></td>
</tr>
<tr tal:define="description related/description"
tal:condition="description"
tal:attributes="class class">
<td colspan="3" style="padding-left: 7em">
<i tal:content="description">describing...</i>
</td>
</tr>
</tal:item>
</tal:items>
</table>
</div>
</metal:children>
<metal:resources define-macro="conceptresources">
<div tal:attributes="class string:content-$level;
ondblclick python: item.openEditWindow('resources.html')"
tal:define="resources python: list(item.resources())"
tal:condition="resources">
<h2>Resources</h2><br />
<table class="listing">
<tr>
<th i18n:translate="label_title">Title</th>
<th i18n:translate="label_type">Type</th>
<th i18n:translate="label_version">V</th>
<th i18n:translate="label_size">Size</th>
<th i18n:translate="label_modifdate">Modification Date</th>
</tr>
<tal:items repeat="related resources">
<tal:item define="class python: repeat['related'].odd() and 'even' or 'odd';
description related/description">
<tr tal:attributes="class class">
<td valign="top">
<a href="#"
tal:attributes="href string:${view/url}/.target${related/uniqueId};
title description">
<span tal:replace="related/title">Resource Title</span>
</a>
</td>
<td><span tal:replace="related/longTypeTitle">Type</span></td>
<td style="text-align: center"
tal:define="versionId related/versionId">
<a href="#"
tal:content="versionId"
tal:omit-tag="python: versionId=='1.1'"
tal:attributes="href string:${view/url}/.target${related/uniqueId}?loops.viewName=listversions">1.1</a>
</td>
<td style="text-align: right">
<span tal:replace="related/context/sizeForDisplay">Type</span>
</td>
<td><span tal:replace="related/modified">Type</span></td>
</tr>
<tr tal:condition="nothing"
tal:attributes="class class">
<td colspan="4" style="padding-left: 7em">
<i tal:content="description">describing...</i>
</td>
</tr>
</tal:item>
</tal:items>
</table>
</div>
</metal:resources>
<metal:listing define-macro="conceptlisting">
<div>
<metal:fields use-macro="item/template/macros/concepttitle" />
<metal:listing define-macro="conceptlisting2">
<metal:fields use-macro="item/template/macros/conceptparents" />
<metal:fields use-macro="item/template/macros/conceptchildren" />
<metal:fields use-macro="item/template/macros/conceptresources" />
</metal:listing>
</div>
</metal:listing>
<!-- portlets -->
<metal:actions define-macro="parents">
<div tal:repeat="concept macro/info/parents">
<a href="#"
tal:attributes="href string:${view/url}/.target${concept/uniqueId}">
<span tal:replace="concept/title">Concept</span>
(<i tal:content="concept/typeTitle">Type</i>)
</a>
</div>
</metal:actions>