{{define "content"}} {{$csrf := .CSRF}}{{$f := .Data.Filter}}

Records

Search every record across all zones.

{{if or $f.Search $f.Type $f.Enabled $f.ZoneID}} Clear {{end}}
{{if .Data.Records}}
{{range .Data.Records}} {{end}}
ZoneNameTypeValue TTLStatusActions
{{trimDot .ZoneName}} {{.Name}} {{.Type}} {{.Data}} {{if .TTL}}{{.TTL}}{{else}}{{end}} {{statusWord .Enabled}}
{{template "postform" dict "Action" (printf "/records/%d/toggle" .ID) "CSRF" $csrf "ReturnTo" "/records" "Fields" (dict "enabled" (boolstr (not .Enabled))) "Icon" (toggleIcon .Enabled) "Class" "btn btn-sm btn-outline-secondary" "Title" (printf "%s this record" (toggleVerb .Enabled))}} {{template "confirmform" dict "Action" (printf "/records/%d/delete" .ID) "CSRF" $csrf "ReturnTo" "/records" "Icon" "bi-trash" "Message" (printf "Delete the %s record for %s in %s?" .Type .Name (trimDot .ZoneName))}}
{{template "pagination" dict "P" .Data.Pagination "Q" .Query}} {{else if or $f.Search $f.Type $f.Enabled $f.ZoneID}} {{template "empty" dict "Icon" "bi-search" "Title" "No records match those filters" "Message" "Adjust or clear the filters above."}} {{else}} {{template "empty" dict "Icon" "bi-list-columns-reverse" "Title" "No records yet" "Message" "Create a zone and add records to it, and they will all be searchable from here."}} {{end}}
{{end}}