2021-09-14 10:59:19 +00:00
|
|
|
{%- macro renderDescendantList(descendants, descendantType, recursed, docTypeMatcher) -%}
|
|
|
|
|
{%- if descendants.length %}
|
2018-02-08 15:00:53 +00:00
|
|
|
<ul>
|
2021-09-14 10:59:19 +00:00
|
|
|
{%- for descendant in descendants %}
|
|
|
|
|
<li>
|
|
|
|
|
<code>{$ descendant.name $}</code>
|
|
|
|
|
{$ renderDescendantList(descendant.descendants | filterByPropertyValue('docType', docTypeMatcher) | filterByPropertyValue('privateExport', undefined), docType, recursed, docTypeMatcher) $}
|
|
|
|
|
</li>
|
|
|
|
|
{%- endfor %}
|
2018-02-08 15:00:53 +00:00
|
|
|
</ul>
|
2021-09-14 10:59:19 +00:00
|
|
|
{%- endif -%}
|
|
|
|
|
{%- endmacro %}
|
2018-02-08 15:00:53 +00:00
|
|
|
|
2021-09-14 10:59:19 +00:00
|
|
|
{%- macro renderDescendants(doc, descendantType, title='', recursed=true, docTypeMatcher=descendantType) -%}
|
|
|
|
|
{%- set descendants = doc.descendants | filterByPropertyValue('docType', docTypeMatcher) | filterByPropertyValue('privateExport', undefined) -%}
|
|
|
|
|
{%- if descendants.length %}
|
2018-09-20 11:58:10 +00:00
|
|
|
<div class="descendants {$ descendantType $}">
|
2021-09-14 10:59:19 +00:00
|
|
|
{%- if title %}
|
|
|
|
|
<h2>{$ title $}</h2>{% endif %}
|
2018-09-20 11:58:10 +00:00
|
|
|
{$ renderDescendantList(descendants, descendantType, recursed, docTypeMatcher) $}
|
2018-02-08 15:00:53 +00:00
|
|
|
</div>
|
2021-09-14 10:59:19 +00:00
|
|
|
{%- endif -%}
|
|
|
|
|
{%- endmacro %}
|