Feature: тёмная тема, минималистичный UI, улучшения UX

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-25 15:22:18 +00:00
parent a181413dda
commit a684bede12
18 changed files with 860 additions and 305 deletions

View File

@@ -1,11 +1,15 @@
{% extends "base.html" %}
{% block title %}Удалить {{ object }} — ERP WaterSurf{% endblock %}
{% block content %}
<h2>Удалить запись?</h2>
<p>{{ object }}</p>
<form method="post">
{% csrf_token %}
<button type="submit" class="btn btn-danger">Удалить</button>
<a href="{{ cancel_url }}" class="btn btn-secondary">Отмена</a>
</form>
<div class="ws-card">
<h2 class="ws-page-title">Удалить запись?</h2>
<p class="ws-confirm-text">{{ object }}</p>
<form method="post">
{% csrf_token %}
<div class="ws-btn-group">
<button type="submit" class="btn btn-ws-danger">Удалить</button>
<a href="{{ cancel_url }}" class="btn btn-ws-secondary">Отмена</a>
</div>
</form>
</div>
{% endblock %}

View File

@@ -1,11 +1,21 @@
{% extends "base.html" %}
{% block title %}{{ title }} — ERP WaterSurf{% endblock %}
{% block content %}
<h2>{% if object %}Редактировать{% else %}Создать{% endif %} {{ title }}</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit" class="btn btn-primary">Сохранить</button>
<a href="{{ cancel_url }}" class="btn btn-secondary">Отмена</a>
</form>
<div class="ws-card">
<h2 class="ws-page-title">{% if object %}Редактировать{% else %}Создать{% endif %} {{ title }}</h2>
<form method="post">
{% csrf_token %}
{% for field in form %}
<div class="ws-form-group">
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{{ field }}
{% if field.errors %}<small class="ws-text-danger">{{ field.errors.0 }}</small>{% endif %}
</div>
{% endfor %}
<div class="ws-btn-group" style="margin-top: 1rem;">
<button type="submit" class="btn btn-ws-primary">Сохранить</button>
<a href="{{ cancel_url }}" class="btn btn-ws-secondary">Отмена</a>
</div>
</form>
</div>
{% endblock %}

View File

@@ -1,30 +1,36 @@
{% extends "base.html" %}
{% block title %}{{ title }} — ERP WaterSurf{% endblock %}
{% block content %}
<h2>{{ title }}</h2>
<p><a href="{% url create_url_name %}" class="btn btn-primary">Добавить</a></p>
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
{% block table_headers %}<th>Название</th>{% endblock %}
<th></th>
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
<td>{{ item.pk }}</td>
{% block table_cells %}<td>{{ item }}</td>{% endblock %}
<td>
<a href="{% block edit_url %}{% url update_url_name item.pk %}{% endblock %}">Изменить</a>
|
<a href="{% block delete_url %}{% url delete_url_name item.pk %}{% endblock %}" class="text-danger">Удалить</a>
</td>
</tr>
{% empty %}
<tr><td colspan="3">Нет записей.</td></tr>
{% endfor %}
</tbody>
</table>
<div class="ws-card">
<div class="ws-card-header">
<h2 class="ws-page-title mb-0">{{ title }}</h2>
<a href="{% url create_url_name %}" class="btn btn-ws-primary">Добавить</a>
</div>
<div class="ws-table-wrap">
<table class="ws-table">
<thead>
<tr>
<th>#</th>
{% block table_headers %}<th>Название</th>{% endblock %}
<th></th>
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
<td>{{ item.pk }}</td>
{% block table_cells %}<td>{{ item }}</td>{% endblock %}
<td class="ws-actions">
<a href="{% block edit_url %}{% url update_url_name item.pk %}{% endblock %}" class="ws-link">Изменить</a>
<span class="ws-text-muted"> · </span>
<a href="{% block delete_url %}{% url delete_url_name item.pk %}{% endblock %}" class="ws-link ws-link-danger">Удалить</a>
</td>
</tr>
{% empty %}
<tr><td colspan="3" class="ws-empty">Нет записей.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}