{{ define "title" }}{{ .Doc.Title }} - Snowden Archive{{ end }} {{ define "head" }} {{ if .Doc.DocMeta.Creator }}{{ end }} {{ if .Doc.DocMeta.DateCreated }}{{ end }} {{ if .Doc.Description }}{{ end }} {{ range .Doc.DocMeta.Programs }}{{ end }} {{ range .Doc.Tags }}{{ end }} {{ if .Doc.Description }}{{ end }} {{ with .OGImageURL }}{{ end }} {{ if .APIEnabled }}{{ end }} {{ .Embeds.JSONLDTag }} {{ end }} {{ define "content" }} {{ $sidebar := .Prefs.InfoSidebar }}
{{ if $sidebar }} {{ end }}

{{ .Doc.Title }}

Open PDF {{ with .Doc.Versions }}+{{ len . }} other cop{{ if eq (len .) 1 }}y{{ else }}ies{{ end }}{{ end }}
{{ $back := print "/doc/" .Doc.ID }}
{{ if or .SerialPrev .SerialNext }} {{ end }}
Creating agency: {{ with .Doc.DocMeta.Creator }}{{ . }}{{ with agencyName . }} {{ . }}{{ end }}{{ else }}-{{ end }}
Document date: {{ with .Doc.DocMeta.DateCreated }}{{ . }}{{ else }}-{{ end }}
{{ if or (eq .Doc.Type "FOIA") (eq .Doc.Type "SIDTODAY") }}Type: {{ template "type-badge" .Doc.Type }}
{{ end }} {{ if .Doc.Pages }}Pages: {{ .Doc.Pages }}
{{ end }} {{ with .Doc.DocMeta.Genre }}Genre: {{ . }}
{{ end }} {{ with .Doc.DocMeta.Banner }}Banner:
{{ end }} Classification: {{- facetLinks (dict "Vals" .Doc.DocMeta.Classification "Cat" "classification" "Sep" "space" "Class" "tag classification" "QS" $.BrowseQS) -}}
Dissemination: {{- facetLinks (dict "Vals" .Doc.DocMeta.Dissemination "Cat" "dissemination" "Class" "doc-banner-link dissemination" "QS" $.BrowseQS) -}}
{{ with .SeriesGroup }}
Series: {{ .Name }}
    {{ range .Docs }} {{ if eq .ID $.Doc.ID }}{{ .Title }} {{ else }}{{ .Title }}{{ end }} {{ end }}
{{ end }} {{ with .Assemblies }}
Part of {{ if gt (len .) 1 }}assemblies{{ else }}an assembly{{ end }}: {{ range $i, $a := . }}{{ if $i }}, {{ end }}{{ $a.Title }}{{ end }}
{{ end }}
{{- range $i, $pub := .Doc.Publication }}
{{- if or $pub.Link $pub.Publisher $pub.DatePublished }}
{{- if $pub.Link }}{{ with $pub.Publisher }}{{ . }}{{ else }}Read the original{{ end }} ↗ {{- else }}{{ with $pub.Publisher }}{{ . }}{{ end }}{{ end -}} {{- with $pub.DatePublished }}{{ . }}{{ end -}}
{{- end -}} {{- if $pub.Title -}} {{ $ak := articleKey $pub.Link }}
{{ if $ak }}{{ $pub.Title }}{{ else }}{{ $pub.Title }}{{ end }}
{{- end -}} {{- if or $pub.Journalists $pub.Contributors }}
{{- range $j, $name := $pub.Journalists -}} {{- if $j }} · {{ end -}} {{ $name }} {{- end -}} {{- range $j, $name := $pub.Contributors -}} {{- if or $j $pub.Journalists }} · {{ end -}} {{ $name }} {{- end -}}
{{- end -}} {{- if $pub.ReportingOnly }}
Reporting partner - published this story, not the document
{{- end -}} {{- with $pub.Note }}
{{ . }}
{{- end -}} {{- $copy := $.Doc.VersionFor $pub.Version -}} {{- $shown := and (not $pub.ReportingOnly) (not $pub.Version) $.Doc.Versions -}} {{- if and (not $pub.ReportingOnly) (or $copy $pub.DocSource $pub.DocURL $shown) }}
{{- if $shown }}the copy shown on this page{{ end -}} {{- with $copy }}view this copy →{{ if .ChangedPages }}changed pages: {{ template "changed-page-links" . }}{{ end }}{{ end -}} {{- with $pub.DocSource }}document page ↗{{ end -}} {{- with $pub.DocURL }}original PDF ↗{{ end -}}
{{- end -}}
{{- end }} {{- with .Doc.UnlinkedVersions }}
Other copies
{{- range . }}{{ .Slug }} →{{ if .ChangedPages }} (changed pages: {{ template "changed-page-links" . }}){{ end }}{{ end -}}
{{- end }}

{{ .Doc.Description }}

Long Description:
{{- with .Doc.LongDescription }}{{ . }}{{ else }}No extended description available.{{ end -}}
Programs:
{{- facetLinks (dict "Vals" .Doc.DocMeta.Programs "Cat" "program" "Class" "tag" "AsList" .Prefs.ProgramsAsList "QS" $.BrowseQS) -}} {{- if not (and .Doc.DocMeta.Programs .Prefs.ProgramsAsList) }}
{{ end -}}
People mentioned:
{{- facetLinks (dict "Vals" .Doc.DocMeta.People "Cat" "people" "Class" "meta-link" "QS" $.BrowseQS) -}}

Countries:
{{- facetLinks (dict "Vals" .Doc.DocMeta.Countries "Cat" "country" "Class" "meta-link" "QS" $.BrowseQS) -}}

Tags:
{{- facetLinks (dict "Vals" .Doc.Tags "Cat" "tag" "Class" "meta-link" "AsList" .Prefs.TagsAsList "QS" $.BrowseQS) -}}

Identifier:
{{ .Doc.ID }} {{ with .Doc.AkaID }}
Also known as:
{{ range $i, $aka := . }}{{ if $i }}
{{ end }}{{ $aka.ID }}{{ with $aka.DocSource }} page ↗{{ end }}{{ with $aka.DocURL }} PDF ↗{{ end }}{{ end }} {{ end }} {{ with .Doc.PDFSha256 }}

PDF SHA-256:
{{ . }} {{ end }}
{{ if $sidebar }} {{ end }}
{{ template "doc-viewport" . }}
{{/* /.doc-layout */}} {{ if and .Images (not .Prefs.TextOnly) }} {{ template "lightbox-overlays" . }} {{ end }}
{{ with .Doc.ArchiveComment }}
Archive note: {{ . }}
{{ end }}
{{ if or .PublishedTogether .RelatedDocs }} {{ end }} {{ end }} {{ template "base.html" . }}