Simplify handler contexts, template and style tweaks
This commit is contained in:
parent
75f50d6ed1
commit
940aadb6e5
14 changed files with 176 additions and 110 deletions
|
|
@ -9,46 +9,52 @@
|
|||
<div class="labels">
|
||||
{% if node.title != node.id %}<span class="label id-label">ID: {{ node.id }}</span>{% endif %}
|
||||
{% if node.hidden %}<span class="label hidden-label">Hidden</span>{% endif %}
|
||||
{% if node.id == graph.root_node %}<span class="label root-label">Root</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{{ node.text | safe }}
|
||||
</section>
|
||||
{% if connections or incoming %}
|
||||
<aside>
|
||||
<hr>
|
||||
{% if node.connections or incoming %}
|
||||
<aside class="connections">
|
||||
<hr class="connections">
|
||||
<h2>Connections</h2>
|
||||
{% if connections %}
|
||||
<div class="connections-container">
|
||||
{% if node.connections %}
|
||||
<div class="connections-outgoing">
|
||||
<h3>Outgoing</h3>
|
||||
<ul>
|
||||
{% for connection in connections | filter(attribute="detached", value=false) %}
|
||||
{% for _, connection in node.connections %}
|
||||
{% if connection.detached %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
<li>
|
||||
<strong>{{node.id}}</strong>
|
||||
»
|
||||
<a href="/node/{{connection.to}}">{{connection.to}}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for connection in connections | filter(attribute="detached", value=true) %}
|
||||
{% for _, connection in node.connections %}
|
||||
{% if not connection.detached %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
<li>
|
||||
<strong>{{node.id}}</strong>
|
||||
»
|
||||
<span class="detached-connection">{{connection.to}}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<em>No outgoing connections.</em>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if incoming %}
|
||||
<h3>Incoming connections</h3>
|
||||
<div class="connections-incoming">
|
||||
<h3>Incoming</h4>
|
||||
<ul>
|
||||
{% for connection in incoming %}
|
||||
<li>
|
||||
<strong>{{connection.to}}</strong>
|
||||
«
|
||||
<a href="/node/{{connection.from}}">{{connection.from}}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</aside>
|
||||
{% endif %}
|
||||
{%- endblock body %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue