AnthoLume/templates/pages/progress.tmpl

29 lines
919 B
Cheetah
Raw Normal View History

2024-01-25 02:40:14 +00:00
{{ template "base" . }}
{{ define "title" }}Progress{{ end }}
{{ define "header" }}<a href="./progress">Progress</a>{{ end }}
{{ define "content" }}
2024-06-16 21:11:03 +00:00
<div class="overflow-x-auto">
<div class="inline-block min-w-full overflow-hidden rounded shadow">
<!-- Table Component - Utilizes Template "table-cell" -->
{{ template "component/table" (dict
"Columns" (slice "Document" "Device Name" "Percentage" "Created At")
"Keys" (slice "Document" "DeviceName" "Percentage" "CreatedAt")
"Rows" .Data
)
}}
</div>
</div>
2024-01-25 02:40:14 +00:00
{{ end }}
<!-- Table Cell Definition -->
{{ define "table-cell" }}
2024-06-16 21:11:03 +00:00
{{ if eq .Name "Document" }}
<a href="./documents/{{ .Data.DocumentID }}"
>{{ .Data.Author }} - {{ .Data.Title }}</a
>
{{ else if eq .Name "Percentage" }}
{{ index (fields .Data) .Name }}%
{{ else }}
{{ index (fields .Data) .Name }}
{{ end }}
{{ end }}