Merge "Sort tenants in tenant dropdown, per #1234993"
This commit is contained in:
commit
ee3530c15d
@ -21,11 +21,13 @@
|
||||
{% if num_of_tenants > 1 %}
|
||||
<ul id="tenant_list" class="dropdown-menu">
|
||||
<li class='divider'></li>
|
||||
{% for tenant in authorized_tenants %}
|
||||
{% if tenant.enabled and tenant.id != request.user.tenant_id %}
|
||||
<li><a href="{% url 'switch_tenants' tenant.id %}?next={{ request.horizon.dashboard.get_absolute_url }}">{{ tenant.name }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% with authorized_tenants_sorted=authorized_tenants|dictsort:"name" %}
|
||||
{% for tenant in authorized_tenants_sorted %}
|
||||
{% if tenant.enabled and tenant.id != request.user.tenant_id %}
|
||||
<li><a href="{% url 'switch_tenants' tenant.id %}?next={{ request.horizon.dashboard.get_absolute_url }}">{{ tenant.name }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
Loading…
Reference in New Issue
Block a user