<tr id="docFrs_{{ loop.index }}">
{#___________________________________________________________________________#}
    <td style="height: 51.58px;">
        {{ dossier[docAtt.CODE_CAT] ?? ('Autre' | trad) }}
    </td>
{#___________________________________________________________________________#}
{% block colTitle %}
    <td>
        {% if docAtt.COMMENTAIRE %}
            <span class="white-tooltip" style="cursor:pointer;" onClick="ajaxPopup('{{ path('Ajax.outil.contentText') }}', '', '{{ docAtt.COMMENTAIRE |e('js')|raw }}');">
                <b>{{ docAtt.TITRE }}</b>
                <span class="infos_tooltip">
                    {{ docAtt.COMMENTAIRE }}         			
                </span>
            </span>
        {% else %}
            {{ docAtt.TITRE }}
        {% endif %}
    </td>
{% endblock %}
{#___________________________________________________________________________#}
{% block colStatus %}
    <td class="etat">
        {% if docAtt.DOC_INUTILE | boolSql %}
            <span class="sans_objet">{{ 'Sans objet' | trad }}</span>	
        {% elseif docAtt.NOM_FIC == "" %}
            <span class="sans_objet">{{ 'Absent' | trad }}</span>
        {% elseif docAtt.NOM_FIC != "" and date <= docAtt.DT_VALID and date>=docAtt.relance %}
            <span class="absent">{{ 'Proche péremption' | trad }}</span>
        {% elseif docAtt.NOM_FIC != "" and (date < docAtt.DT_VALID or (docAtt.DT_VALID==0 and docAtt.DT_PARUT<=date)) %}
            <span class="ajour">{{ 'À jour' | trad }}</span>
        {% elseif docAtt.NOM_FIC != "" and date > docAtt.DT_VALID  %}
            <span class="perime">{{ 'Périmé' | trad }}</span>
        {% endif %}
    </td>
{% endblock %}
{#___________________________________________________________________________#}
{% block colCentre %}
    <td>{{ docAtt.RAIS_SOC }} {{ docAtt.CODE_CTR? '('~docAtt.CODE_CTR~')':'' }}</td>
{% endblock %}
{#___________________________________________________________________________#}
{% block colAuteur %}
    <td>{{ docAtt.NOM }} {{ docAtt.AUTEUR? '('~docAtt.AUTEUR~')':'' }}</td>
{% endblock %}
{#___________________________________________________________________________#}
{% block colValable %}
    <td>
        {% if docAtt.DT_VALID =="0" and docAtt.DT_PARUT != "0" %}
            {{ 'Valable à partir du' | trad }} {{ docAtt.DT_PARUT | dateTrad }}
        {% elseif docAtt.DT_VALID =="" and docAtt.DT_PARUT == "" %}
        
        {% elseif docAtt.DT_PARUT == "0" %}
            
        {% else %}
            {{ 'Du' | trad }} {{ docAtt.DT_PARUT | dateTrad }}
            {{ 'au' | trad }} {{ docAtt.DT_VALID | dateTrad }}
        {% endif %}
    </td>
{% endblock %}
{#___________________________________________________________________________#}
    <td>
        {% if DateRelance(code_fournisseur, docAtt.TITRE) 
            and (
                (
                    docAtt.NOM_FIC != ""
                    and (
                        (date > docAtt.DT_VALID and docAtt.DT_VALID != 0) 
                        or (
                            docAtt.NOM_FIC != ""
                            and date <= docAtt.DT_VALID 
                            and date >= docAtt.relance
                        )
                    )
                ) 
                or docAtt.NOM_FIC == ""
            )
        %}
            {{ DateRelance(code_fournisseur, docAtt.TITRE ) | dateTrad}}
            <span class="dernier_contact white-tooltip">
                <span class="infos_tooltip top-left">
                    {{ 'Dernière mise à jour effectuée par' | trad }} :<br/>
                    <b>{{ AuteurRelance(code_fournisseur, docAtt.TITRE ) | convert_encoding('UTF-8', 'ISO-8859-1')}}</b>
                </span>
            </span>
        {% endif %}
    </td>
{#___________________________________________________________________________#}
{% block colAction %}
    <td>
        {{ menuContextuel('docFrs_' ~ loop.index, false, docAtt.menuContextuel, 6) }}

        {% if docAtt.NOM_FIC != "" and (docAtt.DOC_INUTILE|boolSql)==0 %}
            {{ hover_action(
                'docFrs_'~loop.index,
                'download_v2', 
                "window.location.href ='"~path('Fournisseur.DocFournisseur.downloadFichier', {id: code_fournisseur, ordre: docAtt.NO_ORDRE})~"';", 
                'float: right;margin-right: 10px;'
            ) }}
        {% endif %}
        {% if demandeActif == false %}
            {% if (docAtt.NPRELANCE | boolSql ==0 ) 
                and gestionALG == FALSE 
                and (
                    (
                        (
                            docAtt.NOM_FIC != "" 
                            and date > docAtt.DT_VALID 
                            and docAtt.DT_VALID != '00000000'
                        ) 
                        or docAtt.NOM_FIC == ""
                    ) and docAtt.DOC_INUTILE |boolSql == 0
                )
            %}
                {{ hover_action(
                    'docFrs_'~loop.index,
                    'refresh_v2',
                    "ajaxPopup(\'"
                        ~ path('Fournisseur.DocFournisseur.PopupRelance',{id:code_fournisseur})
                        ~ "\', \'" ~ ('Relance du document' | trad ~ " " ~ (docAtt.TITRE  |e('js')|raw))~"\', \'"~(docAtt.TITRE |e('js')|raw)~"\', \'"~docAtt.NO_ORDRE~"\');", 
                    'float: right;margin-right: 10px;',
                    'Relance' |trad
                ) }}
            {% endif %}
        {% endif %}
    </td>
{% endblock %}
</tr>