Initial commit
This commit is contained in:
32
templates/admin/products.html
Normal file
32
templates/admin/products.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
<h2 class="mb-4">Категории опроса: <span class="text-primary">{{ survey.name }}</span></h2>
|
||||
|
||||
<form method="post" class="mb-4">
|
||||
<div class="input-group shadow-sm">
|
||||
<input type="text" name="name" class="form-control" placeholder="Название категории (например: Базовые возможности)" required>
|
||||
<button type="submit" class="btn btn-success">➕ Добавить</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="list-group shadow-sm">
|
||||
{% for product in products %}
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<strong>{{ product.name }}</strong>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<a href="{{ url_for('manage_features', product_id=product.id) }}" class="btn btn-sm btn-outline-primary">Вопросы</a>
|
||||
<form method="post" action="{{ url_for('delete_product', product_id=product.id, survey_id=survey.id) }}"
|
||||
onsubmit="return confirm('Удалить категорию «{{ product.name }}»?');">
|
||||
<button class="btn btn-sm btn-outline-danger">🗑</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="list-group-item text-muted text-center">Нет категорий</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<a href="{{ url_for('manage_surveys') }}" class="btn btn-link mt-4">← Назад к опросникам</a>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user