-
Notifications
You must be signed in to change notification settings - Fork 105
Description
Using django-grappelli (not sure that's related) I can see duplicated object tools from reversion_compare/templates/reversion-compare/compare_links_partial.html (the previous and next links) in both the header and the main content.
From all templates referencing compare_links_partial.html as per
https://github.com/search?q=repo%3Ajedie%2Fdjango-reversion-compare%20reversion-compare%2Fcompare_links_partial.html&type=code
I can only see compare.html used in the screenshot shown above. I'm puzzled where the second object tools are invoked here.
This is just a mild inconvenience I can fix by overriding the template of compare.py.
I can fix the duplication by moving the object-tools
block in compare.html
out of the content
block:
{% block object-tools %}
<ul class="object-tools">
{% block object-tools-items %}
{% include "reversion-compare/compare_links_partial.html" %}
{% endblock %}
</ul>
{% endblock %}
{% block content %}
<div id="content-main">
<p class="help">
{% blocktrans with date1=version1.revision.date_created|date:_("DATETIME_FORMAT") date2=version2.revision.date_created|date:_("DATETIME_FORMAT") %}
Compare <strong>{{ date1 }}</strong> with <strong>{{ date2 }}</strong>:
{% endblocktrans %}
</p>
{% include "reversion-compare/compare_partial.html" %}
‹ <a href="{{ history_url }}">{% trans "Go back to history list" %}</a>
|
<a href="{{ save_url }}">{% trans "Revert to this version" %}</a> ›
</div>
{% endblock %}
Now the admin looks like this:
Unrelated, I've removed the duplicated actions above compare_partial.
Does anyone else see this duplication of the content tools block?