1. György Kohut
  2. hbwebui

Source

hbwebui / hbwebui / templates / navbar.html

<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container-fluid">
            <ul class="nav">
                <li {% if page == "dashboard" %}class="active"{% endif %}><a href="{% if page == "dashboard" %}#{% else %}{% url dashboard %}{% endif %}">Dashboard</a></li>
                
                {% if page == "stats_binaries" or page == "stats_source_ips" or page == "stats_asns_ips" %}
                <li class="dropdown active">
                    {% if page == "stats_binaries" %}
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Stats / Binaries <span class="caret"></span></a>
                    {% endif %}
                    {% if page == "stats_source_ips" %}
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Stats / Source IPs <span class="caret"></span></a>
                    {% endif %}
                    {% if page == "stats_asns" %}
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Stats / ASNs <span class="caret"></span></a>
                    {% endif %}
                {% else %}
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Stats <span class="caret"></span></a>
                {% endif %}
                    <ul class="dropdown-menu">
                        {% if page == "stats_binaries" %}
                        <li><a href="#"><strong>Binaries</strong></a></li>
                        {% else %}
                        <li><a href="{% url stats_binaries %}">Binaries</a>
                        {% endif %}
                        {% if page == "stats_source_ips" %}
                        <li><a href="#"><strong>Source IPs</strong></a></li>
                        {% else %}
                        <li><a href="{% url stats_source_ips %}">Source IPs</a>
                        {% endif %}
                        {% if page == "stats_asns" %}
                        <li><a href="#"><strong>ASNs</strong></a></li>
                        {% else %}
                        <li><a href="{% url stats_asns %}">ASNs</a>
                        {% endif %}
                    </ul>
                </li>
            </ul>
            <div class="nav pull-right dropdown">
                <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="icon-user"></span> {{ user.username }} <span class="caret"></span></a>
                <ul class="dropdown-menu">
                    <!--<li class="divider"></li>-->
                    <li><a href="{% url logout %}">Log out</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>