{% extends admin.getTemplate('base_list_field') %}
{% block field %}
    {%- spaceless %}
    {% set cotisEnd = getLastTavCotisationForAdherent(object.user.adherent) %}
    {% if false != cotisEnd %}
        {% set text = cotisEnd|date('d/m/Y') %}
        {% set class = 'label-success' %}
    {% else %}
        {% set text = 'aucune'|trans %}
        {% set class = 'label-danger' %}
    {% endif %}
    <span class="label {{ class }}">{{ text }}</span>
{% endspaceless -%}
{% endblock %}
