Tier 3: timers CRUD + time tracking with topbar timer
This commit is contained in:
@@ -10,6 +10,18 @@
|
||||
<div class="flex items-center justify-between">
|
||||
<h1 class="detail-title">{{ item.title }}</h1>
|
||||
<div class="flex gap-2">
|
||||
{% if item.status not in ['done', 'cancelled'] %}
|
||||
{% if running_task_id and item.id|string == running_task_id %}
|
||||
<form action="/time/stop" method="post" style="display:inline">
|
||||
<button class="btn btn-sm timer-detail-btn timer-detail-stop" title="Stop timer">■ Stop Timer</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<form action="/time/start" method="post" style="display:inline">
|
||||
<input type="hidden" name="task_id" value="{{ item.id }}">
|
||||
<button class="btn btn-sm timer-detail-btn timer-detail-play" title="Start timer">▶ Start Timer</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a href="/tasks/{{ item.id }}/edit" class="btn btn-secondary btn-sm">Edit</a>
|
||||
<form action="/tasks/{{ item.id }}/toggle" method="post" style="display:inline">
|
||||
<button class="btn {{ 'btn-secondary' if item.status == 'done' else 'btn-primary' }} btn-sm">
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
{% if items %}
|
||||
<div class="card">
|
||||
{% for item in items %}
|
||||
<div class="list-row {{ 'completed' if item.status in ['done', 'cancelled'] }}">
|
||||
<div class="list-row {{ 'completed' if item.status in ['done', 'cancelled'] }} {{ 'timer-active' if running_task_id and item.id|string == running_task_id }}">
|
||||
<div class="row-check">
|
||||
<form action="/tasks/{{ item.id }}/toggle" method="post" style="display:inline">
|
||||
<input type="checkbox" id="check-{{ item.id }}" {{ 'checked' if item.status == 'done' }}
|
||||
@@ -60,6 +60,20 @@
|
||||
<label for="check-{{ item.id }}"></label>
|
||||
</form>
|
||||
</div>
|
||||
{% if item.status not in ['done', 'cancelled'] %}
|
||||
<div class="row-timer">
|
||||
{% if running_task_id and item.id|string == running_task_id %}
|
||||
<form action="/time/stop" method="post" style="display:inline">
|
||||
<button type="submit" class="timer-btn timer-btn-stop" title="Stop timer">■</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<form action="/time/start" method="post" style="display:inline">
|
||||
<input type="hidden" name="task_id" value="{{ item.id }}">
|
||||
<button type="submit" class="timer-btn timer-btn-play" title="Start timer">▶</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<span class="priority-dot priority-{{ item.priority }}"></span>
|
||||
<span class="row-title"><a href="/tasks/{{ item.id }}">{{ item.title }}</a></span>
|
||||
{% if item.project_name %}
|
||||
|
||||
Reference in New Issue
Block a user