68 lines
2.2 KiB
HTML
68 lines
2.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% set config = graph.meta.config %}
|
|
|
|
{% block title %}Tree{% endblock title %}
|
|
|
|
{%- block body %}
|
|
{% if nodes or root_node %}
|
|
<h1>Tree</h1>
|
|
<ul>
|
|
{% if root_node and not root_node.hidden %}
|
|
<li>
|
|
<a href="/node/{{root_node.id}}">{{root_node.title}}</a>
|
|
<span class="label root-label">Root</span>
|
|
{% if root_node.connections or config.tree_node_summary %}
|
|
<ul>
|
|
{% if config.tree_node_summary %}
|
|
<li class="tree-node-summary">
|
|
{{root_node.summary}}
|
|
</li>
|
|
{% endif %}
|
|
{% if root_node.connections %}
|
|
{% if config.tree_node_summary %}<li><strong>Connections</strong>
|
|
<ul>{% endif %}
|
|
{% for _, connection in root_node.connections %}
|
|
{% if not connection.detached %}
|
|
<li><a href="/node/{{connection.to}}">{{connection.to}}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% if config.tree_node_summary %}</ul>
|
|
</li>{% endif %}
|
|
{% endif %}
|
|
</ul>
|
|
{% endif %}
|
|
</li>
|
|
{% endif %}
|
|
{% for node in nodes %}
|
|
{% if node.hidden %}{% continue %}{% endif %}
|
|
<li>
|
|
<a href="/node/{{node.id}}">{{node.title}}</a>
|
|
{% if node.connections or config.tree_node_summary %}
|
|
<ul>
|
|
{% if config.tree_node_summary %}
|
|
<li class="tree-node-summary">
|
|
{{node.summary}}
|
|
</li>
|
|
{% endif %}
|
|
{% if node.connections %}
|
|
{% if config.tree_node_summary %}<li><strong>Connections</strong>
|
|
<ul>{% endif %}
|
|
{% for _, connection in node.connections %}
|
|
{% if not connection.detached %}
|
|
<li><a href="/node/{{connection.to}}">{{connection.to}}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% if config.tree_node_summary %}</ul>
|
|
</li>{% endif %}
|
|
{% endif %}
|
|
</ul>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{% else %}
|
|
{% include "empty.html" %}
|
|
{% endif %}
|
|
{%- endblock body %}
|