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 %}
+1
View File
@@ -4,6 +4,7 @@
{%- else if name == "copy" -%}<rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
{%- else if name == "trash" -%}<path d="M3 6h18"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M10 11v6"/><path d="M14 11v6"/>
{%- else if name == "check" -%}<path d="M20 6 9 17l-5-5"/>
{%- else if name == "close" -%}<path d="M18 6 6 18"/><path d="m6 6 12 12"/>
{%- else if name == "plus" -%}<path d="M5 12h14"/><path d="M12 5v14"/>
{%- else if name == "reset" -%}<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/>
{%- else if name == "play" -%}<path d="M7 4.5v15l12.5-7.5z" fill="currentColor"/>