diff options
author | Julian Jørgensen <julian@jtle.dk> | 2024-05-24 23:33:49 +0200 |
---|---|---|
committer | Julian Jørgensen <julian@jtle.dk> | 2024-05-24 23:33:49 +0200 |
commit | 6cdd02af0684500b5376d4d4a08feb796fdaf889 (patch) | |
tree | 7ffb2ded2251fef175f2c0ce6dfbea978152e063 /templates/parts | |
parent | eabd0e769c2bfef7a7aa748d794675d3ff7a920b (diff) |
Add date stuff
Diffstat (limited to 'templates/parts')
-rw-r--r-- | templates/parts/entry.html | 6 | ||||
-rw-r--r-- | templates/parts/entryRows.html | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/templates/parts/entry.html b/templates/parts/entry.html index 9f05ffa..300f543 100644 --- a/templates/parts/entry.html +++ b/templates/parts/entry.html @@ -48,13 +48,15 @@ >Gem </button> {{end}} - {{ if .Detached }} + {{ if .Detached}} + {{ if .DateInfo.IsToday }} <button hx-get="/tracking" hx-trigger="click" hx-target="#entry-bar" hx-swap="outerHTML" >Tilbage</button> + {{ end }} {{ else }} {{ if .Entry }} <button @@ -77,5 +79,5 @@ hx-target="#entry-bar" hx-swap="outerHTML" >Manuel</button> - {{ end }} + {{ end }}<input readonly type="text" name="date" {{if .Entry}}value="{{ .Entry.Date }}"{{end}} /> </form> diff --git a/templates/parts/entryRows.html b/templates/parts/entryRows.html index fd14608..9e9c0eb 100644 --- a/templates/parts/entryRows.html +++ b/templates/parts/entryRows.html @@ -1,4 +1,4 @@ -<tbody hx-swap="outerHTML" hx-trigger="changedEntries from:body" hx-get="/entryRows"> +<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> |