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