{# @description Account dropdown for the sidebar footer: avatar trigger, account/admin links, then log out. #} {# @slot — Extra rows, inserted between the built-in links and log out. #} {% load i18n mvp %} {% if request.user.is_authenticated %}
{% comment %} `{% url as %}` leaves the name unset on a false branch, so `has_rows_above` below reflects what was actually drawn. {% endcomment %} {% url "account-center" as account_center_url %} {% url "account_logout" as logout_url %} {% if request.user.is_staff %}{% url "admin:index" as admin_url %}{% endif %} {% if account_center_url %} {% endif %} {% if admin_url %} {% endif %} {{ slot }} {% firstof account_center_url admin_url slot as has_rows_above %} {% if logout_url and has_rows_above %}{% endif %} {% if logout_url %} {% endif %} {% if logout_url %} {% endif %}
{% endif %}