summaryrefslogtreecommitdiff
path: root/app/lib/grappelli/templates/admin_tools/menu/item.html
blob: 9bf8bbdb30bdbc824f8b32fdb9cf4990f38e8ae1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{% load admin_tools_menu_tags %}
{% spaceless %}
{% if not item.is_empty %}
    <li class="menu-item{% if item.children %} parent{% if index %} collapse closed{% else %} item-collapse item-closed{% endif %}{% endif %}{% if not item.enabled %} disabled{% endif %}{% if selected %} selected{% endif %}{% if forloop.last %} last{% endif %}{% if item.css_classes %} {{ item.css_classes|join:' ' }}{% endif %}">
        <a href="{% if item.url and item.enabled %}{{ item.url }}{% else %}#{% endif %}" class="{% if item.children %}parent{% if index %} collapse-handler{% else %} item-collapse-handler-container{% endif %}{% endif %}" {% if item.description %} title="{{ item.description }}"{% endif %}{% if item.accesskey %} accesskey="{{ item.accesskey }}"{% endif %}>{{ item.title }}</a>{% if item.children %}{% if not index %}<a href="javascript://" class="icon item-collapse-handler"></a>{% endif %}{% endif %}
        {% if item.children %}
            <ul>
                {% for child_item in item.children %}
                    {% admin_tools_render_menu_item child_item %}
                {% endfor %}
            </ul>
        {% endif %}
    </li>
{% endif %}
{% endspaceless %}