summaryrefslogtreecommitdiff
path: root/templates/parts/entryRows.html
diff options
context:
space:
mode:
authorJulian Jørgensen <julian@jtle.dk>2024-05-24 21:30:23 +0200
committerJulian Jørgensen <julian@jtle.dk>2024-05-24 21:30:23 +0200
commit2f83424ce8a0653e6e158318df1511daecf1a42d (patch)
treeb29c1b5c8df940873521d013697209195956151e /templates/parts/entryRows.html
parent19f8454a680c5231df68fee36ed9758587df316c (diff)
Time format rework
Diffstat (limited to 'templates/parts/entryRows.html')
-rw-r--r--templates/parts/entryRows.html18
1 files changed, 10 insertions, 8 deletions
diff --git a/templates/parts/entryRows.html b/templates/parts/entryRows.html
index 1b364e3..fd14608 100644
--- a/templates/parts/entryRows.html
+++ b/templates/parts/entryRows.html
@@ -1,12 +1,14 @@
-<tbody hx-trigger="changedTasks from:body" hx-get="/entryRows">
- {{ range $task := .Tasks }}
+<tbody hx-swap="outerHTML" hx-trigger="changedEntries from:body" hx-get="/entryRows">
+ {{ range $entry := .Entries }}
<tr>
- <td>{{ $task.Id }}</td>
- <td><input type="time" disabled value="{{formatTime $task.From }}" /></td>
- <td><input type="time" disabled value="{{formatTime $task.To }}" /></td>
- <td>{{ if $task.Tag}}{{ $task.Tag }}{{end}}</td>
- <td>{{ $task.Comment }}</td>
- <td></td>
+ <td>{{ $entry.Id }}</td>
+ <td><input type="time" disabled value="{{$entry.From }}" /></td>
+ <td><input type="time" disabled value="{{if $entry.To}}{{$entry.To }}{{end}}" /></td>
+ <td>{{ if $entry.Tag}}{{ $entry.Tag }}{{end}}</td>
+ <td>{{ $entry.Comment }}</td>
+ <td>
+ {{ if $entry.To }}<button hx-trigger="click" hx-swap="outerHTML" hx-target="#entry-bar" hx-get="/edit?id={{$entry.Id}}">e</button>{{end}}
+ </td>
</tr>
{{ end }}
</tbody>