{{define "content"}} {{$csrf := .CSRF}}{{$reverse := .Data.Reverse}}

{{.Title}}

{{if $reverse}}PTR zones for IPv4 and IPv6 address space. {{else}}Zones this server answers authoritatively.{{end}}

Add Zone
{{if .Data.Zones}}
{{if $reverse}}{{end}} {{range .Data.Zones}} {{if $reverse}}{{end}} {{end}}
ZoneKindRecords Serial TTL Status Updated Actions
{{trimDot .Name}} {{if .Description}}
{{truncate 80 .Description}}
{{end}}
{{.Kind.Label}}{{num .RecordCount}} {{.Serial}} {{.DefaultTTL}} {{statusWord .Enabled}} {{timeAgo .UpdatedAt}}
{{template "postform" dict "Action" (printf "/zones/%d/toggle" .ID) "CSRF" $csrf "Fields" (dict "enabled" (boolstr (not .Enabled))) "Icon" (toggleIcon .Enabled) "Class" "btn btn-sm btn-outline-secondary" "Title" (printf "%s this zone" (toggleVerb .Enabled))}} {{template "confirmform" dict "Action" (printf "/zones/%d/delete" .ID) "CSRF" $csrf "Icon" "bi-trash" "Message" (printf "Delete zone %s and all %d of its records? This cannot be undone." (trimDot .Name) .RecordCount)}}
{{else if .Data.Search}} {{template "empty" dict "Icon" "bi-search" "Title" "No zones match that search" "Message" "Try a different term, or clear the search box to see every zone."}} {{else}} {{if $reverse}} {{template "empty" dict "Icon" "bi-arrow-left-right" "Title" "No reverse zones yet" "Message" "Reverse zones answer PTR lookups that turn an IP address back into a host name. Enter a subnet such as 192.168.1.0/24 and the correct in-addr.arpa zone name is worked out for you."}} {{else}} {{template "empty" dict "Icon" "bi-diagram-3" "Title" "No forward zones yet" "Message" "A forward zone lets this server answer authoritatively for a domain such as internal.example.com, independently of the public DNS."}} {{end}} {{end}}
{{end}}