horizon/openstack_dashboard/templates/header/_context_selection.html
Diana Whitten 0bfca75f45 Context Picker should inherit BS dropdown styles
The first step in the dynamic theme effort requires that the context
selection picker inherit properly from a dropdown menu, so that the
styles can be shared and the experience is matched.

Dynamic themes will use the 'select' experience of the context menu
but from within the user menu, so it was necessary to match the
experiences to minimize duplicated code.

The style of the context menu was extremely dependant on DOM structure
and therefore difficult to customize. This has been simplified by using
classes and attempting to keep specificity as low as possible.

Change-Id: Idb9e8f5c1d246688418f68e12fb53f094c01ea34
Partially-implements: blueprint horizon-dynamic-theme
Partially-Implements: blueprint bootstrap-html-standards
2016-02-10 04:23:15 +00:00

43 lines
1.1 KiB
HTML

{% load context_selection %}
{% if not_list %}
<div class="dropdown">
{% else %}
<li class="dropdown">
{% endif %}
<a class="dropdown-toggle{% if not_list %} btn btn-primary{% endif %}" role="button" aria-expanded="false" data-toggle="dropdown" href="#">
{% show_overview %}
<span class="fa fa-caret-down"></span>
</a>
<ul class="dropdown-menu context-selection selection-menu">
{% comment %}
is_multidomain is only available through an assignment tag pulled in through context_selection
{% endcomment %}
{% is_multidomain as domain_supported %}
{% if domain_supported %}
<li>
{% show_domain_list %}
</li>
{% endif %}
<li>
{% show_project_list %}
</li>
{% comment %}
is_multi_region is only available through an assignment tag pulled in through context_selection
{% endcomment %}
{% is_multi_region as multi_region %}
{% if multi_region %}
<li>
{% show_region_list %}
</li>
{% endif %}
</ul>
{% if not_list %}
</div>
{% else %}
</li>
{% endif %}