{% load rules i18n %} {% has_perm 'core.view_avatar_rule' request.user person_or_user as can_view_avatar %} {% has_perm 'core.view_photo_rule' request.user person_or_user as can_view_photo %} {% if SITE_PREFERENCES.account__person_prefer_photo and person_or_user.photo and can_view_photo %} {{ person_or_user.full_name }} {% elif person_or_user.identicon_url %} {# If this is a person #} {% if can_view_avatar %} {{ person_or_user.full_name }} ({% trans {% else %} {{ person_or_user.full_name }} ({% trans {% endif %} {% else %} {# There is a user without a person #} person {% endif %}