{% load i18n %}

<ul class="nav navbar-nav navbar-right">
    <li><a href="{% url 'site.index' %}">
        &laquo; {% trans 'back to c3nav' %}
    </a></li>
    <li><a href="{{ request.changeset.get_absolute_url }}">
        {% if request.changeset.direct_editing %}
            <span class="text-warning">{{ request.changeset.count_display }}</span>
        {% else %}
            {{ request.changeset.count_display }}
        {% endif %}
    </a></li>
    {% if request.user.is_authenticated %}
        <li class="logged_in_user">
            <a href="{% url 'editor.users.detail' pk=request.user.pk %}">{{ request.user.username }}</a>
        </li>
    {% endif %}
    <li class="login_logout">
        {% if request.user.is_authenticated %}
            <a href="{% url 'editor.logout' %}?r={{ request.path }}">{% trans 'Log out' %}</a>
        {% else %}
            <a href="{% url 'editor.login' %}?r={{ request.path }}">{% trans 'Log in' %}</a>
        {% endif %}
    </li>
</ul>
