{% extends "admin/change_form.html" %}
{% load url from future %}
{% block object-tools %}
{% if change %}{% if not is_popup %}
<ul class="object-tools">
    {% if not original.is_validated %}
        <li><a href="{% url 'admin:invoice_validate' id=object_id %}">Valider la facture</a></li>
    {% else %}
        <li><a href="{% url 'billing:invoice_pdf' id=object_id %}">Télécharger le PDF</a></li>
    {% endif %}
</ul>
{% endif %}{% endif %}
{% endblock %}
