{% extends "admin/base.html" %} {% block content %}

Documentos de {{ lead.name }}

{% if not documents %}
No hay documentos asociados a este lead.
{% else %}
{% for doc_type, docs in documents_by_type.items() %}

{% if doc_type == 'factura' %} Facturas {% elif doc_type == 'propuesta' %} Propuestas {% elif doc_type == 'contrato' %} Contratos {% else %} {{ doc_type|capitalize }} {% endif %} {{ docs|length }}

{% for doc in docs %} {% endfor %}
Nombre Fecha Acciones
{{ doc.file_name }} {% if doc.document_metadata and doc.document_metadata.get('comentario') %} {{ doc.document_metadata.get('comentario')|truncate(50) }} {% endif %} {{ doc.created_at.strftime('%d/%m/%Y %H:%M') }}
{% if loop.index is even %}
{% endif %} {% endfor %}
{% endif %}
{% endblock %}