delete_selected_confirmation.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n l10n admin_urls jet_tags %}
  3. {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation delete-selected-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 }}</a>
  9. &rsaquo; {% trans 'Delete multiple objects' %}
  10. </div>
  11. {% endblock %}
  12. {% block content %}
  13. {% if perms_lacking %}
  14. <p>{% blocktrans %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p>
  15. <ul>
  16. {% for obj in perms_lacking %}
  17. <li>{{ obj }}</li>
  18. {% endfor %}
  19. </ul>
  20. {% elif protected %}
  21. <p>{% blocktrans %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktrans %}</p>
  22. <ul>
  23. {% for obj in protected %}
  24. <li>{{ obj }}</li>
  25. {% endfor %}
  26. </ul>
  27. {% else %}
  28. <p>{% blocktrans %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktrans %}</p>
  29. <div class="delete-summary">
  30. <div class="delete-summary-buttons">
  31. <form action="" method="post">
  32. {% csrf_token %}
  33. <div>
  34. {% for obj in queryset %}
  35. <input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk|unlocalize }}" />
  36. {% endfor %}
  37. <input type="hidden" name="action" value="delete_selected" />
  38. <input type="hidden" name="post" value="yes" />
  39. <input type="submit" class="button-red" value="{% trans "Yes, I'm sure" %}" />
  40. <a href="#" onclick="window.history.back(); return false;" class="cancel-link button button-background">{% trans "No, take me back" %}</a>
  41. </div>
  42. </form>
  43. </div>
  44. {% include "admin/includes/object_delete_summary.html" %}
  45. </div>
  46. <div class="delete-objects">
  47. <ul class="delete-objects-list">
  48. {% for deletable_object in deletable_objects %}
  49. {% for item in deletable_object|format_deletable_object %}
  50. <li class="delete-objects-list-item{% if item.list %} collapsable{% endif %}">
  51. <div class="delete-objects-list-item-row">
  52. {% if item.list %}
  53. <a class="delete-objects-list-item-row-collapse" href="#">
  54. {% trans "Objects" %}: {{ item.list|length }}
  55. <span class="icon-arrow-down"></span>
  56. </a>
  57. {% endif %}
  58. {{ item.text }}
  59. </div>
  60. {% if item.list %}
  61. <div class="delete-objects-list-item-collapsable">
  62. <ul class="delete-objects-list-item-collapsable-list">{{ item.list|unordered_list }}</ul>
  63. </div>
  64. {% endif %}
  65. </li>
  66. {% endfor %}
  67. {% endfor %}
  68. </ul>
  69. </div>
  70. {% endif %}
  71. {% endblock %}