{% extends "admin/change_list_object_tools.html" %}
{% load i18n admin_urls %}
{% load events_admin_url from pghistory_admin %}
{% load events_are_tracked from pghistory_admin %}

{% block object-tools-items %}
	{% if opts.label|events_are_tracked %}
	  	<li>
	  		{% url opts|admin_urlname:'changelist' as back_url %}
	    	<a href="{% events_admin_url %}?model={{ opts.label }}&back={% add_preserved_filters back_url %}" class="events-admin">
	          {% trans "Events" %}
	    	</a>
	  	</li>
	{% endif %}

  	{{ block.super }}
{% endblock %}
