{% load extra_urls i18n admin_static admin_list admin_urls %} {% for method_name, urlattrs in adminform.model_admin.extra_detail_buttons %} {% has_permission urlattrs.perm as authorized %} {% if authorized and urlattrs.visible%} {% nlless %}
  • {% if original.pk %} {% if icon %}   {% endif %} {{ urlattrs.label }} {% else %} {% if not urlsattrs.exclude_if_adding %} {% if icon %}   {% endif %} {{ urlattrs.label }} {%endif %} {% endif %}
  • {% endnlless %} {% endif %} {% endfor %}