~ubuntu-branches/ubuntu/trusty/horizon/trusty-updates

« back to all changes in this revision

Viewing changes to horizon/templates/horizon/_accordion_nav.html

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-03-06 16:53:28 UTC
  • mfrom: (1.1.37)
  • Revision ID: package-import@ubuntu.com-20140306165328-w2vgmtfriqlhp27m
Tags: 1:2014.1~b3-0ubuntu1
* New upstream milestone release.
* d/static/*: Refreshed assets for new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{% load horizon i18n %}
 
2
{% load url from future %}
 
3
 
 
4
<div>
 
5
  <dl class="nav_accordion">
 
6
  {% for dashboard, panel_info in components %}
 
7
    {% if user|has_permissions:dashboard %}
 
8
      {% if dashboard.supports_tenants and request.user.authorized_tenants or not dashboard.supports_tenants %}
 
9
        <dt {% if current.slug == dashboard.slug %}class="active"{% endif %}>
 
10
          <div>{{ dashboard.name }}</div>
 
11
        </dt>
 
12
        {% if current.slug == dashboard.slug %}
 
13
        <dd>
 
14
        {% else %}
 
15
        <dd style="display:none;">
 
16
        {% endif %}
 
17
        {% for heading, panels in panel_info.iteritems %}
 
18
          {% with panels|has_permissions_on_list:user as filtered_panels %}
 
19
          {% if filtered_panels %}
 
20
            {% if heading %}
 
21
            <div><h4><div>{{ heading }}</div></h4>
 
22
            {% endif %}
 
23
            <ul>
 
24
            {% for panel in filtered_panels %}
 
25
              <li><a href="{{ panel.get_absolute_url }}" {% if current.slug == dashboard.slug and current_panel == panel.slug %}class="active"{% endif %} >{{ panel.name }}</a></li>
 
26
            {% endfor %}
 
27
            </ul>
 
28
            {% if heading %}
 
29
              </div>
 
30
            {% endif %}
 
31
          {% endif %}
 
32
          {% endwith %}
 
33
        {% endfor %}
 
34
        </dd>
 
35
      {% endif %}
 
36
    {% endif %}
 
37
  {% endfor %}
 
38
  </dl>
 
39
</div>
 
40