From 157bd5008254fe6d4b9d297864ea80a1fb3a390a Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Sun, 23 Nov 2025 23:54:58 +0300 Subject: [PATCH] Refactor: Compact UI for product tags templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Redesigned tag_form.html and tag_list.html with modern, compact layout: - Narrower card width, inline form elements, simplified controls - List-group layout instead of table for tag list - Streamlined JavaScript with auto-hiding messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../products/templates/products/tag_form.html | 112 ++----- .../products/templates/products/tag_list.html | 309 +++++------------- 2 files changed, 119 insertions(+), 302 deletions(-) diff --git a/myproject/products/templates/products/tag_form.html b/myproject/products/templates/products/tag_form.html index dae88f2..f4d5ad1 100644 --- a/myproject/products/templates/products/tag_form.html +++ b/myproject/products/templates/products/tag_form.html @@ -3,96 +3,56 @@ {% block title %}{% if object %}Редактировать тег{% else %}Создать тег{% endif %}{% endblock %} {% block content %} -
+
-
-
-
-

- {% if object %} - Редактировать тег - {% else %} - Создать новый тег - {% endif %} -

-
-
+
+
+
+
+ + {% if object %}Редактировать{% else %}Новый тег{% endif %} +
+
{% csrf_token %} - -
- - {{ form.name }} - {% if form.name.errors %} -
- {{ form.name.errors }} -
- {% endif %} - {% if form.name.help_text %} -
{{ form.name.help_text }}
- {% endif %} -
- - -
- - {{ form.slug }} - {% if form.slug.errors %} -
- {{ form.slug.errors }} -
- {% endif %} - {% if form.slug.help_text %} -
{{ form.slug.help_text }}
- {% endif %} -
- - -
-
- {{ form.is_active }} - +
+
+ + {{ form.name }}
- {% if form.is_active.errors %} -
- {{ form.is_active.errors }} -
- {% endif %} + {% if form.name.errors %}{{ form.name.errors.0 }}{% endif %}
- -
+
+
+ + {{ form.slug }} +
+ {% if form.slug.errors %}{{ form.slug.errors.0 }}{% endif %} +
+ +
+ {{ form.is_active }} + +
+ +
- - Отмена - + Отмена
-
-
- - {% if object %} -
-
-
Дополнительная информация
-
    -
  • Создан: {{ object.created_at|date:"d.m.Y H:i" }}
  • -
  • Обновлен: {{ object.updated_at|date:"d.m.Y H:i" }}
  • -
+ {% if object %} +
+ + {{ object.updated_at|date:"d.m.Y H:i" }} + + {% endif %}
- {% endif %}
diff --git a/myproject/products/templates/products/tag_list.html b/myproject/products/templates/products/tag_list.html index 1d6f738..dd7e9ad 100644 --- a/myproject/products/templates/products/tag_list.html +++ b/myproject/products/templates/products/tag_list.html @@ -1,164 +1,75 @@ {% extends 'base.html' %} -{% block title %}Теги товаров{% endblock %} +{% block title %}Теги{% endblock %} {% block content %} -
-
-

Теги товаров

- - Создать тег - -
- - -
-
-
- Быстрое создание тега -
-
- - +
+
+
+ +
+
Теги
+
+ + +
-
-
-
+
- -
-
-
-
- - -
-
- - -
-
- -
+ + + + +
-
-
- -
-
+ {% if tags %} -
- - - - - - - - - - - - - {% for tag in tags %} - - - - - - - - - {% endfor %} - -
НазваниеSlugТоварыКомплектыСтатусДействия
- - {{ tag.name }} - - {{ tag.slug }} - {{ tag.products_count }} - - {{ tag.kits_count }} - -
- -
-
- -
+
+ {% for tag in tags %} +
+
+ +
+
+ {{ tag.name }} + {{ tag.slug }} +
+
+ {{ tag.products_count }} + {{ tag.kits_count }} +
+ + +
+
+
+ {% endfor %}
{% if is_paginated %} -