summaryrefslogtreecommitdiff
path: root/templates/parts/entry.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/parts/entry.html')
-rw-r--r--templates/parts/entry.html37
1 files changed, 26 insertions, 11 deletions
diff --git a/templates/parts/entry.html b/templates/parts/entry.html
index 52f2eb3..4be2073 100644
--- a/templates/parts/entry.html
+++ b/templates/parts/entry.html
@@ -16,17 +16,32 @@
</div>
</div>
<div class="entry-box">
- <b>Mærker</b><br>
- <select>
- <option value="-">-</option>
- <option value="SVT-232">SVT-232</option>
- <option value="Ferie">Ferie</option>
- </select><br>
- <select>
- <option value="-">-</option>
- <option value="SVT-232">SVT-232</option>
- <option value="Ferie">Ferie</option>
- </select>
+ <b>Opgaver</b><br>
+ <input readonly style="display: none;" name="task-count" value="{{ .TaskCount }}" />
+ <table>
+ <tbody>
+ {{ if .Entry }}
+ {{ range $x := taskMapToArr .Entry.Tasks }}
+ <tr>
+ <td>
+ <select name="task-{{$x.Key}}-id" hx-trigger="changedTasks from:body" hx-get="/task/select?selected={{$x.Id}}">
+ {{ template "taskEntry.html" arr $.GroupToTasks $x.Id }}
+ </select>
+ </td>
+ <td><input name="task-{{$x.Key}}-part" type="text" class="short" {{if $x.Sel}}value="{{$x.Sel}}"{{end}}/></td>
+ </tr>
+ {{ end }}
+ {{ end }}
+ <tr>
+ <td>
+ <select name="task-new-id" hx-trigger="changedTasks from:body" hx-get="/task/select">
+ {{ template "taskEntry.html" (arr .GroupToTasks -1) }}
+ </select>
+ </td>
+ <td><input disabled name="task-new-part" type="text" class="short" /></td>
+ </tr>
+ </tbody>
+ </table>
</div>
<div class="entry-box">
<b>Kommentar</b><br>