dab7e45c74
The dropdownToggle directive from angular-ui/bootstrap v0.11.2 conflicts with the native Bootstrap data-toggle="dropdown" attribute (see https:github.com/angular-ui/bootstrap/issues/2156). This is fixed in 0.13, but before that it'd be valuable to ensure that the same html markup works the same way with both versions of angular-ui/bootstrap (0.11.2 and 0.13). The decorator code could be safely deleted once Horizon migrates to angular-ui/bootstrap v0.13. Also fix dropdowns in material theme templates. Closes-Bug: #1466146 Change-Id: I8f01c1ce7b0a5dc29bf9d8aba23c9ea7e6e1ec35
101 lines
3.6 KiB
HTML
101 lines
3.6 KiB
HTML
{% load branding i18n %}
|
|
{% load context_selection %}
|
|
|
|
<nav class="navbar navbar-default">
|
|
<div class="container-fluid">
|
|
<!-- Brand and toggle get grouped for better mobile display -->
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
|
|
<span class="sr-only">{% trans "Toggle navigation" %}</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="navbar-brand" href="{% site_branding_link %}">
|
|
<img class="openstack-logo" src="{{ STATIC_URL }}dashboard/img/logo.png" alt="{% site_branding %}">
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
|
<div class="collapse navbar-collapse" id="navbar-collapse">
|
|
<ul class="nav navbar-nav">
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
|
{% show_overview %}
|
|
<span class="fa fa-caret-down"></span>
|
|
</a>
|
|
<ul class="dropdown-menu context-selection">
|
|
|
|
{% 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>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
|
<span class="fa fa-user"></span>
|
|
{{ request.user.username }}
|
|
<span class="fa fa-caret-down"></span>
|
|
</a>
|
|
<ul id="editor_list" class="dropdown-menu dropdown-menu-right">
|
|
<li>
|
|
<a href="{% url 'horizon:settings:user:index' %}">
|
|
<span class="fa fa-cog"></span>
|
|
{% trans "Settings" %}
|
|
</a>
|
|
</li>
|
|
{% if HORIZON_CONFIG.bug_url %}
|
|
<li>
|
|
<a href="{{ HORIZON_CONFIG.bug_url }}" target="_blank">
|
|
<span class="fa fa-bug"></span>
|
|
{% trans "Report Bug" %}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if HORIZON_CONFIG.help_url %}
|
|
<li>
|
|
<a href="{{ HORIZON_CONFIG.help_url }}" target="_blank">
|
|
<span class="fa fa-question-circle"></span>
|
|
{% trans "Help" %}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
<li class="divider"></li>
|
|
<li>
|
|
<a href="{% url 'logout' %}">
|
|
<span class="fa fa-sign-out"></span>
|
|
{% trans "Sign Out" %}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="dropdown">
|
|
{% include "horizon/common/_region_selector.html" %}
|
|
</li>
|
|
</ul>
|
|
</div><!-- /.navbar-collapse -->
|
|
</div><!-- /.container-fluid -->
|
|
</nav>
|