accessible_panels template variable in openstack horizon juno

43 Views Asked by At

I am in the process of customizing the Horizon Juno interface and wanted to know about a particular template variable called "accessible_panels".

This variable is in the horizon/templates/horizon/_subnav_list.html template.

I cannot find accessible_panels to be defined anywhere in the codebase and I was wondering what this variable is used for.

Currently it comes up empty for me and as a result some of the panels I want to show do not show up. If I comment it out everything works.

The code for the template is below:

{% load horizon %}

{% for heading, panels in components.iteritems %}
  {% 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 %}

My understanding of django templates tells me that this variable has to be defined somewhere but I cannot find it.

Hope someone has worked with this and can help me.

Cheers, nav

0

There are 0 best solutions below