{% load static %}

<div class="navbar navbar-static-top navbar-default" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="/">
                <div class="navbar-brand">
                    <img alt="STFC logo" src="{% static "images/logo.png" %}"/>
                </div>
            </a>

        </div>
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav navbar-right" id="navbar_links">
                {% if user.is_authenticated %}
                    <li>
                        <p class="navbar-text">Welcome, <span id="navbar-username">{{ user.first_name }}</span></p>
                    </li>
                    <li>
                        <a href="{% url 'overview' %}">All Instruments</a>
                    </li>
                    <li>
                        <a href="{% url 'runs:queue' %}">Job Queue</a>
                    </li>
                    {% if user.is_superuser %}
                        <li>
                            <a href="{% url 'runs:failed' %}">Failed Jobs</a>
                        </li>
                        <li>
                            <a href="{% url 'admin:index' %}">Admin</a>
                        </li>
                        <li>
                            <a href="{% url 'graph' %} ">Graphs</a>
                        </li>
                        <li>
                            <a href="{% url 'help' %} ">Help</a>
                        </li>
                    {% endif %}
                    <li>
                        <a href="{% url 'logout' %}" id="logout">Logout</a>
                    </li>
                {% else %}
                    <li>
                        <p class="navbar-text">Welcome, please <a href="{{ authenticate_url }}">sign in</a></p>
                    </li>
                {% endif %}
            </ul>
        </div>
    </div>
</div>