{% load staticfiles %}

<nav class="navbar navbar-default" role="navigation">
    <div class="container">
        <a class="navbar-brand" href="/">Fabric Bolt</a>

        {% if request.user.is_authenticated %}
            <ul class="nav navbar-nav pull-right">
                <li><a href="{% url 'index' %}">Dashboard</a></li>

                <li class="dropdown">
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#"><img class="gravatar" src="{{ request.user.gravatar }}"/> &nbsp;{{ request.user.email }} <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="{% url 'accounts_user_change' user.pk %}">Update Profile</a></li>
                        <li><a href="{% url 'accounts_password_change' %}">Reset Password</a></li>
                        <li class="divider"></li>
                        <li><a href="{% url 'accounts_user_logout' %}">Logout</a></li>
                    </ul>
                </li>
            </ul>
        {% endif %}
    </div>
</nav>