Source

hbwebui / hbwebui / templates / navbar.html

Full commit
<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_idents" or page == "stats_binaries" or page == "stats_source_ips" or page == "stats_asns" or page == "stats_countries" %}
                <li class="dropdown active">
                    {% if page == "stats_idents" %}
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Stats / Idents <span class="caret"></span></a>
                    {% endif %}
                    {% 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 %}
                    {% if page == "stats_countries" %}
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Stats / Countries <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_idents" %}
                        <li><a href="#"><strong>Idents</strong></a></li>
                        {% else %}
                        <li><a href="{% url stats_idents %}">Idents</a>
                        {% endif %}
                        {% 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 %}
                        {% if page == "stats_countries" %}
                        <li><a href="#"><strong>Countries</strong></a></li>
                        {% else %}
                        <li><a href="{% url stats_countries %}">Countries</a>
                        {% endif %}
                    </ul>
                </li>
                {% if page == "stats_ident" %}
                <li class="active"><a href="#">Stats / Ident: {{ ident }}</a></li>
                {% endif %}
                {% if page == "stats_binary" %}
                <li class="active"><a href="#">Stats / Binary: {{ md5 }}</a></li>
                {% endif %}
                {% if page == "stats_source_ip" %}
                <li class="active"><a href="#">Stats / Source IP: {{ source_ip }}</a></li>
                {% endif %}
                {% if page == "stats_asn" %}
                <li class="active"><a href="#">Stats / ASN: {{ asn }}</a></li>
                {% endif %}
                {% if page == "stats_country" %}
                <li class="active"><a href="#">Stats / Country: {{ cc }}</a></li>
                {% endif %}
            </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>