{{ $model := . }} {{/* .1 - *Content .2 - *Entry .3 - []*RContentsAgents .4 - map[string]*Agent .5 bool SingleView .6 .parameters: type SearchParameters struct { Parameters Sort string Annotations bool Persons bool Title bool Series bool Places bool Refs bool Year bool Entry bool Incipit bool AnnotationsString string PersonsString string TitleString string AlmString string SeriesString string PlacesString string RefsString string YearString string EntryString string IncipitString string } */}} {{- $content := index . 0 -}} {{- $entry := index . 1 -}} {{- $rcas := index . 2 -}} {{- $agents := index . 3 -}} {{- $singleView := false -}} {{- if gt (len .) 4 -}} {{- $singleView = index . 4 -}} {{- end -}} {{- $entrySubView := false -}} {{- if gt (len .) 5 -}} {{- $entrySubView = index . 5 -}} {{- end -}} {{ $isAlm := false }} {{ $isTitle := false }} {{ $isYear := false }} {{ $isPerson := false }} {{ $isAnnotation := false }} {{ $isIncipit := false }} {{ $isEntry := false }} {{- $searchparameters := false -}} {{- if gt (len .) 6 -}} {{- $searchparameters = index . 6 -}} {{- if or (eq (printf "%T" $searchparameters) "bool") (eq (printf "%T" $searchparameters) "") -}} {{- $searchparameters = false -}} {{- end -}} {{- if $searchparameters -}} {{- $isAlm = $searchparameters.AlmString -}} {{- $isTitle = or $searchparameters.Title $searchparameters.TitleString -}} {{- $isYear = or $searchparameters.Year $searchparameters.YearString -}} {{- $isPerson = or $searchparameters.Persons $searchparameters.PersonsString -}} {{- $isAnnotation = or $searchparameters.Annotations $searchparameters.AnnotationsString -}} {{- $isIncipit = or $searchparameters.Incipit $searchparameters.IncipitString -}} {{- $isEntry = or $searchparameters.Entry $searchparameters.EntryString -}} {{- end -}} {{- end -}} {{- $request := false -}} {{- if gt (len .) 7 -}} {{- $request = index . 7 -}} {{- end -}}
{{- if and (not $singleView) (not $entrySubView) -}}
{{- if $content.Extent -}}
S. {{- $content.Extent -}}
{{- end -}} {{- if $content.MusenalmType -}}
{{- range $_, $t := $content.MusenalmType -}}
{{- $t -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if or $singleView $entrySubView -}}
Almanach
{{- $entry.PreferredTitle -}} {{- if $content.Extent -}} , S. {{- $content.Extent -}} {{- end -}}
{{- end -}} {{- if $content.TitleStmt -}}
Titel
{{- $content.TitleStmt -}}
{{- end -}} {{- if $content.IncipitStmt -}}
Incipit
{{ $content.IncipitStmt }}…
{{- end -}} {{- if $content.ResponsibilityStmt -}}
Autorangabe
{{- $content.ResponsibilityStmt -}}
{{- end -}} {{- if $rcas -}}
Personen
{{- range $_, $rca := $rcas -}} {{- $agent := index $agents $rca.Agent -}}
{{- $agent.Name -}} {{- if $agent.BiographicalData -}} ({{ $agent.BiographicalData }}){{- end -}}
{{- end -}}
{{- end -}} {{- if $content.Annotation -}} {{- $link := printf "%s%s" "/almanach/" $entry.MusenalmIDString -}}
Anmerkung
{{- Safe (LinksAnnotation (ReplaceSlashParen $content.Annotation) $link) -}}
{{- end -}}
{{- if not $singleView -}} {{- $scans := $content.ImagePaths -}} {{- $slen := len $scans -}} {{- $double := false -}} {{- if gt $slen 2 -}} {{- $double = true -}} {{- end -}}
{{- if $scans -}}
{{- range $_, $scan := $scans -}}
{{- end -}}
{{- end -}}
NR {{- $content.MusenalmID -}}
{{- if $entrySubView -}} {{- if $content.MusenalmType -}}
{{- range $_, $t := $content.MusenalmType -}}
{{- $t -}}
{{- end -}}
{{- end -}} {{- end -}}
Link {{- if and $request (IsAdminOrEditor $request.user) -}} Bearbeiten {{- end -}}
{{- end -}}
{{- if $singleView -}} {{- $scans := $content.ImagePaths -}} {{- $slen := len $scans -}} {{- $double := false -}} {{- if gt $slen 2 -}} {{- $double = true -}} {{- end -}}
{{- if $scans -}}
{{- range $i, $scan := $scans -}}
{{- end -}}
{{- end -}}
{{- end -}}