{% extends "pos/base.html" %}
{% load django_bootstrap_breadcrumbs %}
{% load crispy_forms_tags %}
{% load bootstrap_pagination %}
{% load mptt_tags %}

{% block breadcrumbs %}
    {{ block.super }}
    {% breadcrumb "UIMenu" "pos:adminUIMenuList" %}
{% endblock %}

{% block content %}
<h1>UIMenu List</h1>
{% include "pos/_filter.html" with filters=filters %}
<hr/>
<a href='{% url  'pos:UIMenuCreate' %}' class='btn btn-primary'>Create Menu Item</a><br>
<h1>Primary</h1>
<ul class="root">
    {% recursetree primaryMenu %}
    <li>
        <a href='{% url "pos:UIMenuEdit" oid=node.id %}'>{{ node.name }}</a>
        {% if not node.is_leaf_node %}
        <ul class="children">
            {{ children }}
        </ul>
        {% endif %}
    </li>
    {% endrecursetree %}
</ul>
<h1>Footer 1</h1>
<ul class="root">
    {% recursetree footer1Menu %}
    <li>
        <a href='{% url "pos:UIMenuEdit" oid=node.id %}'>{{ node.name }}</a>
        {% if not node.is_leaf_node %}
        <ul class="children">
            {{ children }}
        </ul>
        {% endif %}
    </li>
    {% endrecursetree %}
</ul>
<h1>Footer 2</h1>
<ul class="root">
    {% recursetree footer2Menu %}
    <li>
        <a href='{% url "pos:UIMenuEdit" oid=node.id %}'>{{ node.name }}</a>
        {% if not node.is_leaf_node %}
        <ul class="children">
            {{ children }}
        </ul>
        {% endif %}
    </li>
    {% endrecursetree %}
</ul>
{% endblock %}
