{% load i18n mezzanine_tags %}

{% if request.user.is_authenticated %}
    {% trans "Logged in as: " %}
    {% url profile request.user.username as profile_url %}
    {% if profile_url %}
        <a href="{{ profile_url }}">{{ request.user.username }}</a><br>
        <a href="{% url profile_update %}"
            class="btn btn-small">{% trans "Update profile" %}</a>
    {% else %}
        <a href="{% url profile_update %}">{{ request.user.username }}</a>
    {% endif %}
    <a href="{{ settings.LOGOUT_URL }}?next={{ request.path }}"
        class="btn btn-small btn-danger btn-account">{% trans "Log out" %}</a>
{% else %}
    {% trans "Not logged in" %}
    <a href="{% url login %}?next={{ request.path }}"
        class="btn btn-small btn-account">{% trans "Log in" %}</a>
    {% trans "or" %}
    <a href="{% url signup %}?next={{ request.path }}"
        class="btn btn-small btn-account">{% trans "Sign up" %}</a>
{% endif %}
