Affiche les 20 dernières entrées sur la page d'accueil
Ajoute une carte « Dernières entrées » sous « Aujourd'hui », rafraîchie via htmx sur entries-changed (route /ui/recent). Closes #1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dd6a740645
commit
8488b9217d
5 files changed
+87
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<section id="recent" class="card" hx-get="/ui/recent" hx-trigger="entries-changed from:body" hx-swap="outerHTML">
|
||||
<div class="card-head">
|
||||
<h2>Dernières entrées</h2>
|
||||
<a href="/entries">Tout voir</a>
|
||||
</div>
|
||||
{% if recent_entries.is_empty() %}
|
||||
<p class="empty">Aucune entrée pour l'instant.</p>
|
||||
{% else %}
|
||||
<div class="table-wrap">
|
||||
<table class="entries">
|
||||
<tbody>
|
||||
{% for e in recent_entries %}
|
||||
<tr{% if e.running() %} class="running"{% endif %}>
|
||||
<td class="nowrap">{{ e.day() }}</td>
|
||||
<td class="time">{{ e.start_time() }} – {{ e.end_time() }}</td>
|
||||
<td>
|
||||
<span class="dot" style="--color: {{ e.color }}"></span><span class="client">{{ e.client_name }}</span> / {{ e.project_name }}
|
||||
{% if !e.note.is_empty() %}<div class="note">{{ e.note }}</div>{% endif %}
|
||||
</td>
|
||||
<td class="num">{{ e.duration() }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
@@ -3,4 +3,5 @@
|
||||
{% block content %}
|
||||
{% include "_timer.html" %}
|
||||
{% include "_today.html" %}
|
||||
{% include "_recent.html" %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user