From 069a8858baa6a6b687e67312ffdbcdfc55cee4b7 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 20 Dec 2006 05:00:36 +0000 Subject: [PATCH] Fixed #3128: Added explicit object-tools block so custom admin templates can override it where needed. Thanks, Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4230 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/templates/admin/base.html | 5 ++++- django/contrib/admin/templates/admin/change_form.html | 2 ++ django/contrib/admin/templates/admin/change_list.html | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html index b63604b268..d3e8c96b91 100644 --- a/django/contrib/admin/templates/admin/base.html +++ b/django/contrib/admin/templates/admin/base.html @@ -38,7 +38,10 @@
{% block pretitle %}{% endblock %} {% block content_title %}{% if title %}

{{ title|escape }}

{% endif %}{% endblock %} - {% block content %}{{ content }}{% endblock %} + {% block content %} + {% block object-tools %}{% endblock %} + {{ content }} + {% endblock %} {% block sidebar %}{% endblock %}
diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html index b1fdc5ebdb..7e7b639139 100644 --- a/django/contrib/admin/templates/admin/change_form.html +++ b/django/contrib/admin/templates/admin/change_form.html @@ -16,11 +16,13 @@ {% endif %}{% endblock %} {% block content %}
+{% block object-tools %} {% if change %}{% if not is_popup %} {% endif %}{% endif %} +{% endblock %}
{% block form_top %}{% endblock %}
{% if is_popup %}{% endif %} diff --git a/django/contrib/admin/templates/admin/change_list.html b/django/contrib/admin/templates/admin/change_list.html index bd2304bd52..f50a73c934 100644 --- a/django/contrib/admin/templates/admin/change_list.html +++ b/django/contrib/admin/templates/admin/change_list.html @@ -7,9 +7,11 @@ {% block coltype %}flex{% endblock %} {% block content %}
+{% block object-tools %} {% if has_add_permission %} {% endif %} +{% endblock %}
{% block search %}{% search_form cl %}{% endblock %} {% block date_hierarchy %}{% date_hierarchy cl %}{% endblock %}