summaryrefslogtreecommitdiff
path: root/templates/parts/entryRows.html
blob: 3749ddb68e4623c55705011b6de2570c975485e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<tbody hx-swap="outerHTML" hx-trigger="changedEntries from:body" hx-get="/entryRows" hx-params="date" hx-vals='{"date": "{{.DateInfo.Date}}"}'>
  {{ range $entry := .Entries }}
  <tr>
    <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></td>
    <td>{{ $entry.Comment }}</td>
    <td>
      {{ if $entry.To }}<button hx-trigger="click" hx-swap="outerHTML" hx-target="#entry-form" hx-get="/edit?id={{$entry.Id}}">e</button>{{end}}
    </td>
  </tr>
  {{ end }}
</tbody>