{% load bootstrap4 %}
{% comment %}
The following nav-item list elements (li) are included in the tom_common/base.html navbar-nav (ul).
For customization instructions, see tom_common/base.html
{% endcomment %}

<li class="nav-item {% if request.resolver_match.url_name == 'home' %}active{% endif %}">
    <a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle {% if request.resolver_match.namespace == 'targets' %}active{% endif %}" data-toggle="dropdown">Targets</a>
    <div class="dropdown-menu">
        <a class="dropdown-item" href="{% url 'targets:list' %}">Targets</a>
        <a class="dropdown-item" href="{% url 'targets:targetgrouping' %}">Target Grouping</a>
    </div>
</li>
<li class="nav-item {% if request.resolver_match.namespace == 'alerts' %}active{% endif %}">
    <a class="nav-link" href="{% url 'alerts:list' %}">Alerts</a>
</li>
<li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle" data-toggle="dropdown">Observations</a>
    <ul class="dropdown-menu">
        <li class="nav-item {% if request.resolver_match.namespace == 'observations' %}active{% endif %}">
            <a class="nav-link" href="{% url 'tom_observations:list' %}" style="color:black">Observations</a>
        </li>
        <li class="nav-item {% if request.resolver_match.namespace == 'observations' %}active{% endif %}">
            <a class="nav-link" href="{% url 'tom_observations:group-list' %}" style="color:black">Observation Groups</a>
        </li>
        <li class="nav-item {% if request.resolver_match.namespace == 'observations' %}active{% endif %}">
            <a class="nav-link" href="{% url 'tom_observations:template-list' %}" style="color:black">Observation Templates</a>
        </li>
        <li class="nav-item {% if request.resolver_match.namespace == 'observations' %}active{% endif %}">
            <a class="nav-link" href="{% url 'tom_observations:facility-status' %}" style="color:black">Facility Status</a>
        </li>
    </ul>
</li>
<li class="nav-item {% if request.resolver_match.namespace == 'dataproducts' %}active{% endif %}">
    <a class="nav-link" href="{% url 'tom_dataproducts:list' %}">Data</a>
</li>
<li class="nav-item {% if 'user' in request.resolver_match.url_name %}active{% endif %}">
    <a class="nav-link" href="{% url 'user-list' %}">Users</a>
</li>
