{% load static %}

<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container-fluid">
    <div class="navbar-header clearfix content-heading">
      <a class="navbar-brand" id='logo' href="{% url 'index' %}" style="padding-top: 7px; padding-bottom: 5px;"><img src="{% static 'img/inventree.png' %}" width="40" height="40" style="display:block; margin: auto;"/></a>
    </div>
    <ul class="nav navbar-nav">
      <li><a href="{% url 'part-index' %}">Parts</a></li>
      <li><a href="{% url 'stock-index' %}">Stock</a></li>
      <li><a href="{% url 'build-index' %}">Build</a></li>
      <li><a href="{% url 'company-index' %}">Suppliers</a></li>
      <li><a href="{% url 'purchase-order-index' %}">Orders</a></li>
    </ul>
    <ul class="nav navbar-nav navbar-right">
        {% include "search_form.html" %}
        <li class='dropdown'>
          <a class='dropdown-toggle' data-toggle='dropdown' href="#"><span class="glyphicon glyphicon-user"></span> <b>{{ user.get_username }}</b></a>
          <ul class='dropdown-menu'>
              {% if user.is_authenticated %}
              {% if user.is_staff %}
              <li><a href="/admin/"><span class="glyphicon glyphicon-edit"></span> Admin</a></li>
              <hr>
              {% endif %}
              <li><a href="{% url 'settings' %}"><span class="glyphicon glyphicon-cog"></span> Settings</a></li>
              <li><a href="{% url 'logout' %}"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
              {% else %}
              <li><a href="{% url 'login' %}"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
              {% endif %}
              <hr>  
              <li id='launch-about'><a href='#'><span class="glyphicon glyphicon-info-sign"></span> About InvenTree</a></li>
            </ul>
          </li> 
    </ul>
  </div>
</nav>