{% extends 'base.html' %}
{% block titleheader %}
    <a class="navbar-brand" href="/">RIGS</a>
{% endblock %}

{% block titleelements %}
    {% if user.is_authenticated %}
        <li><a href="/">Home</a></li>
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Rigboard<b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a href="{% url 'rigboard' %}"><span class="glyphicon glyphicon-list"></span>
                    Rigboard</a></li>
                <li><a href="{% url 'event_archive' %}"><span class="glyphicon glyphicon-book"></span>
                    Archive</a></li>
                <li><a href="{% url 'web_calendar' %}"><span class="glyphicon glyphicon-calendar"></span>
                    Calendar</a></li>
                {% if perms.RIGS.view_event %}
                    <li><a href="{% url 'activity_table' %}"><span
                            class="glyphicon glyphicon-random"></span> Recent Changes</a></li>
                {% endif %}
                {% if perms.RIGS.add_event %}
                    <li><a href="{% url 'event_create' %}"><span class="glyphicon glyphicon-plus"></span>
                        New Event</a></li>
                {% endif %}

            </ul>
        </li>
    {% endif %}
    {% if perms.RIGS.view_invoice %}
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Invoices<b class="caret"></b></a>
            <ul class="dropdown-menu">
                {% if perms.RIGS.add_invoice %}
                    <li><a href="{% url 'invoice_waiting' %}"><span
                            class="glyphicon glyphicon-briefcase text-danger"></span> Waiting</a></li>
                {% endif %}
                <li><a href="{% url 'invoice_list' %}"><span class="glyphicon glyphicon-gbp text-warning"></span> Outstanding</a>
                </li>
                <li><a href="{% url 'invoice_archive' %}"><span class="glyphicon glyphicon-book"></span>
                    Archive</a></li>
            </ul>
        </li>
    {% endif %}
    {% if perms.RIGS.view_person %}
        <li><a href="{% url 'person_list' %}">People</a></li>
    {% endif %}
    {% if perms.RIGS.view_organisation %}
        <li><a href="{% url 'organisation_list' %}">Organisations</a></li>
    {% endif %}
    {% if perms.RIGS.view_venue %}
        <li><a href="{% url 'venue_list' %}">Venues</a></li>
    {% endif %}
{% endblock %}