124-webapp/templates/result.html

82 lines
2.8 KiB
HTML
Raw Normal View History

2025-09-17 20:26:44 +02:00
<!-- templates/result.html -->
{% extends "base.html" %}
2025-09-17 16:35:11 +02:00
2025-09-17 20:26:44 +02:00
{% block title %}Druckkosten Ergebnis Studio EinsZwoVier{% endblock %}
2025-09-17 16:35:11 +02:00
2025-09-17 20:26:44 +02:00
{% block content %}
<div class="container">
<h1>Druckkosten für {{ result.filename }}</h1>
2025-09-17 16:35:11 +02:00
2025-09-17 20:26:44 +02:00
<!-- Erfolg / Fehler Banner -->
2025-09-17 16:35:11 +02:00
{% if success %}
<div class="alert success">{{ success }}</div>
{% endif %}
{% if error %}
<div class="alert error">{{ error }}</div>
{% endif %}
2025-09-11 16:01:32 +02:00
2025-09-17 20:26:44 +02:00
<!-- Ergebnis Tabelle -->
2025-09-17 16:35:11 +02:00
<table>
2025-09-17 20:26:44 +02:00
<thead>
<tr>
<th>Seite</th>
<th>Breite (m)</th>
<th>Höhe (m)</th>
<th>Fläche (m²)</th>
<th>Tinten %</th>
<th>Typ</th>
<th>Kosten (€)</th>
</tr>
</thead>
<tbody>
{% for page in result.pages %}
<tr class="{{ 'color' if page.is_color else 'black' }}">
<td>{{ page.page }}</td>
<td>{{ "%.3f"|format(page.width_m) }}</td>
<td>{{ "%.3f"|format(page.height_m) }}</td>
<td>{{ "%.4f"|format(page.area_m2) }}</td>
<td>{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}</td>
<td>{{ 'Farbe' if page.is_color else 'S/W' }}</td>
<td>{{ "%.2f"|format(page.cost) }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr class="totals">
<td colspan="3">Summe S/W</td>
<td>{{ "%.4f"|format(result.total_area_black) }}</td>
<td colspan="2"></td>
<td>{{ "%.2f"|format(result.total_cost_black) }}</td>
</tr>
<tr class="totals">
<td colspan="3">Summe Farbe</td>
<td>{{ "%.4f"|format(result.total_area_color) }}</td>
<td colspan="2"></td>
<td>{{ "%.2f"|format(result.total_cost_color) }}</td>
</tr>
<tr class="totals">
<td colspan="6">Gesamtsumme</td>
<td>{{ "%.2f"|format(result.grand_total) }}</td>
</tr>
</tfoot>
2025-09-17 16:35:11 +02:00
</table>
2025-09-11 16:01:32 +02:00
2025-09-17 20:26:44 +02:00
<!-- Auftrag senden Formular -->
2025-09-17 16:35:11 +02:00
<form action="/send-order" method="post">
2025-09-17 20:26:44 +02:00
<input type="hidden" name="filename" value="{{ result.filename }}">
<label for="name"><strong>Name:</strong></label>
<input type="text" id="name" name="name" required placeholder="Dein Name">
<label for="comment"><strong>Zusätzliche Hinweise:</strong></label>
<textarea id="comment" name="comment" rows="4" placeholder="z. B. doppelseitig oder spezielles Papier"></textarea>
<button type="submit">Auftrag senden</button>
2025-09-17 16:35:11 +02:00
</form>
2025-09-17 20:26:44 +02:00
<div class="link" style="text-align:center; margin-top:1em;">
<a href="/">Neues PDF hochladen</a>
2025-09-17 16:35:11 +02:00
</div>
2025-09-17 20:26:44 +02:00
</div>
{% endblock %}