Permet de copier une journée vers un autre jour

Bouton copier sur l'en-tête de chaque jour : les entrées affichées sont
recopiées à la date choisie avec les mêmes heures, projet et note
(POST /ui/jours/{date}/dupliquer, tout ou rien). L'entrée en cours est
ignorée ; projet archivé ou même jour refusés.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Romulus21andClaude Opus 5.5 committed 2026-11-13 19:31:00 +01:00
1 parent 3164fa8048
commit e6a1dd7e4b
7 files changed
+204 -2

No files matched your search

+20 -1
View File
@@ -1,6 +1,25 @@
{% import "_icons.html" as icons %}
{% for d in days %}
<tbody>
<tr class="day-head"><th colspan="3">{{ d.day }}</th><th class="num">{{ d.total }}</th><th></th></tr>
<tr class="day-head">
<th colspan="3">{{ d.day }}</th>
<th class="num">{{ d.total }}</th>
<th class="actions">
<button class="btn small icon" title="Copier cette journée vers un autre jour" aria-label="Copier cette journée vers un autre jour" hx-on:click="toggleDayCopy(this)">{% call icons::icon("copy") %}{% endcall %}</button>
</th>
</tr>
<tr class="day-copy" hidden>
<td colspan="5">
<form class="row" hx-post="/ui/jours/{{ d.date }}/dupliquer" hx-swap="none">
<input type="hidden" name="ids" value="{{ d.ids() }}">
<label>Copier les entrées du {{ d.day }} vers le <input type="date" name="vers" value="{{ d.copy_to() }}" required></label>
<div class="btn-group">
<button class="btn small icon primary" title="Copier" aria-label="Copier">{% call icons::icon("check") %}{% endcall %}</button>
<button type="button" class="btn small icon" title="Annuler" aria-label="Annuler" hx-on:click="toggleDayCopy(this)">{% call icons::icon("close") %}{% endcall %}</button>
</div>
</form>
</td>
</tr>
{% for e in d.entries %}{% include "_entry_row.html" %}{% endfor %}
</tbody>
{% endfor %}