{% load static %}
{% load i18n %}
{% load navactive %}

<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">{% translate "Toggle navigation" %}</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <a class="navbar-brand" href="{% url 'structures:index' %}">
                {% translate "Structures" %}
            </a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">

                {% if perms.structures.view_corporation_structures or perms.structures.view_alliance_structures or perms.structures.view_all_structures %}
                    <li class="{% navactive request 'structures:structure_list' %}">
                        <a href="{% url 'structures:structure_list' %}">
                            {% translate 'Structure List' %}
                        </a>
                    </li>

                    <li class="{% navactive request 'structures:statistics' %}">
                        <a href="{% url 'structures:statistics' %}">
                            {% translate 'Statistics' %}
                        </a>
                    </li>
                {% endif %}


                <li class="{% navactive request 'structures:public' %}">
                    <a href="{% url 'structures:public' %}">
                        {% translate 'Public' %}
                    </a>
                </li>

            </ul>

            <ul class="nav navbar-nav navbar-right">
                {% if perms.structures.add_structure_owner %}
                    <a class="btn btn-success navbar-btn" href="{% url 'structures:add_structure_owner' %}" title="{% translate 'Add new structure owner or add new sync character to an existing structure owner' %}">
                        {% translate "Add Owner / Sync Character" %}
                    </a>
                {% endif %}
            </ul>

        </div>
    </div>
</nav>
