Browse Source

Fix the sorting of projects in the top navigation dropdown menu.

pull/214/head
Pēteris Caune 6 years ago
parent
commit
a5a45db7a8
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
1 changed files with 14 additions and 3 deletions
  1. +14
    -3
      templates/base.html

+ 14
- 3
templates/base.html View File

@ -125,14 +125,25 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{% with projects=request.get_projects %} {% with projects=request.get_projects %}
{% for project in projects %} {% for project in projects %}
{% if project.owner == request.user %}
<li class="dropdown-header">{{ project }}</li>
<li>
<a href="{% url 'hc-switch-team' project.owner.username %}">Checks</a>
</li>
<li><a href="{% url 'hc-profile' %}">Account Settings</a></li>
<li role="separator" class="divider"></li>
{% endif %}
{% endfor %}
{% for project in projects %}
{% if project.owner == request.user %}
{% else %}
<li class="dropdown-header">{{ project }}</li> <li class="dropdown-header">{{ project }}</li>
<li> <li>
<a href="{% url 'hc-switch-team' project.owner.username %}">Checks</a> <a href="{% url 'hc-switch-team' project.owner.username %}">Checks</a>
</li> </li>
{% if project.owner == request.user %}
<li><a href="{% url 'hc-profile' %}">Account Settings</a></li>
{% endif %}
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
{% endif %}
{% endfor %} {% endfor %}
{% endwith %} {% endwith %}


Loading…
Cancel
Save