{% extends admin.getTemplate('base_list_field') %}
{% block field %}
<div>
{% if object is instanceof("App\\Entity\\DonAdherent") or (object is instanceof("App\\Entity\\Don") and object.type == 'don_adherent' ) %}
<a class="sonata-link-identifier" href="{{ path('adherent_edit', {'id': object.expediteur.id}) }}">
{{ 'Adhérent'|trans }} : {{ object.expediteur.name }}
</a>
{% elseif object is instanceof("App\\Entity\\DonPrestataire") or (object is instanceof("App\\Entity\\Don") and object.type == 'don_prestataire' ) %}
<a class="sonata-link-identifier" href="{{ path('prestataire_edit', {'id': object.expediteur.id}) }}">
{{ 'Prestataire'|trans }} : {{ object.expediteur.name }}
</a>
{% endif %}
</div>
{% endblock %}