Skip to content

Instantly share code, notes, and snippets.

@lookonkz
Created September 10, 2020 05:32
{% recursetree divisions %}
<h1>
<img src="{% static 'images/arrow.png' %}">
{% if perms.core.delete_division %}
<input type="checkbox" name="selected-divisions" value="{{ node.pk }}">
{% endif %}
<span>
{{ node.name }}
{% if node.status %}
<span class="division__star">
<i class="mdi mdi-star"></i></span>
{% endif %}
</span>
{% if perms.core.change_division %}
<span>
<a href="{% url 'core:division_edit' node.pk %}" class="division__edit" id="button_click_a">
<i class="mdi mdi-file-document-edit-outline"></i>
</a>
</span>
{% endif %}
</h1>
{% if not node.is_leaf_node %}
<div class="toggle-t">
{{ children }}
</div>
{% endif %}
{% endrecursetree %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment