{% load proto_tags tree_menu_tags %}

{% ifequal menu_type "unordered-list" %}
    <ul>
        {% for menu_item in menu.root_item.children %}
            {% show_menu_item menu_item %}
        {% endfor %}
    </ul>
{% endifequal %}
{% ifequal menu_type "ordered-list" %}
    {% for menu_item in menu.root_item.children %}
        {% menu_has_permission menu_item as permitted %}
        {% if permitted and menu_item.extension.visivel %}
            <div class="module-header">
                <a href="#" class="modal-call-header " app="menu-{{menu_item.caption}}">{{ menu_item.caption}}</a>
                
                <div class="modal-box" id="mod-menu-{{menu_item.caption}}" style="display:none;">
                    <h2>{{menu_item.caption}}</h2><a class="modal-close" title="Fechar" name="fechar" >fechar</a>
                    <table summary="Models available in the {{ menu_item.caption }} application.">
                       {% show_menu_item menu_item %}
                    </table>
                </div>
            </div>
        {% endif %}
    {% endfor %}
{% endifequal %}