{% 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>
	<li><a href="{% url "admin:eo_facture_contrat_changelist" %}?client__id__exact={{ original.id }}">Contrats</a></li>
	<li><a href="{% url "admin:eo_facture_facture_changelist" %}?client__id__exact={{ original.id }}">Factures</a></li>
	<li><a href="{% url "admin:eo_facture_facture_add" %}?client={{ original.id }}">Ajouter une facture simple</a></li>
	<li><a href="{% url "admin:eo_facture_contrat_add" %}?tva={{ original.tva|stringformat:".2f" }}&client={{ original.id }}">Ajouter un contrat</a></li>
</ul>
{% endif %}{% endif %}
{% endblock %}
