Files
site/WESP_REL/app/lab/templates/print_ration.html
T
2026-07-17 12:57:18 +03:00

52 lines
1.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<title>{{ title }}</title>
<style>
body { font-family: system-ui, sans-serif; margin: 24px; color: #111; }
h1 { font-size: 1.25rem; margin: 0 0 8px; }
.meta { color: #555; margin-bottom: 16px; font-size: 0.9rem; }
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
th, td { border: 1px solid #ccc; padding: 6px 8px; text-align: left; }
th { background: #f5f5f5; }
.num { text-align: right; }
.indicators { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { border: 1px solid #ddd; border-radius: 4px; padding: 4px 8px; font-size: 0.85rem; }
@media print { body { margin: 12px; } }
</style>
</head>
<body>
<h1>{{ title }}</h1>
<div class="meta">
Рецепт: {{ recipe_name }} · Тип: {{ ration_type }} · Голов/рейс: {{ heads }}
</div>
<table>
<thead>
<tr>
<th>Ингредиент</th>
<th class="num">кг/день</th>
{% if mode == "compound" %}<th>В комб.</th>{% else %}<th>В рац.</th>{% endif %}
</tr>
</thead>
<tbody>
{% for line in lines %}
<tr>
<td>{{ line.name }}</td>
<td class="num">{{ line.daily_kg }}</td>
<td>{{ "да" if line.included else "нет" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if indicators %}
<div class="indicators">
{% for ind in indicators %}
<span class="badge">{{ ind.label }}: {{ ind.content }} {{ ind.unit }}</span>
{% endfor %}
</div>
{% endif %}
<script>window.addEventListener("load", () => window.print());</script>
</body>
</html>