# HG changeset patch # User Branko Majic # Date 2017-12-22 10:41:15 # Node ID c8d79d2d0e3e9b3cd68a1599d80ac2482c4463db # Parent 421171af6c750f43b64575dbb5e905b65c58e9bc CONNT-25: Updated change_list.html admin template: - Enclose the object-tools-items block content with a permission check, same as in current version of Django Admin (1.11.x). - URL generation has _not_ been brought up to date. diff --git a/conntrackt/templates/admin/conntrackt/communication/change_list.html b/conntrackt/templates/admin/conntrackt/communication/change_list.html --- a/conntrackt/templates/admin/conntrackt/communication/change_list.html +++ b/conntrackt/templates/admin/conntrackt/communication/change_list.html @@ -3,12 +3,14 @@ {% load admin_urls %} {% block object-tools-items %} -
  • - {# Add the GET parameters from the admin's filter to 'Add entity' button #} - {# so we can perform some filtering on source/destination interfaces. #} - + {% if has_add_permission %} +
  • + {# Add the GET parameters from the admin's filter to 'Add entity' button #} + {# so we can perform some filtering on source/destination interfaces. #} + {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %} - -
  • + + + {% endif %} {% endblock %}