Change projects redirects to overview page

I read the code of switch region and modify the code of switch project.
 Now change project will redirect to the original page.

Change-Id: Ia19eaefa5de884ac4d5900c93138922f00e9c692
Closes-Bug: #1549560
This commit is contained in:
space 2016-03-04 17:46:27 +08:00
parent ecaf1a47bc
commit edeb9ddaf9

View File

@ -1,12 +1,12 @@
{% load i18n %} {% load i18n %}
{% with dashboard_url=request.horizon.dashboard.get_absolute_url %} {% with page_url=request.horizon.panel.get_absolute_url %}
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="dropdown-header">{% trans "Projects:" %}</li> <li class="dropdown-header">{% trans "Projects:" %}</li>
{% for project in projects %} {% for project in projects %}
<li> <li>
<a class="{% if project.enabled and project.id == project_id %} dropdown-selected{% endif %}" <a class="{% if project.enabled and project.id == project_id %} dropdown-selected{% endif %}"
href="{% url 'switch_tenants' project.id %}?next={{ dashboard_url }}" href="{% url 'switch_tenants' project.id %}?next={{ page_url }}"
target="_self"> target="_self">
<span class="fa fa-check dropdown-selected-icon"></span> <span class="fa fa-check dropdown-selected-icon"></span>
<span class="dropdown-title"> <span class="dropdown-title">