Skip to content

Commit

Permalink
jazzband#527 Fixes issue where the history button doesn't work when v…
Browse files Browse the repository at this point in the history
…iewing a historical entry
  • Loading branch information
trumpet2012 committed Oct 4, 2024
1 parent 7fdebc8 commit 6a9e0f3
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "admin/change_form.html" %}
{% load i18n %}
{% load i18n admin_urls %}
{% load url from simple_history_compat %}

{% block breadcrumbs %}
Expand All @@ -21,6 +21,14 @@
{% include "simple_history/submit_line.html" %}
{% endblock %}

{% block object-tools-items %}
{# We override this block from the django template to fix up the history link #}
<li>
<a href="{% add_preserved_filters history_url %}" class="historylink">{% translate "History" %}</a>
</li>
{% if has_absolute_url %}<li><a href="{{ absolute_url }}" class="viewsitelink">{% translate "View on site" %}</a></li>{% endif %}
{% endblock %}

{% block form_top %}
<p>{% if not revert_disabled %}{% blocktrans %}Press the 'Revert' button below to revert to this version of the object.{% endblocktrans %}{% endif %}{% if change_history %}{% blocktrans %}Press the 'Change History' button below to edit the history.{% endblocktrans %}{% endif %}</p>
{% endblock %}

0 comments on commit 6a9e0f3

Please sign in to comment.