@@ -0,0 +1,41 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Meine Fahrten – PBT{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Meine Fahrten</h2>
|
||||
|
||||
{% if not fahrten %}
|
||||
<p>Noch keine Fahrten erfasst. <a href="{{ url_for('neue_fahrt') }}">Jetzt die erste hinzufügen</a>.</p>
|
||||
{% 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.datum.strftime("%d.%m.%Y") }}</td>
|
||||
<td>{{ f.verkehrsmittel }}</td>
|
||||
<td>{{ f.linie or "–" }}</td>
|
||||
<td>{{ f.von }} → {{ f.nach }}</td>
|
||||
<td class="stars">{{ "★" * f.bewertung }}{{ "☆" * (5 - f.bewertung) }}</td>
|
||||
<td>
|
||||
<form method="post" action="{{ url_for('fahrt_loeschen', fahrt_id=f.id) }}" onsubmit="return confirm('Fahrt wirklich löschen?');">
|
||||
<button type="submit" class="secondary">Löschen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% if f.kommentar %}
|
||||
<tr><td></td><td colspan="5" style="color:#666;">{{ f.kommentar }}</td></tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user