{%- if request.user.is_authenticated() -%}
    <a href="{{ request.user.get_absolute_url() }}">{{ request.user.username|escape }}</a> 
    <span class="user-info">
    {{ macros.inbox_link(request.user) }}
    {{ macros.moderation_items_link(request.user, moderation_items) }}
    {%-
        if settings.KARMA_MODE != 'hidden' or settings.BADGES_MODE != 'hidden' 
    -%}
        ({{ macros.user_long_score_and_badge_summary(
                                        user,
                                        karma_mode=settings.KARMA_MODE,
                                        badges_mode=settings.BADGES_MODE
                                    )
        }})
    {%- endif -%}
    </span>
    {% if settings.USE_ASKBOT_LOGIN_SYSTEM %}
         <a href="{{ settings.LOGOUT_URL }}?next={{ settings.LOGOUT_REDIRECT_URL }}">{% trans %}sign out{% endtrans %}</a>
    {% endif %}
{% elif settings.USE_ASKBOT_LOGIN_SYSTEM %}
    <a href="{{ settings.LOGIN_URL }}?next={{request.path|clean_login_url|escape}}">Connexion</a>
    <a href="{% url 'user_signup_with_password' %}?login_provider=local">Inscription</a>
{% endif %}
{% if request.user.is_authenticated() and request.user.is_administrator() %}
    <a class="settings" href="{% url site_settings %}">{% trans %}settings{% endtrans %}</a>
    <a class="widgets" href="{% url widgets %}">{% trans %}widgets{% endtrans %}</a>
{% endif %}
    <a class="welcome" href="{% url 'faq' %}">{% trans %}help{% endtrans %}</a>
