43 lines
1.4 KiB
HTML
43 lines
1.4 KiB
HTML
{% load horizon i18n %}
|
|
{% load url from future %}
|
|
|
|
<dl class="nav_accordion">
|
|
{% for dashboard, panel_info in components %}
|
|
{% if user|has_permissions:dashboard %}
|
|
{% if dashboard.supports_tenants and request.user.authorized_tenants or not dashboard.supports_tenants %}
|
|
<dt {% if current.slug == dashboard.slug %}class="active"{% endif %}>
|
|
{{ dashboard.name }}
|
|
<span class="glyphicon pull-right"></span>
|
|
</dt>
|
|
{% if current.slug == dashboard.slug %}
|
|
<dd>
|
|
{% else %}
|
|
<dd style="display:none;">
|
|
{% endif %}
|
|
{% for heading, panels in panel_info.iteritems %}
|
|
{% with panels|has_permissions_on_list:user as filtered_panels %}
|
|
{% if filtered_panels %}
|
|
{% if heading %}
|
|
<div>
|
|
<h4>
|
|
{{ heading }}
|
|
<span class="glyphicon pull-right"></span>
|
|
</h4>
|
|
{% endif %}
|
|
<ul>
|
|
{% for panel in filtered_panels %}
|
|
<li><a href="{{ panel.get_absolute_url }}" {% if current.slug == dashboard.slug and current_panel == panel.slug %}class="active"{% endif %} tabindex="{{ forloop.counter }}" >{{ panel.name }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% if heading %}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% endfor %}
|
|
</dd>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</dl>
|