horizon/openstack_dashboard/templates/_header.html
Rajat Vig 6698d26fba Set target to _self for Header Links
Angular Panels have enabled ngRoute and HTML5 which
allows Angular to handle routing which makes all
routes to pass via Angular.

Links that do not have route defintion as a result stop
working.
This can be fixed by specifying the target="_self" on the <a> tags.

This is already in place for the Sidebar. It needs to done for the
Header Links as well.

Closes-Bug: #1531734
Change-Id: Ida76b40fdf0b66ba3ee3af4d32701974c312af57
2016-01-08 19:51:03 +00:00

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 %}" target="_self"">
<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' %}" target="_self">
<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' %}" target="_self">
<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>