diff options
author | Matthias Runge <mrunge@redhat.com> | 2014-11-11 14:47:47 +0100 |
---|---|---|
committer | Matthias Runge <mrunge@redhat.com> | 2014-11-25 14:43:29 +0100 |
commit | 8e3950a19c244cbb253b34ef1cd46c86b952cc14 (patch) | |
tree | 274c425b034dd95d2dbc0164a1c38d55bbcb4450 /horizon/templatetags | |
parent | 9f904e3935e75306f5beb232dd14fb4bcb281f09 (diff) | |
download | horizon-8e3950a19c244cbb253b34ef1cd46c86b952cc14.tar.gz |
Fix dashboard nav, when panelgroup empty
The identity dashboard breaks with a common pattern
and doesn't use a panel group to group panels. When not
using accordion navigation, the last level of navigation is
not shown at all.
Change-Id: Ic76611009eac30658d0af082b0e46cd8f2da1832
Closes-Bug: #1391524
Diffstat (limited to 'horizon/templatetags')
-rw-r--r-- | horizon/templatetags/horizon.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/horizon/templatetags/horizon.py b/horizon/templatetags/horizon.py index f798b4a13..76b13fd87 100644 --- a/horizon/templatetags/horizon.py +++ b/horizon/templatetags/horizon.py @@ -116,7 +116,10 @@ def horizon_dashboard_nav(context): panel.can_access(context)): allowed_panels.append(panel) if allowed_panels: - non_empty_groups.append((group.name, allowed_panels)) + if group.name is None: + non_empty_groups.append((dashboard.name, allowed_panels)) + else: + non_empty_groups.append((group.name, allowed_panels)) return {'components': SortedDict(non_empty_groups), 'user': context['request'].user, |