{{define "content"}} {{$l := .Data.List}}{{$csrf := .CSRF}} {{$back := printf "/policies/lists/%d" $l.ID}} {{$isBlack := eq $l.Kind "blacklist"}}

{{$l.Name}}

{{if $l.Description}}

{{$l.Description}}

{{end}}
Export
Domains
{{num $l.DomainCount}}
Status
{{statusWord $l.Enabled}}
Updated
{{timeAgo $l.UpdatedAt}}
Used by
{{if $l.UsedBy}}
{{range $l.UsedBy}}{{.}}{{end}}
{{else}} no policies {{end}}
{{if and (eq $l.DomainCount 0) (not .Data.Search)}} {{template "empty" dict "Icon" (pick $isBlack "bi-shield-slash" "bi-shield-check") "Title" "This list is empty" "Message" "Import a domain list to fill it. Plain lists, hosts files and Adblock-style rules are all understood, and a file with hundreds of thousands of lines is inserted in a single transaction."}}
{{else}}
{{if .Data.Search}}Clear{{end}}
{{if .Data.Entries}}
{{range .Data.Entries}} {{end}}
DomainMatchStatus CommentAddedActions
{{.Domain}} {{if .MatchSubdomains}} + subdomains {{else}} exact only {{end}} {{if $isBlack}}Blocked{{else}}Allowed{{end}} {{.Comment}} {{timeAgo .CreatedAt}} {{template "confirmform" dict "Action" (printf "/policies/domains/%d/delete" .ID) "CSRF" $csrf "ReturnTo" $back "Icon" "bi-trash" "Message" (printf "Remove %s from %s?" .Domain $l.Name)}}
{{template "pagination" dict "P" .Data.Pagination "Q" .Query}} {{else}} {{template "empty" dict "Icon" "bi-search" "Title" "No domains match that search" "Message" "Try a different term, or clear the search box."}} {{end}}
{{end}} {{/* ---- Import modal ---- */}} {{/* ---- Add domain modal ---- */}} {{/* ---- Edit list modal ---- */}} {{end}}