navbar.html 1.57 KB
Newer Older
1
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
Jason D Yeomans's avatar
Jason D Yeomans committed
2 3 4 5 6 7 8 9
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
Daniel W Bond's avatar
Daniel W Bond committed
10
      <a class="navbar-brand" href="/"><img src="/static/img/SRCT_square.svg" height="25" width="25" alt="SRCT"> ROOMLIST</a>
Jason D Yeomans's avatar
Jason D Yeomans committed
11 12 13
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
14 15 16
        {% if not user.is_authenticated %}
        <li><a href="{% url 'about' %}">About</a>
        {% endif %}
Daniel W Bond's avatar
Daniel W Bond committed
17 18
        <li><a href="{% url 'list_buildings' %}">Buildings</a></li>
        <li><a href="{% url 'list_majors' %}">Majors</a></li>
Jason D Yeomans's avatar
Jason D Yeomans committed
19 20 21
        </li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
22
        {% if user.is_authenticated %}
Daniel W Bond's avatar
Daniel W Bond committed
23 24
        <li>
          <a href="/search"><i class="fa fa-search fa-fw fa-lg"></i></a>
25
        <li><a href="/accounts/student/{{ user.username }}">{{ user.username }}</a>
Jason D Yeomans's avatar
Jason D Yeomans committed
26
        </li>
27
        <li>
28
          <a href="{% url 'update_student' request.user.username %}"><i class="fa fa-cog fa-fw fa-lg"></i></a>
29
        </li>
30
        <li><a href="{% url 'logout' %}">Logout</a>
Jason D Yeomans's avatar
Jason D Yeomans committed
31 32
        </li>
        {% else %}
33
        <li><a href="{% url 'login' %}">Login</a>
Jason D Yeomans's avatar
Jason D Yeomans committed
34 35 36 37 38 39 40
        </li>
        {% endif %}
      </ul>
    </div>
    <!--/.nav-collapse -->
  </div>
</nav>