{{ define "title" }}{{ with .CatLabel }}{{ . }}{{ else }}Category{{ end }}: {{ .Title }} - Snowden Archive{{ end }} {{ define "content" }}

{{ with .CatLabel }}{{ . }}{{ else }}Category{{ end }}: {{ .Title }} {{- if eq .ActiveCategory "agency" }}{{ with agencyName .Title }} {{ . }}{{ end }}{{ end }} {{ .Total }} document{{ if ne .Total 1 }}s{{ end }}

{{ if .SearchLink }} Search documents matching “{{ .Title }}” → {{ end }} {{ with .Blurb }}

{{ . }}

{{ end }} {{ with .YearScope }}

Showing the documents {{ $.Title }} itself published in {{ . }} - all years.

{{ end }}
{{ if .MonthNav }} {{ end }} {{ with .GlossaryEntry }}
{{ .Term }} {{ if .Aka }}(a.k.a. {{ range $i, $a := .Aka }}{{ if $i }}, {{ end }}{{ $a }}{{ end }}){{ end }} - {{ .DefinitionHTML }} glossary →
{{ end }} {{ if or .Timeline .PubTimeline .Breakdowns }}
Graphs {{ if .Timeline }}{{ template "timeline-hist" (dict "Bars" .Timeline "Label" "By document date" "Verb" "dated") }}{{ end }} {{ if .PubTimeline }}{{ template "timeline-hist" (dict "Bars" .PubTimeline "Label" "By published date" "Verb" "published") }}{{ end }} {{ range .Breakdowns }}

By {{ .Label }}

{{ range .Values }} {{ .Value }} {{ .Count }} {{ end }}
{{ end }}
{{ end }} {{ if .Refinements }}
Refine (combine with another filter, via search)
{{ range .Refinements }}
{{ .Label }} {{ range .Values }}{{ .Name }}{{ .Count }}{{ end }}
{{ end }}
{{ end }}
{{ if ne .View "table" }} {{ template "sort-bar" (dict "SortURL" .SortURL "SortBy" .Sort "Order" .Order "ShowRelevance" false "DefaultSort" .DefaultSort) }} {{ end }} {{ template "type-filter" (dict "Action" (print "/browse/" .ActiveCategory "/" (pathEscape .Title)) "Params" .Params "AllTypes" .AllTypes "SelectedTypes" .SelectedTypes ) }}
{{ if eq .View "table" }} {{ template "doc-table" . }} {{ else }}

Documents

{{ template "doc-cards" .Cards }} {{ template "pagination" . }} {{ end }} {{ end }} {{ template "base.html" . }}