Files
pbt/templates/dashboard.html
T
zisco 2a6e9c690b
Deploy PBT / deploy (push) Successful in 16s
Fetch stops from OpenStreetMap
2026-09-10 21:44:45 +02:00

48 lines
1.9 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.
{% extends "base.html" %}
{% block title %}Meine Fahrten PBT{% endblock %}
{% block content %}
<h2 style="font-size: 1.1rem; font-weight: 600;">Meine Fahrten</h2>
{% if not fahrten %}
<div class="card" style="text-align: center;">
<p style="color: var(--text-muted);">Noch keine Fahrten erfasst.</p>
<a href="{{ url_for('neue_fahrt') }}" class="btn" style="display: inline-block; width: auto; padding: 0.6rem 1.2rem;">Erste Fahrt hinzufügen</a>
</div>
{% else %}
<table>
<thead>
<tr>
<th>Datum</th>
<th>Verkehrsmittel</th>
<th>Linie</th>
<th>Strecke</th>
<th>Bewertung</th>
<th></th>
</tr>
</thead>
<tbody>
{% for f in fahrten %}
<tr>
<td>{{ f.trip_date.strftime("%d.%m.%Y") }}</td>
<td>{{ f.transport_mode }}</td>
<td>{{ f.line or "" }}</td>
<td>
{{ f.origin }}{% if f.origin_stop %}<span class="stop-dot" title="Verifizierte Haltestelle"></span>{% endif %}
→ {{ f.destination }}{% if f.destination_stop %}<span class="stop-dot" title="Verifizierte Haltestelle"></span>{% endif %}
</td>
<td class="stars">{{ "★" * f.rating }}{{ "☆" * (5 - f.rating) }}</td>
<td>
<form method="post" action="{{ url_for('fahrt_loeschen', fahrt_id=f.id) }}" onsubmit="return confirm('Fahrt wirklich löschen?');" style="margin: 0;">
<button type="submit" class="secondary" style="width: auto; padding: 0.35rem 0.7rem; font-size: 0.8rem;">Löschen</button>
</form>
</td>
</tr>
{% if f.comment %}
<tr><td></td><td colspan="5" style="color: var(--text-muted); font-size: 0.85rem;">{{ f.comment }}</td></tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}