From 6cd7c0b7d36c50965647ae60bdd21ec3bf799b79 Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Tue, 18 Nov 2025 21:34:25 +0300 Subject: [PATCH] Add kit binding display in ConfigurableKitProduct templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated UI to show ProductKit associations for attribute values: - configurablekit_detail.html: * Added 'Комплект' column to attributes table * Shows linked ProductKit as clickable badge * Shows '—' for unbound attributes - configurablekit_list.html: * Added 'Атрибутов' column showing attribute count * Updated colspan for empty state message (6->7) Now users can see which ProductKit each attribute value is bound to in: 1. Detail view: Click product -> view attributes with kit bindings 2. List view: See total attribute count for each product 🤖 Generated with Claude Code Co-Authored-By: Claude --- .../templates/products/configurablekit_detail.html | 10 ++++++++++ .../templates/products/configurablekit_list.html | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/myproject/products/templates/products/configurablekit_detail.html b/myproject/products/templates/products/configurablekit_detail.html index a78e10f..f0691fa 100644 --- a/myproject/products/templates/products/configurablekit_detail.html +++ b/myproject/products/templates/products/configurablekit_detail.html @@ -139,6 +139,7 @@ Название атрибута Значение опции + Комплект Порядок Видимый @@ -148,6 +149,15 @@ {{ attr.name }} {{ attr.option }} + + {% if attr.kit %} + + {{ attr.kit.name }} + + {% else %} + + {% endif %} + {{ attr.position }} {% if attr.visible %} diff --git a/myproject/products/templates/products/configurablekit_list.html b/myproject/products/templates/products/configurablekit_list.html index 5e32661..af65921 100644 --- a/myproject/products/templates/products/configurablekit_list.html +++ b/myproject/products/templates/products/configurablekit_list.html @@ -59,6 +59,7 @@ Артикул Статус Вариантов + Атрибутов Дата создания Действия @@ -86,6 +87,9 @@ {{ item.options.count }} + + {{ item.parent_attributes.count }} + {{ item.created_at|date:"d.m.Y H:i" }} {% empty %} - + Нет вариативных товаров. Создать первый