delete_confirmation.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n %}
  3. {% load url from future %}
  4. {% load admin_urls %}
  5. {% block breadcrumbs %}
  6. <div class="breadcrumbs">
  7. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  8. &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ app_label|capfirst }}</a>
  9. &rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst|escape }}</a>
  10. &rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}{{ object.pk }}">{{ object|truncatewords:"18" }}</a>
  11. &rsaquo; {% trans 'Delete' %}
  12. </div>
  13. {% endblock %}
  14. {% block content %}
  15. {% if perms_lacking or protected %}
  16. {% if perms_lacking %}
  17. <p>{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p>
  18. <ul>
  19. {% for obj in perms_lacking %}
  20. <li>{{ obj }}</li>
  21. {% endfor %}
  22. </ul>
  23. {% endif %}
  24. {% if protected %}
  25. <p>{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktrans %}</p>
  26. <ul>
  27. {% for obj in protected %}
  28. <li>{{ obj }}</li>
  29. {% endfor %}
  30. </ul>
  31. {% endif %}
  32. {% else %}
  33. <p>{% blocktrans with escaped_object=object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}</p>
  34. <ul>{{ deleted_objects|unordered_list }}</ul>
  35. <form action="" method="post">{% csrf_token %}
  36. <div>
  37. <input type="hidden" name="post" value="yes" />
  38. <input type="submit" value="{% trans "Yes, I'm sure" %}" />
  39. </div>
  40. </form>
  41. {% endif %}
  42. {% endblock %}