summaryrefslogtreecommitdiff
path: root/templates/parts/entryRows.html
diff options
context:
space:
mode:
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>