-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnamespaces.html.twig
34 lines (29 loc) · 1 KB
/
namespaces.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{% extends 'layout.html.twig' %}
{% macro parent_links(parent, indent) %}
<dd style="padding-left:{{ indent }}px">
{% if indent > 0 %}
<img src="imgs/inherit.png" alt="Extended by">
{% endif %}
<a href="{{ link(parent) }}">{{ parent.fullyQualifiedStructuralElementName }}</a>
</dd>
{% for namespace in project.indexes.namespaces %}
{% if namespace.parent.name == parent.name %}
{{ _self.parent_links(namespace, indent+30) }}
{% endif %}
{% endfor %}
{% endmacro %}
{% block content %}
<h3 id="namespaces">
Namespaces
<a href="#namespaces" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
{% if project.indexes.namespaces|default([]) is not empty %}
<dl class="tree">
{% for namespace in project.indexes.namespaces|sortByVisibility %}
{% if namespace.name == '\\' %}
{{ _self.parent_links(namespace, 0) }}
{% endif %}
{% endfor %}
</dl>
{% endif %}
{% endblock %}