Нема описа

delete_confirmation.html 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n admin_urls static %}
  3. {% block extrahead %}
  4. {{ block.super }}
  5. {{ media }}
  6. <script src="{% static 'admin/js/cancel.js' %}" async></script>
  7. {% endblock %}
  8. {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation{% endblock %}
  9. {% block breadcrumbs %}
  10. <div class="breadcrumbs">
  11. <a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
  12. &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
  13. &rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
  14. &rsaquo; <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a>
  15. &rsaquo; {% translate 'Delete' %}
  16. </div>
  17. {% endblock %}
  18. {% block content %}
  19. {% if perms_lacking %}
  20. <p>{% blocktranslate 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:{% endblocktranslate %}</p>
  21. <ul>
  22. {% for obj in perms_lacking %}
  23. <li>{{ obj }}</li>
  24. {% endfor %}
  25. </ul>
  26. {% elif protected %}
  27. <p>{% blocktranslate with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktranslate %}</p>
  28. <ul>
  29. {% for obj in protected %}
  30. <li>{{ obj }}</li>
  31. {% endfor %}
  32. </ul>
  33. {% else %}
  34. <p>{% blocktranslate 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:{% endblocktranslate %}</p>
  35. {% include "admin/includes/object_delete_summary.html" %}
  36. <h2>{% translate "Objects" %}</h2>
  37. <ul>{{ deleted_objects|unordered_list }}</ul>
  38. <form method="post">{% csrf_token %}
  39. <div>
  40. <input type="hidden" name="post" value="yes">
  41. {% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
  42. {% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %}
  43. <input type="submit" value="{% translate 'Yes, I’m sure' %}">
  44. <a href="#" class="button cancel-link">{% translate "No, take me back" %}</a>
  45. </div>
  46. </form>
  47. {% endif %}
  48. {% endblock %}