Sistema de Informações Gerenciais do Interlegis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

47 lines
1.8 KiB

{% load menus sigi_tags %}
{% for menu in menu_items %}
{% if menu.children %}
<li class="scrollspy">
<div class="collapsible-header">
<i class="material-icons" aria-hidden="true">{% if menu.icon %}{{ menu.icon }}{% else %}settings{% endif %}</i>
{{ menu.title }}
</div>
<div class="collapsible-body">
{% for child in menu.children %}
{% if child.view_name %}
{% if child.view_param %}
{% url child.view_name child.view_param as item_url%}
{% else %}
{% url child.view_name as item_url %}
{% endif %}
{% if 'before' in child.separator %}
<hr/>
{% endif %}
<div{% if item_url in request.path and child.querystr == None or child.querystr in request.get_full_path %} class="active"{% endif %}>
<a href="{{ item_url }}{% if child.querystr %}?{{ child.querystr }}{% endif %}">{{ child.title }}</a>
</div>
{% if 'after' in child.separator %}
<hr/>
{% endif %}
{% else %}
{% if 'before' in child.separator %}
<hr/>
{% endif %}
<div class="disabled"><a href="#" class="disabled">{{ child.title }}</a></div>
{% if 'after' in child.separator %}
<hr/>
{% endif %}
{% endif %}
{% endfor %}
</div>
</li>
{% else %}
{% url menu.view_name as item_url %}
<div{% if item_url in request.path %} class="active"{% endif %}>
<li>
<i class="material-icons" aria-hidden="true">{% if menu.icon %}{{ menu.icon }}{% else %}settings{% endif %}</i>
<a href="{{ item_url }}{% if menu.querystr %}?{{ menu.querystr }}{% endif %}">{{ menu.title }}</a>
</li>
</div>
{% endif %}
{% endfor %}