{{define "content"}} {{$csrf := .CSRF}}{{$kind := .Data.Kind}}{{$isBlack := .Data.IsBlacklist}}
{{if $isBlack}} Reusable sets of domains to block. One list can be attached to several policies. {{else}} Domains that must never be blocked. An allowlist match always beats a blacklist match. {{end}}
| List | Domains | Used by | Updated | Status | Actions |
|---|---|---|---|---|---|
|
{{.Name}}
{{if .Description}} {{truncate 80 .Description}} {{end}}
{{if .SourceURL}}
{{truncate 60 .SourceURL}}
{{end}}
|
{{num .DomainCount}} |
{{if .UsedBy}}
{{range .UsedBy}}{{.}}{{end}}
{{else}}
not used by any policy
{{end}}
|
{{timeAgo .UpdatedAt}} | {{statusWord .Enabled}} |
{{template "postform" dict
"Action" (printf "/policies/lists/%d/toggle" .ID) "CSRF" $csrf
"ReturnTo" (printf "/policies/%ss" $kind)
"Fields" (dict "enabled" (boolstr (not .Enabled)))
"Icon" (toggleIcon .Enabled)
"Class" "btn btn-sm btn-outline-secondary"
"Title" (printf "%s this list" (toggleVerb .Enabled))}}
{{template "confirmform" dict
"Action" (printf "/policies/lists/%d/delete" .ID) "CSRF" $csrf
"Icon" "bi-trash"
"Message" (printf "Delete %q and all %d of its domains? This cannot be undone." .Name .DomainCount)}}
|