{% load horizon %}

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