{% 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">{% 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="{% url 'moonstuff:moon_index' %}">{% trans "Moons" %}</a>
    </div>
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
            <li class="{% navactive request 'moonstuff:moon_list' %}"><a href="{% url 'moonstuff:moon_list' %}">List Moons</a> </li>
            {% if perms.moonstuff.add_resource %}
            <li class="{% navactive request 'moonstuff:moon_scan' %}"> <a href="{% url 'moonstuff:moon_scan' %}">Add Moon Scan</a></li>
            {% endif %}
        </ul>
        {% if perms.moonstuff.add_extractevent %}
        <a class="btn btn-success navbar-btn" style="float: right" href="{% url 'moonstuff:add_token' %}"><span class="fa fa-plus fa-fw"></span></a>
        {% endif %}
    </div>
</div>
</nav>
