Commit 79adb515 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #12694 -- Added template block to make it easier to add new tools to the...

Fixed #12694 -- Added template block to make it easier to add new tools 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
parent ae7213b5
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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>
  <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 %}
+7 −5
Original line number Diff line number Diff line
@@ -58,11 +58,13 @@
    {% block object-tools %}
      {% if has_add_permission %}
        <ul class="object-tools">
          {% 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 %}