Kaydet (Commit) 79adb515 authored tarafından Russell Keith-Magee's avatar Russell Keith-Magee

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
üst ae7213b5
......@@ -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 %}
......
......@@ -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 %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment