{% load i18n %}

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

{% load i18n %}

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

Change projects redirects to overview page
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
