navigation.html 1.35 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{% load go_extras %}
<div class="navbar navbar-default">
  <div class="navbar-header">
    <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' %}">Go</a>
  </div>
  <div class="navbar-collapse collapse navbar-responsive-collapse">
    <ul class="nav navbar-nav">
      <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 %}
      <li><a href="{% url 'go_logout' %}">Log Out</a></li>
      {% else %}
      <li><a href="{% url 'go_login' %}">Log In</a></li>
      {% endif %}
    </ul>
    <ul class="nav navbar-nav navbar-right">
      {% if user.is_staff and user|is_approved %}
      <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Administration<b class="caret"></b></a>
        <ul class="dropdown-menu">
          <li><a href="{% url 'useradmin' %}">User Moderation</a></li>
          <li><a href="{% url 'signup' %}">Signup</a></li>
        </ul>
      </li>
      {% endif %}
    </ul>
  </div>
</div>