En tête du groupe d'actions : ▶ arrête le timer en cours et en relance
un sur le même projet et la même note (POST /ui/entries/{id}/relancer) ;
sur l'entrée en cours, ■ l'arrête. Les deux émettent timer-changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
1.9 KiB
HTML
23 lines
1.9 KiB
HTML
{% import "_icons.html" as icons %}
|
||
<tr id="entry-{{ e.id }}"{% if e.running() %} class="running"{% endif %}>
|
||
<td class="time">
|
||
{{ e.start_time() }} – {{ e.end_time() }}
|
||
{% if e.overlaps %}<span class="warn" title="Chevauche une autre entrée">⚠</span>{% endif %}
|
||
</td>
|
||
<td><span class="dot" style="--color: {{ e.color }}"></span><span class="client">{{ e.client_name }}</span> / {% if let Some(u) = e.repo_url %}<a class="project-link" href="{{ u }}" target="_blank" rel="noopener noreferrer" title="Ouvrir le repo">{{ e.project_name }}</a>{% else %}{{ e.project_name }}{% endif %}</td>
|
||
<td class="note">{{ e.note }}</td>
|
||
<td class="num">{{ e.duration() }}</td>
|
||
<td class="actions">
|
||
<div class="btn-group">
|
||
{% if e.running() %}
|
||
<button class="btn small icon danger" title="Arrêter" aria-label="Arrêter le timer" hx-post="/ui/timer/stop" hx-swap="none">{% call icons::icon("stop") %}{% endcall %}</button>
|
||
{% else %}
|
||
<button class="btn small icon play" title="Relancer cette entrée" aria-label="Relancer cette entrée" hx-post="/ui/entries/{{ e.id }}/relancer" hx-swap="none">{% call icons::icon("play") %}{% endcall %}</button>
|
||
{% endif %}
|
||
<button class="btn small icon primary" title="Modifier" aria-label="Modifier" hx-get="/ui/entries/{{ e.id }}/edit" hx-target="closest tr" hx-swap="outerHTML">{% call icons::icon("edit") %}{% endcall %}</button>
|
||
<button class="btn small icon" title="Dupliquer" aria-label="Dupliquer" hx-get="/ui/entries/{{ e.id }}/dupliquer" hx-target="closest tr" hx-swap="afterend">{% call icons::icon("copy") %}{% endcall %}</button>
|
||
<button class="btn small icon danger" title="Supprimer" aria-label="Supprimer" hx-delete="/ui/entries/{{ e.id }}" hx-target="closest tr" hx-swap="outerHTML" hx-confirm="Supprimer cette entrée ?">{% call icons::icon("trash") %}{% endcall %}</button>
|
||
</div>
|
||
</td>
|
||
</tr>
|