{{define "content"}} {{$z := .Data.Zone}}{{$csrf := .CSRF}}{{$f := .Data.Filter}} {{$backTo := printf "/zones/%d" $z.ID}}

{{trimDot $z.Name}}

{{if $z.Description}}{{$z.Description}} · {{end}} serial {{$z.Serial}} · default TTL {{$z.DefaultTTL}}s · {{statusWord $z.Enabled}}

{{if .Data.Problems}}
{{len .Data.Problems}} record{{if ne (len .Data.Problems) 1}}s{{end}} in this zone could not be loaded and are not being served
{{end}}
{{if or $f.Search $f.Type $f.Enabled}} Clear {{end}}
0 selected
{{if .Data.Records}}
{{range .Data.Records}} {{end}}
Name Type Value TTL Status Actions
{{.Name}} {{.Type}} {{.Data}} {{if .TTL}}{{.TTL}}{{else}}{{$z.DefaultTTL}}{{end}} {{statusWord .Enabled}}
{{template "postform" dict "Action" (printf "/records/%d/toggle" .ID) "CSRF" $csrf "ReturnTo" $backTo "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" $backTo "Icon" "bi-trash" "Message" (printf "Delete the %s record for %s?" .Type .Name)}}
{{template "pagination" dict "P" .Data.Pagination "Q" .Query}} {{else if or $f.Search $f.Type $f.Enabled}} {{template "empty" dict "Icon" "bi-search" "Title" "No records match those filters" "Message" "Adjust or clear the filters above to see the rest of the zone."}} {{else}} {{template "empty" dict "Icon" "bi-list-columns-reverse" "Title" "This zone has no records yet" "Message" "A zone needs at least an address record to be useful. The SOA and apex NS records are maintained for you automatically."}}
{{end}}
{{/* ---- Record editor modal ---- */}} {{/* ---- Import modal ---- */}} {{/* ---- Clone modal ---- */}} {{end}}