feat: release v1.8.0 — connections dashboard, VK OAuth, sync config, catalog browser
- Connections dashboard with add/remove flow and background health checks - VK OAuth connection with profile info and health monitoring - Sync configuration page with master toggle and filter summary - Catalog browser with store/group/product tables, filter management, CSV export - Alembic migrations for all new tables - run/read_config.py for shell sync script DB integration - CHANGELOG.md updated for v1.8.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
108
web/templates/catalog_groups.html
Normal file
108
web/templates/catalog_groups.html
Normal file
@@ -0,0 +1,108 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Группы — {{ store.name }} — EvoSync{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb" class="mb-3">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/catalog">Каталог</a></li>
|
||||
<li class="breadcrumb-item active">{{ store.name }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between mb-3">
|
||||
<h1 class="h4 mb-0">Группы товаров</h1>
|
||||
<a href="/catalog/export?type=groups&store_id={{ store.evotor_id }}" class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-download me-1"></i>Экспорт CSV
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% if not groups %}
|
||||
<div class="text-center py-5 text-muted">
|
||||
<i class="bi bi-folder fs-1 mb-3 d-block"></i>
|
||||
<p>Группы не найдены в этом магазине.</p>
|
||||
<a href="/catalog/products?store_id={{ store.evotor_id }}" class="btn btn-outline-primary btn-sm">
|
||||
Посмотреть все товары магазина
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover align-middle">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Название</th>
|
||||
<th>Кол-во товаров</th>
|
||||
<th>Фильтр</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for group in groups %}
|
||||
{% set mode = filter_map.get(group.evotor_id) %}
|
||||
<tr>
|
||||
<td>{{ group.name }}</td>
|
||||
<td class="text-muted">{{ product_counts.get(group.evotor_id, 0) }}</td>
|
||||
<td>
|
||||
{% if mode == "include" %}
|
||||
<span class="badge bg-success">✓ Включено</span>
|
||||
{% elif mode == "exclude" %}
|
||||
<span class="badge bg-danger">✗ Исключено</span>
|
||||
{% else %}
|
||||
<span class="badge bg-light text-muted border">— Нет правила</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<div class="d-flex gap-1 justify-content-end">
|
||||
<a href="/catalog/products?store_id={{ store.evotor_id }}&group_id={{ group.evotor_id }}"
|
||||
class="btn btn-outline-secondary btn-sm" title="Товары">
|
||||
<i class="bi bi-arrow-right"></i>
|
||||
</a>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-outline-secondary btn-sm dropdown-toggle" data-bs-toggle="dropdown">
|
||||
<i class="bi bi-funnel"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li>
|
||||
<form method="post" action="/catalog/filter">
|
||||
<input type="hidden" name="entity_type" value="group">
|
||||
<input type="hidden" name="entity_id" value="{{ group.evotor_id }}">
|
||||
<input type="hidden" name="entity_name" value="{{ group.name }}">
|
||||
<input type="hidden" name="filter_mode" value="include">
|
||||
<input type="hidden" name="parent_entity_id" value="{{ store.evotor_id }}">
|
||||
<input type="hidden" name="redirect_to" value="/catalog/groups?store_id={{ store.evotor_id }}">
|
||||
<button type="submit" class="dropdown-item">✓ Включить в синхронизацию</button>
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form method="post" action="/catalog/filter">
|
||||
<input type="hidden" name="entity_type" value="group">
|
||||
<input type="hidden" name="entity_id" value="{{ group.evotor_id }}">
|
||||
<input type="hidden" name="entity_name" value="{{ group.name }}">
|
||||
<input type="hidden" name="filter_mode" value="exclude">
|
||||
<input type="hidden" name="parent_entity_id" value="{{ store.evotor_id }}">
|
||||
<input type="hidden" name="redirect_to" value="/catalog/groups?store_id={{ store.evotor_id }}">
|
||||
<button type="submit" class="dropdown-item">✗ Исключить из синхронизации</button>
|
||||
</form>
|
||||
</li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li>
|
||||
<form method="post" action="/catalog/filter">
|
||||
<input type="hidden" name="entity_type" value="group">
|
||||
<input type="hidden" name="entity_id" value="{{ group.evotor_id }}">
|
||||
<input type="hidden" name="entity_name" value="{{ group.name }}">
|
||||
<input type="hidden" name="filter_mode" value="none">
|
||||
<input type="hidden" name="parent_entity_id" value="{{ store.evotor_id }}">
|
||||
<input type="hidden" name="redirect_to" value="/catalog/groups?store_id={{ store.evotor_id }}">
|
||||
<button type="submit" class="dropdown-item text-muted">— Убрать правило</button>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user