Commit eae1337e authored by David Haynes's avatar David Haynes
Browse files

Comments in the navbar

- phew
parent ace1d148
Pipeline #482 passed with stage
in 7 minutes and 27 seconds
<!-- load in go templatetags -->
{% load go_extras %}
<!-- define our navbar -->
<div class="navbar navbar-default">
<div class="navbar-header" style="margin-left:5%;">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'index' %}"><i class="fa fa-link"> Go</i></a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-left">
<li><a href="{% url 'about' %}">About</a></li>
{% if user.is_authenticated %}
{% if user.registereduser.approved %}
<li><a href="{% url 'my_links' %}">My Links</a></li>
{% endif %}
{% if not user.registereduser.registered %}
<li><a href="{% url 'signup' %}">Register</a></li>
{% endif %}
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-right" style="margin-right:5%;">
{% if user.is_authenticated %}
<li><a href="{% url 'go_logout' %}">Log Out <i class="fa fa-sign-out fa-fw"></i></a></li>
{% else %}
<li><a href="{% url 'go_login' %}">Log In <i class="fa fa-sign-in fa-fw"></i></a></li>
{% endif %}
{% if user.is_staff %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Administration <i class="fa fa-caret-down fa-fw"></i></a>
<ul class="dropdown-menu dropdown-menu-left">
<li><a href="{% url 'useradmin' %}">User Moderation <i class="fa fa-users fa-fw"></i></a></li>
<!-- define the main "header" of the navbar -->
<div class="navbar-header" style="margin-left:5%;">
<!-- responsive hamburger menu -->
<button type="button" class="navbar-toggle" data-toggle="collapse"
data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Go brand logo -->
<a class="navbar-brand" href="{% url 'index' %}">
<i class="fa fa-link"> Go</i>
</a>
</div>
<!-- define the parts of the navbar that collapse b/c responsiveness -->
<div class="navbar-collapse collapse navbar-responsive-collapse">
<!-- The left side -->
<ul class="nav navbar-nav navbar-left">
<li><a href="{% url 'about' %}">About</a></li>
<!-- only show if the current user is authenticated -->
{% if user.is_authenticated %}
<!-- only if they are an approved user -->
{% if user.registereduser.approved %}
<li><a href="{% url 'my_links' %}">My Links</a></li>
{% endif %}
<!-- only if the current user has not registered to use go -->
{% if not user.registereduser.registered %}
<li><a href="{% url 'signup' %}">Register</a></li>
{% endif %}
{% endif %}
</ul>
</li>
{% endif %}
</ul>
</div>
<!-- The right side -->
<ul class="nav navbar-nav navbar-right" style="margin-right:5%;">
<!-- only show if the user is authenticated -->
{% if user.is_authenticated %}
<!-- logout -->
<li>
<a href="{% url 'go_logout' %}">
Log Out <i class="fa fa-sign-out fa-fw"></i>
</a>
</li>
{% else %}
<!-- login -->
<li>
<a href="{% url 'go_login' %}">
Log In <i class="fa fa-sign-in fa-fw"></i>
</a>
</li>
{% endif %}
<!-- if the user is a staff member -->
{% if user.is_staff %}
<li class="dropdown">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown">
Administration <i class="fa fa-caret-down fa-fw"></i></a>
<ul class="dropdown-menu dropdown-menu-left">
<li><a href="{% url 'useradmin' %}">User Moderation <i class="fa fa-users fa-fw"></i></a></li>
</ul>
</li>
{% endif %}
</ul>
</div>
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment