{% load i18n auth utils %}
{% if is_legal_representative or not legal_representatives %}
{% if is_legal_representative %}
{% translate 'Legal representative' %}
{{ contact.full_name }}
{% if contact.legal_representative_of.count > 1 %}
{% icon 'users' label=_('This person represents other subjects who may also be suitable for this study.') %}
{% endif %}
{% if not contact.subject.is_available %}
{% icon 'phone-slash' %}
{% endif %}
{% if contact.subject.blocked %}
{{ contact.subject|verbose_name:'blocked' }}
{% endif %}
{% if contact.subject.deceased %}
{{ contact.subject|verbose_name:'deceased' }}
{% endif %}
{% for legal_representative, subtree in legal_representatives %}
{% has_privacy_level legal_representative.subject.privacy_level user as can_access %}
{% if can_access %}
{% include 'contacts/__contact_detail.html' with contact=legal_representative legal_representatives=subtree is_legal_representative=True %}
{% else %}