Highlight Navbar Icons
This commit is contained in:
parent
5f3953ef8b
commit
d63bfe0125
|
@ -39,18 +39,18 @@
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
<div id="navbar" class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
{% if user.is_authenticated %}
|
{% 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 %}
|
{% 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 %}
|
{% endif %}
|
||||||
{% if user.is_staff %}
|
{% 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 %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{% url "index" %}">Home</a></li>
|
<li{% if request.resolver_match.url_name == 'index' %} class="active"{%endif%}><a href="{% url "index" %}">Home</a></li>
|
||||||
<li><a href="{% url "register" %}">Register</a></li>
|
<li{% if request.resolver_match.url_name == 'register' %} class="active"{%endif%}><a href="{% url "register" %}">Register</a></li>
|
||||||
{% endif %}
|
{% 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>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
{% if user.is_staff %}
|
{% if user.is_staff %}
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<li><a href="/logout/">Logout</a></li>
|
<li><a href="/logout/">Logout</a></li>
|
||||||
{% else %}
|
{% 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 %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
|
|
Loading…
Reference in New Issue