Web M&M
https://mam.matfyz.cz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.1 KiB
56 lines
2.1 KiB
5 years ago
|
{% load treenodes %}
|
||
|
{# <b>{{depth}}</b> #}
|
||
5 years ago
|
<div class="borderized parent">
|
||
|
<div class="node_type">
|
||
5 years ago
|
{{obj.node}}
|
||
5 years ago
|
{{obj.node.id}}
|
||
5 years ago
|
{% if obj.node|deletable %}
|
||
5 years ago
|
<button type="submit" formaction="{%url 'treenode_smazat' obj.node.id%}">Smazat</button>
|
||
5 years ago
|
{% endif %}
|
||
|
{% if obj.parent and obj.parent|editableSiblings %}
|
||
5 years ago
|
<button type="submit" formaction="{%url 'treenode_odvesitpryc' obj.node.id%}">Odvěsit pryč ze stromu {{obj.parent.node}}</button>
|
||
5 years ago
|
{% endif %}
|
||
|
{% if obj|canPodvesitPred %}
|
||
5 years ago
|
<button type="submit" formaction="{%url 'treenode_podvesit' obj.node.id 'pred'%}">Podvěsit pod předchozí</button> - nejsou testovací data
|
||
5 years ago
|
{% endif %}
|
||
|
{% if obj|canPodvesitZa %}
|
||
5 years ago
|
<button type="submit" formaction="{%url 'treenode_podvesit' obj.node.id 'za'%}">Podvěsit pod následující</button> - nejsou testovací data
|
||
5 years ago
|
{% endif %}
|
||
|
|
||
|
|
||
5 years ago
|
</div>
|
||
5 years ago
|
{% if False %}
|
||
|
<div class="node_move">
|
||
|
FIXME: není zatím implementováno
|
||
|
<button>Zvyš úroveň nadpisu</button> - nejsou testovací data
|
||
|
</div>
|
||
5 years ago
|
{% endif %}
|
||
5 years ago
|
{% include "seminar/treenode_name.html" %}
|
||
5 years ago
|
{%if obj.children %}
|
||
5 years ago
|
<div class="borderized children">
|
||
|
|
||
5 years ago
|
{% with kam="před" kam_slug="syn" %} {% include "seminar/treenode_add_stub.html" %} {% endwith %}
|
||
5 years ago
|
{%for ch in obj.children %}
|
||
|
|
||
|
{# ----------- Vypisujeme podstrom ----------#}
|
||
5 years ago
|
{%with obj=ch depth=depth|add:"1" %} {%include "seminar/treenode_recursive.html" %} {%endwith%}
|
||
5 years ago
|
{# ----------- Přidáváme mezi syny / za posledního -------- #}
|
||
5 years ago
|
{% if forloop.last %}
|
||
5 years ago
|
{% with kam="za" kam_slug="za" obj=ch %} {% include "seminar/treenode_add_stub.html" %} {% endwith %}
|
||
5 years ago
|
{% else %}
|
||
5 years ago
|
{% with kam="mezi" obj=ch kam_slug="za" %} {% include "seminar/treenode_add_stub.html" %} {% endwith %}
|
||
5 years ago
|
{% endif %}
|
||
|
{# ----------- Prohazujeme sousedy ----------#}
|
||
5 years ago
|
<div class="pink">
|
||
|
{% if not forloop.last and ch|editableSiblings %}
|
||
5 years ago
|
<button type="submit" formaction="{%url 'treenode_prohodit' ch.node.id%}">Prohodit ^ a v</button>
|
||
5 years ago
|
{% endif %}
|
||
|
</div>
|
||
|
{% endfor %}
|
||
5 years ago
|
</div>
|
||
5 years ago
|
{% else %}
|
||
|
{# ----------- Přidáváme prvního syna ----------#}
|
||
5 years ago
|
{% with kam="jako syna" kam_slug="syn" %} {% include "seminar/treenode_add_stub.html" %} {% endwith %}
|
||
5 years ago
|
{%endif%}
|
||
5 years ago
|
</div>
|