mark active menu item as active

This commit is contained in:
Jan Dittberner 2015-02-01 14:58:32 +01:00
parent 210d1e122c
commit 81b9bc163b
3 changed files with 31 additions and 3 deletions

View file

@ -57,12 +57,12 @@
<li><a href="{{ phppgadmin_url }}" title="{% trans "phpPgAdmin - PostgreSQL database administration frontend" %}"><i class="icon-postgres"></i> {% trans "phpPgAdmin" %}</a></li>
</ul>
</li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
<li{% if active_item == 'about' %} class="active"{% endif %}><a href="#about">About</a></li>
<li{% if active_item == 'contact' %} class="active"{% endif %}><a href="#contact">Contact</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
{% if user.is_authenticated %}
<li class="dropdown">
<li class="dropdown{% if active_item == 'account' %} active{% endif %}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{% trans "My Account" %} <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
{% if user.is_staff %}<li><a href="{% url 'admin:index' %}">{% trans "Admin site" %}</a></li>{% endif %}