Highlight Navbar Icons

This commit is contained in:
Sebastian Lohff 2017-01-20 18:02:41 +01:00 committed by root
parent 5f3953ef8b
commit d63bfe0125
1 changed files with 7 additions and 7 deletions

View File

@ -39,18 +39,18 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
{% if user.is_authenticated %}
<li class="active"><a href="{% url "contest:index" %}">Home</a></li>
<li{% if request.resolver_match.url_name == 'index' %} class="active"{%endif%}><a href="{% url "contest:index" %}">Home</a></li>
{% if user.ref %}
<li><a href="{% url "contest:log" %}">Log</a></li>
<li{% if "log" in request.resolver_match.url_name %} class="active"{%endif%}><a href="{% url "contest:log" %}">Log</a></li>
{% endif %}
{% if user.is_staff %}
<li><a href="{% url "contest:registerRefs" %}">Register Refs!</a></li>
<li{% if "Ref" in request.resolver_match.url_name %} class="active"{%endif%}><a href="{% url "contest:registerRefs" %}">Register Refs!</a></li>
{% endif %}
{% else %}
<li><a href="{% url "index" %}">Home</a></li>
<li><a href="{% url "register" %}">Register</a></li>
<li{% if request.resolver_match.url_name == 'index' %} class="active"{%endif%}><a href="{% url "index" %}">Home</a></li>
<li{% if request.resolver_match.url_name == 'register' %} class="active"{%endif%}><a href="{% url "register" %}">Register</a></li>
{% endif %}
<li><a href="{% url "contest:overview" %}">Contest Overview</a></li>
<li{% if request.resolver_match.url_name == 'overview' %} class="active"{%endif%}><a href="{% url "contest:overview" %}">Contest Overview</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
{% if user.is_staff %}
@ -59,7 +59,7 @@
{% if user.is_authenticated %}
<li><a href="/logout/">Logout</a></li>
{% else %}
<li><a href="/login/">Login</a></li>
<li{% if request.resolver_match.url_name == 'login' %} class="active"{%endif%}><a href="/login/">Login</a></li>
{% endif %}
</ul>
{% if user.is_authenticated %}