{{- /* Unified Piece Entry Component Displays piece entries with category-specific descriptions across all views Usage: {{ template "_unified_piece_entry" (dict "Piece" $piece "CurrentActorID" $currentActorID "DisplayMode" "issue|akteure|place|search" "ShowPlaceTags" true|false "UseColonFormat" true|false "ShowContinuation" true|false ) }} Parameters: - Piece: The piece object to display - CurrentActorID: ID of current actor (for akteure view context) - DisplayMode: Context for formatting ("issue", "akteure", "place", "search") - ShowPlaceTags: Whether to show place tags (default: true) - UseColonFormat: Use colon format instead of "mit" for place view (default: false) - ShowContinuation: Show continuation prefixes (default: true for issue mode) */ -}} {{- $pieceInput := .Piece -}} {{- $currentActorID := .CurrentActorID -}} {{- $displayMode := .DisplayMode -}} {{- if not $displayMode -}}{{ $displayMode = "issue" }}{{- end -}} {{- $showPlaceTags := .ShowPlaceTags -}} {{- if eq $showPlaceTags nil -}}{{ $showPlaceTags = true }}{{- end -}} {{- $useColonFormat := .UseColonFormat -}} {{- if eq $useColonFormat nil -}}{{ $useColonFormat = false }}{{- end -}} {{- $showContinuation := .ShowContinuation -}} {{- if eq $showContinuation nil -}}{{ $showContinuation = (eq $displayMode "issue") }}{{- end -}} {{- /* Handle different piece types: viewmodels.PieceByIssue vs xmlmodels.Piece */ -}} {{- $piece := $pieceInput -}} {{- $isContinuation := false -}} {{- if eq $displayMode "issue" -}} {{- /* Issue view uses viewmodels.PieceByIssue with .Piece field */ -}} {{- $piece = $pieceInput.Piece -}} {{- $isContinuation = $pieceInput.IsContinuation -}} {{- end -}} {{- $fortsPrefix := "" -}} {{- if and $showContinuation $isContinuation -}} {{- $fortsPrefix = "(Forts.) " -}} {{- end -}}
{{- $categoryFlags := GetCategoryFlags $piece -}} {{- $place := "" -}} {{- $placeID := "" -}} {{- if $piece.PlaceRefs -}} {{- $placeObj := GetPlace (index $piece.PlaceRefs 0).Ref -}} {{- if gt (len $placeObj.Names) 0 -}} {{- $place = index $placeObj.Names 0 -}} {{- $placeID = $placeObj.ID -}} {{- end -}} {{- end -}} {{- $title := "" -}} {{- if $piece.Title -}} {{- $title = index $piece.Title 0 -}} {{- else if $piece.Incipit -}} {{- $title = index $piece.Incipit 0 -}} {{- end -}} {{- $workTitle := "" -}} {{- $workTitleFull := "" -}} {{- $workAuthorName := "" -}} {{- $workAuthorID := "" -}} {{- /* Initialize work contributor collections */ -}} {{- $workAuthors := slice -}} {{- $workTranslators := slice -}} {{- $workEditors := slice -}} {{- if $piece.WorkRefs -}} {{- $work := GetWork (index $piece.WorkRefs 0).Ref -}} {{- /* Determine short title (PreferredTitle) and full title (Citation.Title) */ -}} {{- if $work.PreferredTitle -}} {{- $workTitle = $work.PreferredTitle -}} {{- else if $work.Citation.Title -}} {{- $workTitle = $work.Citation.Title -}} {{- else if $work.Citation.Chardata -}} {{- $workTitle = $work.Citation.Chardata -}} {{- end -}} {{- /* Always get full title for highlighted state */ -}} {{- if $work.Citation.Title -}} {{- $workTitleFull = $work.Citation.Title -}} {{- else if $work.Citation.Chardata -}} {{- $workTitleFull = $work.Citation.Chardata -}} {{- else if $work.PreferredTitle -}} {{- $workTitleFull = $work.PreferredTitle -}} {{- end -}} {{- /* Get work contributors: authors, translators, editors */ -}} {{- 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) -}} {{- $workAuthors = append $workAuthors (dict "ID" $workAgentRef.Ref "Name" (index $workAgent.Names 0)) -}} {{- end -}} {{- else if eq $workAgentRef.Category "übersetzer" -}} {{- $workAgent := GetAgent $workAgentRef.Ref -}} {{- if and $workAgent (gt (len $workAgent.Names) 0) -}} {{- $workTranslators = append $workTranslators (dict "ID" $workAgentRef.Ref "Name" (index $workAgent.Names 0)) -}} {{- end -}} {{- else if eq $workAgentRef.Category "herausgeber" -}} {{- $workAgent := GetAgent $workAgentRef.Ref -}} {{- if and $workAgent (gt (len $workAgent.Names) 0) -}} {{- $workEditors = append $workEditors (dict "ID" $workAgentRef.Ref "Name" (index $workAgent.Names 0)) -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- /* Legacy single author variables for compatibility */ -}} {{- if gt (len $workAuthors) 0 -}} {{- $workAuthorName = (index $workAuthors 0).Name -}} {{- $workAuthorID = (index $workAuthors 0).ID -}} {{- end -}} {{- end -}} {{- /* Place tags helper - handle multiple places */ -}} {{- $placeTag := "" -}} {{- if and $showPlaceTags $piece.PlaceRefs -}} {{- range $placeRef := $piece.PlaceRefs -}} {{- $placeObj := GetPlace $placeRef.Ref -}} {{- if gt (len $placeObj.Names) 0 -}} {{- $placeName := index $placeObj.Names 0 -}} {{- $placeTag = printf "%s %s" $placeTag $placeObj.ID $placeName -}} {{- end -}} {{- end -}} {{- end -}} {{- /* Author prefix for colon format (place view) */ -}} {{- $colonPrefix := "" -}} {{- if $useColonFormat -}} {{- $colonPrefix = ":" -}} {{- else -}} {{- $colonPrefix = " mit " -}} {{- end -}} {{- /* Collect authors, translators, and editors */ -}} {{- $authors := slice -}} {{- $translators := slice -}} {{- $editors := slice -}} {{- 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) -}} {{- $authors = append $authors (dict "ID" $agentref.Ref "Name" (index $agent.Names 0)) -}} {{- end -}} {{- else if eq $agentref.Category "übersetzer" -}} {{- $agent := GetAgent $agentref.Ref -}} {{- if and $agent (gt (len $agent.Names) 0) -}} {{- $translators = append $translators (dict "ID" $agentref.Ref "Name" (index $agent.Names 0)) -}} {{- end -}} {{- else if eq $agentref.Category "herausgeber" -}} {{- $agent := GetAgent $agentref.Ref -}} {{- if and $agent (gt (len $agent.Names) 0) -}} {{- $editors = append $editors (dict "ID" $agentref.Ref "Name" (index $agent.Names 0)) -}} {{- end -}} {{- end -}} {{- end -}} {{- /* Generate category-specific descriptions */ -}} {{- if $categoryFlags.Rezension -}} {{- /* Show authors, translators, and editors in prefix */ -}} {{- if or (gt (len $authors) 0) (gt (len $translators) 0) (gt (len $editors) 0) -}} {{- $hasCurrentActorAuthor := false -}} {{- range $author := $authors -}} {{- if eq $author.ID $currentActorID -}} {{- $hasCurrentActorAuthor = true -}} {{- end -}} {{- end -}} {{- $hasCurrentActorTranslator := false -}} {{- range $translator := $translators -}} {{- if eq $translator.ID $currentActorID -}} {{- $hasCurrentActorTranslator = true -}} {{- end -}} {{- end -}} {{- $hasCurrentActorEditor := false -}} {{- range $editor := $editors -}} {{- if eq $editor.ID $currentActorID -}} {{- $hasCurrentActorEditor = true -}} {{- end -}} {{- end -}} {{- /* Show other authors/translators/editors in prefix */ -}} {{- if and $useColonFormat (or (not $hasCurrentActorAuthor) (not $hasCurrentActorTranslator) (not $hasCurrentActorEditor)) -}} {{ Safe $fortsPrefix }} {{- $authorElements := slice -}} {{- range $author := $authors -}} {{- if ne $author.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s" $author.ID $author.Name) -}} {{- end -}} {{- end -}} {{- range $translator := $translators -}} {{- if ne $translator.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s (Übers.)" $translator.ID $translator.Name) -}} {{- end -}} {{- end -}} {{- range $editor := $editors -}} {{- if ne $editor.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s (Hrsg.)" $editor.ID $editor.Name) -}} {{- end -}} {{- end -}} {{- range $index, $element := $authorElements -}} {{- if gt $index 0 }}, {{ end }}{{ Safe $element }} {{- end -}} {{- if gt (len $authorElements) 0 -}}{{ $colonPrefix }}{{- end -}}Rezension von: {{- else if not $useColonFormat -}} {{ Safe $fortsPrefix }} {{- $authorElements := slice -}} {{- range $author := $authors -}} {{- if ne $author.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s" $author.ID $author.Name) -}} {{- end -}} {{- end -}} {{- range $translator := $translators -}} {{- if ne $translator.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s (Übers.)" $translator.ID $translator.Name) -}} {{- end -}} {{- end -}} {{- range $editor := $editors -}} {{- if ne $editor.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s (Hrsg.)" $editor.ID $editor.Name) -}} {{- end -}} {{- end -}} {{- range $index, $element := $authorElements -}} {{- if gt $index 0 }}, {{ end }}{{ Safe $element }} {{- end -}} {{- if gt (len $authorElements) 0 -}},{{- end -}} {{- else -}} {{ Safe $fortsPrefix }}Rezension von: {{- end -}} {{- else -}} {{ Safe $fortsPrefix }}Rezension von: {{- end -}} {{ if or (gt (len $workAuthors) 0) (gt (len $workTranslators) 0) (gt (len $workEditors) 0) }} {{- /* Display work authors */ -}} {{- range $index, $author := $workAuthors -}} {{- if gt $index 0 }}, {{ end }} {{ $author.Name }} {{- end -}} {{- /* Display work translators */ -}} {{- if gt (len $workTranslators) 0 -}} {{- if gt (len $workAuthors) 0 }}, {{ end }} {{- range $index, $translator := $workTranslators -}} {{- if gt $index 0 }}, {{ end }} {{ $translator.Name }} (Übers.) {{- end -}} {{- end -}} {{- /* Display work editors */ -}} {{- if gt (len $workEditors) 0 -}} {{- if or (gt (len $workAuthors) 0) (gt (len $workTranslators) 0) }}, {{ end }} {{- range $index, $editor := $workEditors -}} {{- if gt $index 0 }}, {{ end }} {{ $editor.Name }} (Hrsg.) {{- end -}} {{- end -}}, {{ end }} {{ if $workTitle }} {{ $workTitle }} {{ else if $title }} {{ $title }} {{ else }} [Werk unbekannt] {{ end }}{{ Safe $placeTag }} {{- else if $categoryFlags.Weltnachrichten -}} {{ Safe $fortsPrefix }}Politische Nachrichten aus aller Welt{{ Safe $placeTag }} {{- else if $categoryFlags.EinkommendeFremde -}} {{- if $categoryFlags.Lokalnachrichten -}} {{ Safe $fortsPrefix }}Lokale Meldungen über einreisende Fremde {{- else if $categoryFlags.Nachruf -}} {{ Safe $fortsPrefix }}Nachruf und Einreiseliste {{- else -}} {{ Safe $fortsPrefix }}Einreiseliste {{- end -}}{{ Safe $placeTag }} {{- else if $categoryFlags.Wechselkurse -}} {{ Safe $fortsPrefix }}Wechselkurse{{ Safe $placeTag }} {{- else if $categoryFlags.Buecher -}} {{ Safe $fortsPrefix }}Bücheranzeigen{{ if $title }}: {{ $title }}{{ end }}{{ Safe $placeTag }} {{- else if $categoryFlags.Lokalanzeigen -}} {{ Safe $fortsPrefix }}{{ if $categoryFlags.Nachruf }} Todesanzeige {{ else }} Lokalanzeige {{ end }}{{ if $title }}: {{ $title }}{{ end }}{{ Safe $placeTag }} {{- else if $categoryFlags.Lokalnachrichten -}} {{ Safe $fortsPrefix }}{{ if $categoryFlags.Lotterie }} Lotterienachrichten {{ else if $categoryFlags.Nachruf }} Nachrufe {{ else if $categoryFlags.Theaterkritik }} Theaternachrichten {{ else if $categoryFlags.Panegyrik }} Festlichkeiten {{ else }} Lokalnachrichten {{ end }}{{ Safe $placeTag }} {{- else if $categoryFlags.Gedicht -}} {{- $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 and $useColonFormat (ne $agentref.Ref $currentActorID) -}} {{ Safe $fortsPrefix }}{{ index $agent.Names 0 }}{{ $colonPrefix }} {{- else if not $useColonFormat -}} {{ Safe $fortsPrefix }}{{ index $agent.Names 0 }}, {{- else -}} {{ Safe $fortsPrefix }} {{- end -}} {{ if $categoryFlags.Kommentar }} Gedicht mit Kommentar {{ else if $categoryFlags.Uebersetzung }} Gedichtübersetzung {{ else if $categoryFlags.GelehrteNachrichten }} Gedicht zu gelehrten Angelegenheiten {{ else }} Gedicht {{ end }}{{ if $title }}: „{{ $title }}"{{ end }}{{ Safe $placeTag }} {{- $authorFound = true -}} {{- break -}} {{- end -}} {{- end -}} {{- end -}} {{- if not $authorFound -}} {{ Safe $fortsPrefix }}{{ if $categoryFlags.Kommentar }} Gedicht mit Kommentar {{ else if $categoryFlags.Uebersetzung }} Gedichtübersetzung {{ else if $categoryFlags.GelehrteNachrichten }} Gedicht zu gelehrten Angelegenheiten {{ else }} Gedicht {{ end }}{{ if $title }}: „{{ $title }}"{{ end }}{{ Safe $placeTag }} {{- end -}} {{- else if $categoryFlags.Vorladung -}} {{ Safe $fortsPrefix }}Gerichtliche Vorladung{{ if $title }}: {{ $title }}{{ end }}{{ Safe $placeTag }} {{- else if $categoryFlags.Aufsatz -}} {{- $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 and $useColonFormat (ne $agentref.Ref $currentActorID) -}} {{ Safe $fortsPrefix }}{{ index $agent.Names 0 }}{{ $colonPrefix }} {{- else if not $useColonFormat -}} {{ Safe $fortsPrefix }}{{ index $agent.Names 0 }}, {{- else -}} {{ Safe $fortsPrefix }} {{- end -}} {{ if $categoryFlags.Replik }} Erwiderung {{ else if $categoryFlags.Uebersetzung }} Übersetzung {{ else if $categoryFlags.Nachruf }} Nachruf {{ else if $categoryFlags.Kommentar }} Kommentar {{ else if $categoryFlags.Rezepte }} Rezepte und Anleitungen {{ else }} Aufsatz {{ end }}{{ if $title }}: „{{ $title }}"{{ end }}{{ Safe $placeTag }} {{- $authorFound = true -}} {{- break -}} {{- end -}} {{- end -}} {{- end -}} {{- if not $authorFound -}} {{ Safe $fortsPrefix }}{{ if $categoryFlags.Replik }} Erwiderung {{ else if $categoryFlags.Uebersetzung }} Übersetzung {{ else if $categoryFlags.Nachruf }} Nachruf {{ else if $categoryFlags.Kommentar }} Kommentar {{ else if $categoryFlags.Rezepte }} Rezepte und Anleitungen {{ else }} Aufsatz {{ end }}{{ if $title }}: „{{ $title }}"{{ end }}{{ Safe $placeTag }} {{- end -}} {{- else if $categoryFlags.GelehrteNachrichten -}} {{ Safe $fortsPrefix }}{{ if $categoryFlags.Theaterkritik }} Theaterkritik {{ else if $categoryFlags.Kommentar }} Gelehrter Kommentar {{ else }} Gelehrte Nachrichten {{ end }}{{ Safe $placeTag }} {{- else if $categoryFlags.Theaterkritik -}} {{- $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 and $useColonFormat (ne $agentref.Ref $currentActorID) -}} {{ Safe $fortsPrefix }}{{ index $agent.Names 0 }}{{ $colonPrefix }} {{- else if not $useColonFormat -}} {{ Safe $fortsPrefix }}{{ index $agent.Names 0 }}, {{- else -}} {{ Safe $fortsPrefix }} {{- end -}} Theaterkritik{{ if $workTitle }} zu {{ $workTitle }}{{ if $workAuthorName }} von {{ $workAuthorName }} {{ end }} {{ else if $title }} zu {{ $title }} {{ end }}{{ Safe $placeTag }} {{- $authorFound = true -}} {{- break -}} {{- end -}} {{- end -}} {{- end -}} {{- if not $authorFound -}} {{ Safe $fortsPrefix }}Theaterkritik{{ if $workTitle }} zu {{ $workTitle }}{{ if $workAuthorName }} von {{ $workAuthorName }} {{ end }} {{ else if $title }} zu {{ $title }} {{ end }}{{ Safe $placeTag }} {{- end -}} {{- else if $categoryFlags.Proklamation -}} {{ Safe $fortsPrefix }}Amtliche Proklamation{{ if $title }}: {{ $title }}{{ end }}{{ Safe $placeTag }} {{- else if $categoryFlags.Ineigenersache -}} {{ Safe $fortsPrefix }}{{ if $categoryFlags.Kommentar }} {{ if $categoryFlags.Nachtrag }}Ergänzender Kommentar{{ else }}Redaktioneller Kommentar{{ end }} {{ else if $categoryFlags.Replik }} Redaktionelle Stellungnahme {{ else }} Anmerkung der Redaktion {{ end }}{{ if $title }}: {{ $title }}{{ end }}{{ Safe $placeTag }} {{- else if $categoryFlags.Brief -}} {{ Safe $fortsPrefix }}{{ if $categoryFlags.Nachruf }} Kondolenzbrief {{ else }} Leserbrief {{ end }} {{- $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) -}} von {{ index $agent.Names 0 }}{{- $authorFound = true -}}{{- break -}} {{- end -}} {{- end -}} {{- end -}}{{ Safe $placeTag }} {{- else -}} {{- /* Check for Nachruf category in AgentRefs first */ -}} {{- $obituaryPersonFound := false -}} {{- range $agentref := $piece.AgentRefs -}} {{- if eq $agentref.Category "nachruf" -}} {{- $agent := GetAgent $agentref.Ref -}} {{- if and $agent (gt (len $agent.Names) 0) -}} {{- if not $obituaryPersonFound -}} {{ Safe $fortsPrefix }}Nachruf auf {{- else -}} , {{- end -}} {{ index $agent.Names 0 }} {{- $obituaryPersonFound = true -}} {{- end -}} {{- end -}} {{- end -}} {{- if $obituaryPersonFound -}} {{ Safe $placeTag }} {{- else -}} {{- /* Default handling for pieces without special categories */ -}} {{- if or (gt (len $authors) 0) (gt (len $translators) 0) (gt (len $editors) 0) -}} {{- $hasCurrentActorAuthor := false -}} {{- range $author := $authors -}} {{- if eq $author.ID $currentActorID -}} {{- $hasCurrentActorAuthor = true -}} {{- end -}} {{- end -}} {{- $hasCurrentActorTranslator := false -}} {{- range $translator := $translators -}} {{- if eq $translator.ID $currentActorID -}} {{- $hasCurrentActorTranslator = true -}} {{- end -}} {{- end -}} {{- $hasCurrentActorEditor := false -}} {{- range $editor := $editors -}} {{- if eq $editor.ID $currentActorID -}} {{- $hasCurrentActorEditor = true -}} {{- end -}} {{- end -}} {{- /* Show other authors/translators/editors in prefix */ -}} {{- if and $useColonFormat (or (not $hasCurrentActorAuthor) (not $hasCurrentActorTranslator) (not $hasCurrentActorEditor)) -}} {{ Safe $fortsPrefix }} {{- $authorElements := slice -}} {{- range $author := $authors -}} {{- if ne $author.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s" $author.ID $author.Name) -}} {{- end -}} {{- end -}} {{- range $translator := $translators -}} {{- if ne $translator.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s (Übers.)" $translator.ID $translator.Name) -}} {{- end -}} {{- end -}} {{- range $editor := $editors -}} {{- if ne $editor.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s (Hrsg.)" $editor.ID $editor.Name) -}} {{- end -}} {{- end -}} {{- range $index, $element := $authorElements -}} {{- if gt $index 0 }}, {{ end }}{{ Safe $element }} {{- end -}} {{- if gt (len $authorElements) 0 -}}{{ $colonPrefix }}{{- end -}} {{- else if not $useColonFormat -}} {{ Safe $fortsPrefix }} {{- $authorElements := slice -}} {{- range $author := $authors -}} {{- if ne $author.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s" $author.ID $author.Name) -}} {{- end -}} {{- end -}} {{- range $translator := $translators -}} {{- if ne $translator.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s (Übers.)" $translator.ID $translator.Name) -}} {{- end -}} {{- end -}} {{- range $editor := $editors -}} {{- if ne $editor.ID $currentActorID -}} {{- $authorElements = append $authorElements (printf "%s (Hrsg.)" $editor.ID $editor.Name) -}} {{- end -}} {{- end -}} {{- range $index, $element := $authorElements -}} {{- if gt $index 0 }}, {{ end }}{{ Safe $element }} {{- end -}} {{- if gt (len $authorElements) 0 -}} {{- if $title }}: {{ $title }}{{ end }}{{ if $workTitle }} {{ if and $title (not $categoryFlags.Uebersetzung) }}, {{ end }}{{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ if $workAuthorName }} {{ $workAuthorName }}, {{ end }}{{ $workTitle }} {{ end }} {{- else -}} {{- if $title }}{{ $title }}{{ end }}{{ if $workTitle }} {{ if and $title (not $categoryFlags.Uebersetzung) }}, {{ end }}{{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ if $workAuthorName }} {{ $workAuthorName }}, {{ end }}{{ $workTitle }} {{ end }} {{- end -}}{{ Safe $placeTag }} {{- else -}} {{ Safe $fortsPrefix }}{{ if $title }}{{ $title }}{{ end }}{{ if $workTitle }} {{ if and $title (not $categoryFlags.Uebersetzung) }}, {{ end }}{{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ if $workAuthorName }} {{ $workAuthorName }}, {{ end }}{{ $workTitle }} {{ end }}{{ Safe $placeTag }} {{- end -}} {{- else -}} {{ Safe $fortsPrefix }}{{ if $title }}{{ $title }}{{ end }}{{ if $workTitle }} {{ if and $title (not $categoryFlags.Uebersetzung) }}, {{ end }}{{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ if $workAuthorName }} {{ $workAuthorName }}, {{ end }}{{ $workTitle }} {{ else if not $title }} Beitrag ohne Titel {{ end }}{{ Safe $placeTag }} {{- end -}} {{- end -}} {{- end -}}
{{- if eq $displayMode "issue" -}} {{- /* Only show annotations for issue view and non-continuation pieces */ -}} {{- if not $isContinuation -}} {{- range $annotation := $piece.AnnotationNote.Annotations -}}
{{ Safe $annotation.HTML }}
{{- end -}} {{- end -}} {{- end -}}