Отдельная страница для вывода результатов
This commit is contained in:
26
App/Queries/templates/output.html
Normal file
26
App/Queries/templates/output.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Заготовки на складе</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Заготовки на складе</h1>
|
||||
<!-- Output -->
|
||||
<table>
|
||||
<tr>
|
||||
{% for category in categories %}
|
||||
<th>{{ category }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
<td>{{ item['material'] }}</td>
|
||||
<td>{{ item['weight'] }}</td>
|
||||
<td>{{ item['price'] }}</td>
|
||||
<td>{{ item['count'] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,7 +6,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<button><a href="{{ url_for('logout') }}">Выход</a></button>
|
||||
{% if status %}
|
||||
<!-- Input -->
|
||||
<h1>Выберите материал</h1>
|
||||
<form action="" method="post">
|
||||
@@ -17,30 +16,6 @@
|
||||
</select>
|
||||
<input type="submit" value="Отправить">
|
||||
</form>
|
||||
{% else %}
|
||||
<!-- Output -->
|
||||
{% if items %}
|
||||
<h1>Заготовки на складе</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Материал</th>
|
||||
<th>Вес</th>
|
||||
<th>Цена</th>
|
||||
<th>Количество</th>
|
||||
</tr>
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
<td>{{ item['material'] }}</td>
|
||||
<td>{{ item['weight'] }}</td>
|
||||
<td>{{ item['price'] }}</td>
|
||||
<td>{{ item['count'] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<h1>Заготовок нет</h1>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<button><a href="{{ url_for('requests_bp.requests') }}">Обратно в меню запросов</a></button>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user