2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-27 11:06:44 +00:00
InvenTree/InvenTree/part/templates/part/category_delete.html
2022-05-20 13:35:07 +02:00

33 lines
1.3 KiB
HTML

{% extends "modal_delete_form.html" %}
{% load i18n %}
{% block pre_form_content %}
<div class='alert alert-block alert-danger'>
{% trans "Are you sure you want to delete this part category?" %}
</div>
{% if category.children.all|length > 0 %}
<div class='alert alert-block alert-warning'>
{% blocktrans with n=category.children.all|length %}This category contains {{ n }} child categories{% endblocktrans %}.<br>
{% if category.parent %}
{% blocktrans with category=category.parent.name %}If this category is deleted, these child categories will be moved to {{ category }}{% endblocktrans %}.
{% else %}
{% trans "If this category is deleted, these child categories will be moved to the top level part category" %}.
{% endif %}
</div>
{% endif %}
{% if category.parts.all|length > 0 %}
<div class='alert alert-block alert-warning'>
{% blocktrans with n=category.parts.all|length %}This category contains {{ n }} parts{% endblocktrans %}.<br>
{% if category.parent %}
{% blocktrans with category=category.parent.name %}If this category is deleted, these parts will be moved to {{ category }}{% endblocktrans %}.
{% else %}
{% trans "If this category is deleted, these parts will be moved to the top level part category" %}.
{% endif %}
</div>
{% endif %}
{% endblock %}