Ticket #12694: 12694.2.diff

File 12694.2.diff, 2.0 KB (added by DrMeers, 5 years ago)

change_form.html *and* change_list.html

  • django/contrib/admin/templates/admin/change_form.html

    diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html
    index 7c96628..c2fe812 100644
    a b  
    2525{% block content %}<div id="content-main">
    2626{% block object-tools %}
    2727{% if change %}{% if not is_popup %}
    28   <ul class="object-tools"><li><a href="history/" class="historylink">{% trans "History" %}</a></li>
    29   {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
     28  <ul class="object-tools">
     29    {% block object-tools-items %}
     30    <li><a href="history/" class="historylink">{% trans "History" %}</a></li>
     31    {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
     32    {% endblock %}
    3033  </ul>
    3134{% endif %}{% endif %}
    3235{% endblock %}
  • django/contrib/admin/templates/admin/change_list.html

    diff --git a/django/contrib/admin/templates/admin/change_list.html b/django/contrib/admin/templates/admin/change_list.html
    index cb4bae3..3dfe467 100644
    a b  
    5858    {% block object-tools %}
    5959      {% if has_add_permission %}
    6060        <ul class="object-tools">
    61           <li>
    62             <a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">
    63               {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
    64             </a>
    65           </li>
     61          {% block object-tools-items %}
     62            <li>
     63              <a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">
     64                {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
     65              </a>
     66            </li>
     67          {% endblock %}
    6668        </ul>
    6769      {% endif %}
    6870    {% endblock %}
Back to Top