navigation.html 1.66 KB
Newer Older
1 2
{% load go_extras %}
<div class="navbar navbar-default">
David Haynes's avatar
David Haynes committed
3
  <div class="navbar-header" style="margin-left:5%;">
4 5 6 7 8
    <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>
David Haynes's avatar
David Haynes committed
9
    <a class="navbar-brand" href="{% url 'index' %}"><i class="fa fa-link"> Go</i></a>
10 11
  </div>
  <div class="navbar-collapse collapse navbar-responsive-collapse">
David Haynes's avatar
David Haynes committed
12
    <ul class="nav navbar-nav navbar-left">
13 14 15 16 17 18
      <li><a href="{% url 'about' %}">About</a></li>
      {% if user.is_authenticated %}
      <li><a href="{% url 'my_links' %}">My Links</a></li>
      {% if not user|is_registered %}
      <li><a href="{% url 'signup' %}">Register</a></li>
      {% endif %}
David Haynes's avatar
David Haynes committed
19 20 21 22
      {% endif %}
    </ul>
    <ul class="nav navbar-nav navbar-right" style="margin-right:5%;">
      {% if user.is_authenticated %}
David Haynes's avatar
David Haynes committed
23
      <li><a href="{% url 'go_logout' %}">Log Out <i class="fa fa-sign-out fa-fw"></i></a></li>
24
      {% else %}
David Haynes's avatar
David Haynes committed
25
      <li><a href="{% url 'go_login' %}">Log In <i class="fa fa-sign-in fa-fw"></i></a></li>
26 27 28
      {% endif %}
      {% if user.is_staff and user|is_approved %}
      <li class="dropdown">
David Haynes's avatar
David Haynes committed
29
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Administration <i class="fa fa-caret-down fa-fw"></i></a>
30
        <ul class="dropdown-menu">
David Haynes's avatar
David Haynes committed
31 32
          <li><a href="{% url 'useradmin' %}">User Moderation <i class="fa fa-users fa-fw"></i></a></li>
          <li><a href="{% url 'signup' %}">Signup New Users <i class="fa fa-user-plus fa-fw"></i></a></li>
33 34 35 36 37 38
        </ul>
      </li>
      {% endif %}
    </ul>
  </div>
</div>