{% extends "admin/change_form.html" %}
{% load admin_urls i18n %}

{% block object-tools %}
{% if change %}{% if not is_popup %}
  {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
  <ul class="object-tools"><li><a href="{{ history_url }}" class="historylink">{% trans "History" %}</a></li>
  {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
  <li><a href="{% url "admin:eo_facture_contrat_duplicate" original.id %}">Dupliquer</a></li>
  <li><a href="{% url "admin:eo_facture_facture_changelist" %}?contrat={{ original.id }}">Factures</a></li>
  <li><a href="{% url "admin:eo_facture_facture_add" %}?contrat={{ original.id }}&client={{ original.client.id }}&taux_tva={{ original.tva }}">Ajouter une facture</a></li>
  <li><a href="{% url "admin:eo_facture_facture_add_simple" %}?contrat={{ original.id }}">Ajouter une facture comme pourcentage du total</a></li>
  </ul>
{% endif %}{% endif %}
{% endblock %}

