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

{% block object-tools-items %}
  {% for view, name, description in extra_views %}
    <li>
      <a href="{% url opts|admin_urlname:name original.pk|admin_urlquote %}" >
        {% if description.switch_field %}
          {% for key, value in description.items %}
            {% if key == original|get_attr:description.switch_field %}{{ value }}{% endif %}
          {% endfor %}
        {% else %}
          {{ description }}
        {% endif %}
      </a>
    </li>
  {% endfor %}
  {{ block.super }}
{% endblock %}