diff --git a/myproject/products/templates/products/all_products_list.html b/myproject/products/templates/products/all_products_list.html new file mode 100644 index 0000000..3c46859 --- /dev/null +++ b/myproject/products/templates/products/all_products_list.html @@ -0,0 +1,242 @@ +{% extends 'base.html' %} + +{% block title %}Все товары и комплекты{% endblock %} + +{% block content %} +
| Тип | +Фото | +Название | +Артикул | +Категория | +Цена продажи | +Статус | +Действия | +
|---|---|---|---|---|---|---|---|
| + {% if item.item_type == 'product' %} + + + + {% else %} + + + + {% endif %} + | +
+ {% if item.photos.all %}
+ {% with photo=item.photos.first %}
+ |
+ + {% if item.item_type == 'product' %} + {{ item.name }} + {% else %} + {{ item.name }} + {% endif %} + | +{{ item.sku }} | ++ {% if item.categories.all %} + {% for category in item.categories.all %} + {{ category.name }}{% if not forloop.last %} {% endif %} + {% endfor %} + {% else %} + - + {% endif %} + | ++ {% if item.item_type == 'product' %} + {{ item.sale_price|floatformat:2 }} руб. + {% else %} + {{ item.get_sale_price|floatformat:2 }} руб. + {% endif %} + | ++ {% if item.is_active %} + Активен + {% else %} + Неактивен + {% endif %} + | +
+
+ {% if item.item_type == 'product' %}
+
+
+
+ {% if perms.products.change_product %}
+
+
+
+ {% endif %}
+ {% if perms.products.delete_product %}
+
+
+
+ {% endif %}
+ {% else %}
+
+
+
+ {% if perms.products.change_productkit %}
+
+
+
+ {% endif %}
+ {% if perms.products.delete_productkit %}
+
+
+
+ {% endif %}
+ {% endif %}
+
+ |
+
В данный момент нет товаров или комплектов, соответствующих выбранным фильтрам.
+