mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 00:55:32 +00:00
202 lines
7.0 KiB
Plaintext
202 lines
7.0 KiB
Plaintext
{{- $piece := .Piece -}}
|
|
{{- $currentActorID := .CurrentActorID -}}
|
|
|
|
<div class="leading-snug">
|
|
{{- $categoryFlags := GetCategoryFlags $piece -}}
|
|
|
|
{{- $place := "" -}}
|
|
{{- if $piece.PlaceRefs -}}
|
|
{{- $placeObj := GetPlace (index $piece.PlaceRefs 0).Ref -}}
|
|
{{- if gt (len $placeObj.Names) 0 -}}
|
|
{{- $place = index $placeObj.Names 0 -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- $title := "" -}}
|
|
{{- if $piece.Title -}}
|
|
{{- $title = index $piece.Title 0 -}}
|
|
{{- else if $piece.Incipit -}}
|
|
{{- $title = index $piece.Incipit 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- $workTitle := "" -}}
|
|
{{- $workAuthorName := "" -}}
|
|
{{- $workAuthorID := "" -}}
|
|
{{- if $piece.WorkRefs -}}
|
|
{{- $work := GetWork (index $piece.WorkRefs 0).Ref -}}
|
|
{{- if $work.PreferredTitle -}}
|
|
{{- $workTitle = $work.PreferredTitle -}}
|
|
{{- else if $work.Citation.Title -}}
|
|
{{- $workTitle = $work.Citation.Title -}}
|
|
{{- end -}}
|
|
{{- if $work.AgentRefs -}}
|
|
{{- range $workAgentRef := $work.AgentRefs -}}
|
|
{{- if (or (eq $workAgentRef.Category "") (eq $workAgentRef.Category "autor")) -}}
|
|
{{- $workAgent := GetAgent $workAgentRef.Ref -}}
|
|
{{- if and $workAgent (gt (len $workAgent.Names) 0) -}}
|
|
{{- $workAuthorName = index $workAgent.Names 0 -}}
|
|
{{- $workAuthorID = $workAgentRef.Ref -}}
|
|
{{- break -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- /* Build category list */ -}}
|
|
{{- $categories := slice -}}
|
|
{{- if $categoryFlags.Rezension -}}
|
|
{{- $categories = append $categories "Rezension" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Gedicht -}}
|
|
{{- $categories = append $categories "Gedicht" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Aufsatz -}}
|
|
{{- $categories = append $categories "Aufsatz" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Theaterkritik -}}
|
|
{{- $categories = append $categories "Theaterkritik" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Brief -}}
|
|
{{- $categories = append $categories "Brief" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Erzaehlung -}}
|
|
{{- $categories = append $categories "Erzählung" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Kommentar -}}
|
|
{{- $categories = append $categories "Kommentar" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Uebersetzung -}}
|
|
{{- $categories = append $categories "Übersetzung" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Auszug -}}
|
|
{{- $categories = append $categories "Auszug" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Replik -}}
|
|
{{- $categories = append $categories "Replik" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Lokalnachrichten -}}
|
|
{{- $categories = append $categories "Lokalnachrichten" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Lotterie -}}
|
|
{{- $categories = append $categories "Lotterie" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Nachruf -}}
|
|
{{- $categories = append $categories "Nachruf" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Weltnachrichten -}}
|
|
{{- $categories = append $categories "Weltnachrichten" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.EinkommendeFremde -}}
|
|
{{- $categories = append $categories "Einkommende Fremde" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Wechselkurse -}}
|
|
{{- $categories = append $categories "Wechselkurse" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Buecher -}}
|
|
{{- $categories = append $categories "Bücher" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Lokalanzeigen -}}
|
|
{{- $categories = append $categories "Lokalanzeigen" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Vorladung -}}
|
|
{{- $categories = append $categories "Vorladung" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.GelehrteNachrichten -}}
|
|
{{- $categories = append $categories "Gelehrte Nachrichten" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Anzeige -}}
|
|
{{- $categories = append $categories "Anzeige" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Proklamation -}}
|
|
{{- $categories = append $categories "Proklamation" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Desertionsliste -}}
|
|
{{- $categories = append $categories "Desertionsliste" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Notenblatt -}}
|
|
{{- $categories = append $categories "Notenblatt" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Vorlesungsverzeichnis -}}
|
|
{{- $categories = append $categories "Vorlesungsverzeichnis" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Abbildung -}}
|
|
{{- $categories = append $categories "Abbildung" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Ineigenersache -}}
|
|
{{- $categories = append $categories "In eigener Sache" -}}
|
|
{{- end -}}
|
|
{{- if $categoryFlags.Provinienz -}}
|
|
{{- $categories = append $categories "Provinienz" -}}
|
|
{{- end -}}
|
|
|
|
{{- /* Display category combination */ -}}
|
|
{{- $categoryName := "" -}}
|
|
{{- if eq (len $categories) 0 -}}
|
|
{{- $categoryName = "Beitrag" -}}
|
|
{{- else -}}
|
|
{{- $sortedCategories := sortStrings $categories -}}
|
|
{{- $categoryName = joinWithUnd $sortedCategories -}}
|
|
{{- end -}}
|
|
|
|
{{- /* Generate piece descriptions */ -}}
|
|
{{- if has $categories "Rezension" -}}
|
|
{{- $authorFound := false -}}
|
|
{{- range $agentref := $piece.AgentRefs -}}
|
|
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
|
|
{{- $agent := GetAgent $agentref.Ref -}}
|
|
{{- if and $agent (gt (len $agent.Names) 0) -}}
|
|
{{- if ne $agentref.Ref $currentActorID -}}
|
|
<a href="/akteure/{{ $agentref.Ref }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>,
|
|
{{- end -}}
|
|
{{ $categoryName }} von:
|
|
{{ if $workAuthorName }}
|
|
<a href="/akteure/{{ $workAuthorID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>,
|
|
{{ end }}
|
|
{{ if $workTitle }}
|
|
<em>{{ $workTitle }}</em>
|
|
{{ else if $title }}
|
|
<em>{{ $title }}</em>
|
|
{{ else }}
|
|
[Werk unbekannt]
|
|
{{ end }}
|
|
{{- $authorFound = true -}}
|
|
{{- break -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if not $authorFound -}}
|
|
{{ $categoryName }} von:
|
|
{{ if $workAuthorName }}
|
|
<a href="/akteure/{{ $workAuthorID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>,
|
|
{{ end }}
|
|
{{ if $workTitle }}
|
|
<em>{{ $workTitle }}</em>
|
|
{{ else if $title }}
|
|
<em>{{ $title }}</em>
|
|
{{ else }}
|
|
[Werk unbekannt]
|
|
{{ end }}
|
|
{{- end -}}
|
|
|
|
{{- else -}}
|
|
{{- $authorFound := false -}}
|
|
{{- range $agentref := $piece.AgentRefs -}}
|
|
{{- if (or (eq $agentref.Category "") (eq $agentref.Category "autor")) -}}
|
|
{{- $agent := GetAgent $agentref.Ref -}}
|
|
{{- if and $agent (gt (len $agent.Names) 0) -}}
|
|
{{- if ne $agentref.Ref $currentActorID -}}
|
|
<a href="/akteure/{{ $agentref.Ref }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>,
|
|
{{- end -}}
|
|
{{ $categoryName }}{{ if $title }}: <em>„{{ $title }}"</em>{{ end }}
|
|
{{- $authorFound = true -}}
|
|
{{- break -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if not $authorFound -}}
|
|
{{ $categoryName }}{{ if $title }}: <em>„{{ $title }}"</em>{{ else if eq $categoryName "Beitrag" }} ohne Titel{{ end }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
</div> |