{%- 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) }})
    {%- endif -%}
    </span>
    {% if settings.USE_ASKBOT_LOGIN_SYSTEM %}
         {% set next_jwt=encode_jwt({'next_url': settings.LOGOUT_REDIRECT_URL}) %}
         <a href="{{ settings.LOGOUT_URL }}?next={{ next_jwt }}">{% trans %}sign out{% endtrans %}</a>
    {% endif %}
{% elif settings.USE_ASKBOT_LOGIN_SYSTEM and not on_login_page %}
    {% include "widgets/login_link.html" %}
{% endif %}
{% if request.user.is_authenticated and request.user.is_administrator() %}
    <a class="settings" href="{{ url('satchmo_site_settings') }}">{% trans %}settings{% endtrans %}</a>
{% endif %}
    <a class="help" href="{{ url('help') }}" title="{% trans %}help{% endtrans %}">{% trans %}help{% endtrans %}</a>
