37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Historique{% endblock %}
|
|
{% block content %}
|
|
|
|
<h1 class="text-xl font-bold mb-4">Historique</h1>
|
|
|
|
{% if not entries %}
|
|
<p class="text-gray-500 text-center py-8">Aucune entrée pour le moment.</p>
|
|
{% endif %}
|
|
|
|
<div class="space-y-2">
|
|
{% for entry in entries %}
|
|
<div class="bg-white rounded-xl shadow p-3 flex items-center justify-between">
|
|
<div>
|
|
<p class="font-medium text-sm">{{ entry.date.strftime('%a %d %b %Y') }}</p>
|
|
<p class="text-xs text-gray-500">
|
|
{{ entry.day_type }}
|
|
{% if entry.time_slots %} — {{ entry.total_hours_str() }}{% endif %}
|
|
{% if entry.journey_profile_id %} — {{ entry.journey_profile_id }}{% endif %}
|
|
</p>
|
|
{% if entry.comment %}
|
|
<p class="text-xs text-gray-400 mt-0.5 italic">{{ entry.comment }}</p>
|
|
{% endif %}
|
|
</div>
|
|
<div class="flex gap-2">
|
|
<a href="/entries/{{ entry.id }}/edit" class="text-blue-500 text-sm hover:underline">Éditer</a>
|
|
<form method="POST" action="/entries/{{ entry.id }}/delete"
|
|
onsubmit="return confirm('Supprimer cette entrée ?')">
|
|
<button class="text-red-400 text-sm hover:underline">Suppr.</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% endblock %}
|