delete_confirmation.html 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n admin_urls jet_tags %}
  3. {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation{% endblock %}
  4. {% block breadcrumbs %}
  5. <div class="breadcrumbs">
  6. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  7. &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{% if opts.app_config.verbose_name %}{{ opts.app_config.verbose_name }}{% else %}{% trans app_label as app_label %}{{ app_label|capfirst|escape }}{% endif %}</a>
  8. &rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst|escape }}</a>
  9. &rsaquo; <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a>
  10. &rsaquo; {% trans 'Delete' %}
  11. </div>
  12. {% endblock %}
  13. {% block content %}
  14. {% if perms_lacking %}
  15. <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>
  16. <ul>
  17. {% for obj in perms_lacking %}
  18. <li>{{ obj }}</li>
  19. {% endfor %}
  20. </ul>
  21. {% elif protected %}
  22. <p>{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktrans %}</p>
  23. <ul>
  24. {% for obj in protected %}
  25. <li>{{ obj }}</li>
  26. {% endfor %}
  27. </ul>
  28. {% else %}
  29. <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>
  30. <div class="delete-summary">
  31. <div class="delete-summary-buttons">
  32. <form action="" method="post">{% csrf_token %}
  33. <div>
  34. <input type="hidden" name="post" value="yes" />
  35. {% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %}
  36. {% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" />{% endif %}
  37. <input type="submit" class="button-red" value="{% trans "Yes, I'm sure" %}" />
  38. <a href="#" onclick="window.history.back(); return false;" class="cancel-link button button-background">{% trans "No, take me back" %}</a>
  39. </div>
  40. </form>
  41. </div>
  42. {% include "admin/includes/object_delete_summary.html" %}
  43. </div>
  44. <div class="delete-objects">
  45. <ul class="delete-objects-list">
  46. {% for item in deleted_objects|format_deletable_object %}
  47. <li class="delete-objects-list-item{% if item.list %} collapsable{% endif %}">
  48. <div class="delete-objects-list-item-row">
  49. {% if item.list %}
  50. <a class="delete-objects-list-item-row-collapse" href="#">
  51. {% trans "Objects" %}: {{ item.list|length }}
  52. <span class="icon-arrow-down"></span>
  53. </a>
  54. {% endif %}
  55. {{ item.text }}
  56. </div>
  57. {% if item.list %}
  58. <div class="delete-objects-list-item-collapsable">
  59. <ul class="delete-objects-list-item-collapsable-list">{{ item.list|unordered_list }}</ul>
  60. </div>
  61. {% endif %}
  62. </li>
  63. {% endfor %}
  64. </ul>
  65. </div>
  66. {% endif %}
  67. {% endblock %}