summaryrefslogtreecommitdiff
path: root/horizon/templates/horizon/_subnav_list.html
blob: c4d80015036e711bf58aef18ef6490e834fee3b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{% load horizon %}

{% for heading, panels in components.items %}
  {% with panels|has_permissions_on_list:user as filtered_panels %}
    {% if filtered_panels %}
      {% if accessible_panels %}
        {% if heading %}<h4>{{ heading }}</h4>{% endif %}
      {% endif %}
      <ul class="main_nav">
        {% for panel in filtered_panels %}
          {% if panel in accessible_panels or current == panel.slug %}
            <li>
              <a href="{{ panel.get_absolute_url }}" {% if current == panel.slug %}class="active"{% endif %} tabindex='1'>{{ panel.name }}</a>
            </li>
          {% endif %}
        {% endfor %}
      </ul>
    {% endif %}
  {% endwith %}
{% endfor %}