Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #12694 -- Added template block to make it easier to add new too…

…ls to the change_list and change_form templates. Thanks to andybak for the suggestion, and Simon Meers for the final patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 79adb5151481dde4ff72464e15afba94e1739223 1 parent ae7213b
Russell Keith-Magee freakboy3742 authored
7 django/contrib/admin/templates/admin/change_form.html
View
@@ -26,8 +26,11 @@
{% block content %}<div id="content-main">
{% block object-tools %}
{% if change %}{% if not is_popup %}
- <ul class="object-tools"><li><a href="history/" class="historylink">{% trans "History" %}</a></li>
- {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
+ <ul class="object-tools">
+ {% block object-tools-items %}
+ <li><a href="history/" class="historylink">{% trans "History" %}</a></li>
+ {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
+ {% endblock %}
</ul>
{% endif %}{% endif %}
{% endblock %}
12 django/contrib/admin/templates/admin/change_list.html
View
@@ -58,11 +58,13 @@
{% block object-tools %}
{% if has_add_permission %}
<ul class="object-tools">
- <li>
- <a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">
- {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
- </a>
- </li>
+ {% block object-tools-items %}
+ <li>
+ <a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">
+ {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
+ </a>
+ </li>
+ {% endblock %}
</ul>
{% endif %}
{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.