70 lines
3.1 KiB
HTML
70 lines
3.1 KiB
HTML
{% 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 "–" }}
|
||
{% if f.course %}<br><span style="color: var(--text-muted); font-size: 0.8rem;">{{ f.course }}</span>{% endif %}
|
||
</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>
|
||
<div class="row-actions">
|
||
<a class="icon-btn edit" href="{{ url_for('fahrt_bearbeiten', fahrt_id=f.id) }}"
|
||
title="Fahrt bearbeiten" aria-label="Fahrt bearbeiten">
|
||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||
stroke-linecap="round" stroke-linejoin="round">
|
||
<path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path>
|
||
</svg>
|
||
</a>
|
||
<form method="post" action="{{ url_for('fahrt_loeschen', fahrt_id=f.id) }}"
|
||
onsubmit="return confirm('Fahrt wirklich löschen?');">
|
||
<button type="submit" class="icon-btn delete" title="Fahrt löschen" aria-label="Fahrt löschen">
|
||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||
stroke-linecap="round" stroke-linejoin="round">
|
||
<polyline points="3 6 5 6 21 6"></polyline>
|
||
<path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path>
|
||
<path d="M10 11v6"></path>
|
||
<path d="M14 11v6"></path>
|
||
<path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"></path>
|
||
</svg>
|
||
</button>
|
||
</form>
|
||
</div>
|
||
</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 %}
|