{% 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">{% trans "Toggle navigation" %}</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">{% trans app_title %}</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">                
                <li class="{% navactive request 'standingsrequests:index' %}">
                    <a href="{% url 'standingsrequests:index' %}">{% trans "Create Requests" %}</a>
                </li>
                
                 {% if perms.standingsrequests.affect_standings %}
                <li class="{% navactive request 'standingsrequests:manage' %}">
                    <a href="{% url 'standingsrequests:manage' %}">{% trans "Manage Requests" %}</a>
                </li>
                <li class="{% navactive request 'standingsrequests:view_requests' %}">
                    <a href="{% url 'standingsrequests:view_requests' %}">{% trans "Effective Requests" %}</a>
                </li>
                {% endif %}
                
                {% if perms.standingsrequests.view %}
                <li class="{% navactive request 'standingsrequests:view_pilots' %}">
                    <a href="{% url 'standingsrequests:view_pilots' %}">{% trans "Character Standings" %}</a>
                </li>
                <li class="{% navactive request 'standingsrequests:view_groups' %}">
                    <a href="{% url 'standingsrequests:view_groups' %}">{% trans "Group Standings" %}</a>
                </li>
                {% endif %}               
            </ul>
             <ul class="nav navbar-nav navbar-right"> 
                {% if perms.standingsrequests.affect_standings %}
                    <a class="btn btn-default navbar-btn" href="{% url 'standingsrequests:view_auth_page' %}">
                        {% if operation_mode == "corporation" %}
                            {% trans "Setup Corporation Token" %}                            
                        {% else %}
                            {% trans "Setup Alliance Token" %}
                        {% endif %}
                    </a>
                {% endif %}                
            </ul>
        </div>
    </div>
</nav>
