Files
pbt/templates/dashboard.html
T
zisco ca90346f0b
Deploy PBT / deploy (push) Successful in 17s
Add edit my rides
2026-09-11 08:03:19 +02:00

67 lines
3.0 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>
<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 %}