list nested concept structure, controlled by URL parameter 'list_nested'

This commit is contained in:
Helmut Merz 2013-10-03 11:26:28 +02:00
parent a085da0050
commit b24619fcd7

View file

@ -138,7 +138,8 @@
<metal:children define-macro="conceptchildren">
<div tal:attributes="class string:content-$level;
ondblclick python: item.openEditWindow('configure.html')"
tal:define="children python: list(item.unique(item.children()))"
tal:define="list_nested request/list_nested|nothing;
children children|python:list(item.unique(item.children()))"
tal:condition="children">
<h2 i18n:translate=""
tal:condition="show_headline|python:True">Children</h2>
@ -171,7 +172,7 @@
<td valign="top">
<a tal:attributes="href python: view.getUrlForTarget(related);
title related/relationInfo">
<span tal:replace="related/title">Resource Title</span>
<span tal:replace="related/title">Concept Title</span>
</a>
</td>
<td class="center"><span tal:content="related/typeTitle"
@ -188,6 +189,14 @@
tal:attributes="value related/uidToken" />
</td>
</tr>
<tr tal:define="children python:list(related.unique(related.children()));
resources python:list(related.resources())"
tal:condition="python:list_nested and (children or resources)">
<td tal:condition="item/showCheckboxes|nothing" />
<td colspan="5">
<metal:list use-macro="item/template/macros/list_nested" />
</td>
</tr>
</tal:item>
</tal:items>
</tbody>
@ -329,6 +338,20 @@
</metal:listing>
<metal:listing define-macro="list_nested">
<div style="margin-left: 20px"
tal:define="item nocall:related;
level python:level + 1">
<tal:children condition="children">
<metal:list use-macro="item/template/macros/conceptchildren" />
</tal:children>
<tal:resources condition="resources">
<metal:list use-macro="item/template/macros/conceptresources" />
</tal:resources>
</div>
</metal:listing>
<!-- portlets -->
<metal:actions define-macro="parents">