Tomas "Jethro" Pokorny
5 years ago
8 changed files with 98 additions and 22 deletions
@ -1,11 +1,17 @@ |
|||
{% load treenodes %} |
|||
{% if obj.node|appendableChildren %} |
|||
{% if kam_slug == "syn" %} |
|||
{% appendableChildren obj as dostupne_typy %} |
|||
{% else %} |
|||
{% appendableChildren obj.parent as dostupne_typy %} |
|||
{% endif %} |
|||
|
|||
{% if dostupne_typy %} |
|||
<div class="pink">Přidat {{kam}} |
|||
<select> |
|||
{% for chld in obj.node|appendableChildren %} |
|||
<option value="{{chld.0}}">{{chld.1}}</option> |
|||
<select name="pridat-typ-{{obj.node.id}}-{{kam_slug}}"> |
|||
{% for typ in dostupne_typy %} |
|||
<option value="{{typ.0}}">{{typ.1}}</option> |
|||
{% endfor %} |
|||
</select> |
|||
<button action="submit" formaction="{%url 'treenode_pridat' obj.node.id%}">Přidat</button> |
|||
<button action="submit" formaction="{%url 'treenode_pridat' obj.node.id kam_slug%}">Přidat</button> |
|||
</div> |
|||
{% endif %}{# appendablebleChildren #} |
|||
|
Loading…
Reference in new issue