2018-02-08 10:00:53 -05:00
|
|
|
{% macro renderDescendantList(descendants, docType, recursed) %}
|
|
|
|
{% if descendants.length %}
|
|
|
|
<ul>
|
2017-09-25 14:59:44 -04:00
|
|
|
{% for descendant in descendants %}
|
|
|
|
<li>
|
2018-02-08 10:00:53 -05:00
|
|
|
<code>{$ descendant.name $}</code>
|
|
|
|
{$ renderDescendantList(descendant.descendants | filterByPropertyValue('docType', docType), docType, recursed) $}
|
2017-09-25 14:59:44 -04:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
2018-02-08 10:00:53 -05:00
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro -%}
|
|
|
|
|
|
|
|
{%- macro renderDescendants(doc, docType, title='', recursed=true) %}
|
|
|
|
{% set descendants = doc.descendants | filterByPropertyValue('docType', docType) %}
|
|
|
|
{% if descendants.length %}
|
|
|
|
<div class="descendants {$ docType $}">
|
|
|
|
{% if title %}<h2>{$ title $}</h2>{% endif %}
|
|
|
|
{$ renderDescendantList(descendants, docType, recursed) $}
|
|
|
|
</div>
|
2017-09-25 14:59:44 -04:00
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|