mirror of
				https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
				synced 2025-10-29 17:15:31 +00:00 
			
		
		
		
	unified citation template
This commit is contained in:
		| @@ -59,7 +59,7 @@ | ||||
| 									style="{{ if $individualPiece.PieceByIssue.IsContinuation }} | ||||
| 										display: none; | ||||
| 									{{ end }}"> | ||||
| 									{{ template "_inhaltsverzeichnis_eintrag" $individualPiece.PieceByIssue }} | ||||
| 									{{ template "_unified_piece_entry" (dict "Piece" $individualPiece.PieceByIssue "DisplayMode" "issue" "ShowPlaceTags" true "UseColonFormat" false "ShowContinuation" true) }} | ||||
|  | ||||
|  | ||||
| 									<!-- Links zu anderen Teilen: --> | ||||
| @@ -197,7 +197,7 @@ | ||||
| 									style="{{ if $individualPiece.PieceByIssue.IsContinuation }} | ||||
| 										display: none; | ||||
| 									{{ end }}"> | ||||
| 									{{ template "_inhaltsverzeichnis_eintrag" $individualPiece.PieceByIssue }} | ||||
| 									{{ template "_unified_piece_entry" (dict "Piece" $individualPiece.PieceByIssue "DisplayMode" "issue" "ShowPlaceTags" true "UseColonFormat" false "ShowContinuation" true) }} | ||||
|  | ||||
|  | ||||
| 									<!-- Links zu anderen Teilen: --> | ||||
|   | ||||
| @@ -35,7 +35,7 @@ | ||||
| 				<div class="break-inside-avoid pl-4"> | ||||
| 					<div class="pb-1 indent-4"> | ||||
| 						{{- /* Use first piece for display text */ -}} | ||||
| 						{{ template "_piece_summary" (dict "Piece" (index $groupedItems 0).Item "CurrentActorID" $a.ID) }} | ||||
| 						{{ template "_unified_piece_entry" (dict "Piece" (index $groupedItems 0).Item "CurrentActorID" $a.ID "DisplayMode" "akteure" "ShowPlaceTags" true "UseColonFormat" false "ShowContinuation" false) }} | ||||
|  | ||||
| 						{{- /* Show all citations from all pieces in this group inline with commas */ -}} | ||||
| 						{{ " " }}{{- range $groupIndex, $groupItem := $groupedItems -}} | ||||
|   | ||||
| @@ -21,7 +21,19 @@ | ||||
| 			<div class="mb-2 break-inside-avoid max-w-[95ch]"> | ||||
| 				{{- if ne (len $w.Item.Citation.InnerXML ) 0 -}} | ||||
| 					<div class="indent-6"> | ||||
| 						{{- Safe $w.Item.Citation.HTML -}} | ||||
| 						{{- /* Check person's role in this work */ -}} | ||||
| 						{{- $personRole := "" -}} | ||||
| 						{{- range $workAgentRef := $w.Item.AgentRefs -}} | ||||
| 							{{- if eq $workAgentRef.Ref $a.ID -}} | ||||
| 								{{- if eq $workAgentRef.Category "übersetzer" -}} | ||||
| 									{{- $personRole = "(Übers.) " -}} | ||||
| 								{{- else if eq $workAgentRef.Category "herausgeber" -}} | ||||
| 									{{- $personRole = "(Hrsg.) " -}} | ||||
| 								{{- end -}} | ||||
| 								{{- break -}} | ||||
| 							{{- end -}} | ||||
| 						{{- end -}} | ||||
| 						{{- Safe $personRole -}}{{- Safe $w.Item.Citation.HTML -}} | ||||
| 						{{- range $_, $url := $w.Item.URLs -}} | ||||
| 							<span class="ml-1 whitespace-nowrap"> | ||||
| 								<a href="{{ $url.Address }}" target="_blank" class="text-blue-600 hover:text-blue-800 text-sm"> | ||||
| @@ -70,18 +82,26 @@ | ||||
| 								{{- $categories = append $categories "Beitrag" -}} | ||||
| 							{{- end -}} | ||||
|  | ||||
| 							{{- /* Get authors for this piece (excluding current person) */ -}} | ||||
| 							{{- /* Get authors, translators, and editors for this piece (excluding current person) */ -}} | ||||
| 							{{- $pieceAuthors := slice -}} | ||||
| 							{{- $pieceTranslators := slice -}} | ||||
| 							{{- $pieceEditors := slice -}} | ||||
| 							{{- range $agentref := $p.Item.AgentRefs -}} | ||||
| 								{{- if and (or (eq $agentref.Category "") (eq $agentref.Category "autor")) (ne $agentref.Ref $a.ID) -}} | ||||
| 									{{- $pieceAuthors = append $pieceAuthors $agentref.Ref -}} | ||||
| 								{{- else if and (eq $agentref.Category "übersetzer") (ne $agentref.Ref $a.ID) -}} | ||||
| 									{{- $pieceTranslators = append $pieceTranslators $agentref.Ref -}} | ||||
| 								{{- else if and (eq $agentref.Category "herausgeber") (ne $agentref.Ref $a.ID) -}} | ||||
| 									{{- $pieceEditors = append $pieceEditors $agentref.Ref -}} | ||||
| 								{{- end -}} | ||||
| 							{{- end -}} | ||||
| 							{{- $sortedAuthors := sortStrings $pieceAuthors -}} | ||||
| 							{{- $sortedTranslators := sortStrings $pieceTranslators -}} | ||||
| 							{{- $sortedEditors := sortStrings $pieceEditors -}} | ||||
|  | ||||
| 							{{- /* Create group key: categories + authors */ -}} | ||||
| 							{{- /* Create group key: categories + authors + translators + editors */ -}} | ||||
| 							{{- $sortedCategories := sortStrings $categories -}} | ||||
| 							{{- $groupKey := printf "%s|%s" (joinWithUnd $sortedCategories) (joinWithUnd $sortedAuthors) -}} | ||||
| 							{{- $groupKey := printf "%s|%s|%s|%s" (joinWithUnd $sortedCategories) (joinWithUnd $sortedAuthors) (joinWithUnd $sortedTranslators) (joinWithUnd $sortedEditors) -}} | ||||
|  | ||||
| 							{{- /* Add piece to group (check for duplicates by ID) */ -}} | ||||
| 							{{- $existing := index $pieceGroups $groupKey -}} | ||||
| @@ -104,10 +124,18 @@ | ||||
| 						{{- /* Display each group */ -}} | ||||
| 						{{- range $groupKey, $groupPieces := $pieceGroups -}} | ||||
| 							<div class="mb-1 text-gray-600"> | ||||
| 								{{- /* Extract categories and authors from group key */ -}} | ||||
| 								{{- /* Extract categories, authors, translators, and editors from group key */ -}} | ||||
| 								{{- $keyParts := split $groupKey "|" -}} | ||||
| 								{{- $categoryName := index $keyParts 0 -}} | ||||
| 								{{- $authorPart := index $keyParts 1 -}} | ||||
| 								{{- $translatorPart := "" -}} | ||||
| 								{{- if gt (len $keyParts) 2 -}} | ||||
| 									{{- $translatorPart = index $keyParts 2 -}} | ||||
| 								{{- end -}} | ||||
| 								{{- $editorPart := "" -}} | ||||
| 								{{- if gt (len $keyParts) 3 -}} | ||||
| 									{{- $editorPart = index $keyParts 3 -}} | ||||
| 								{{- end -}} | ||||
|  | ||||
| 								{{- /* Use plural if multiple pieces grouped together */ -}} | ||||
| 								{{- $displayCategory := $categoryName -}} | ||||
| @@ -130,7 +158,39 @@ | ||||
| 										{{- $displayCategory = "Beiträge" -}} | ||||
| 									{{- end -}} | ||||
| 								{{- end -}} | ||||
| 								{{ $displayCategory }}{{- if ne $authorPart "" }} von {{ range $i, $authorID := (split $authorPart " und ") }}{{- if gt $i 0 }} und {{ end }}{{- $agent := GetAgent $authorID -}}{{- if and $agent (gt (len $agent.Names) 0) -}}<a href="/akteure/{{ $authorID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>{{- end -}}{{ end }}{{- end }}: | ||||
| 								{{ $displayCategory }}{{- if or (ne $authorPart "") (ne $translatorPart "") (ne $editorPart "") }} von {{ end }} | ||||
| 								{{- /* Display authors */ -}} | ||||
| 								{{- if ne $authorPart "" -}} | ||||
| 									{{- range $i, $authorID := (split $authorPart " und ") -}} | ||||
| 										{{- if gt $i 0 }} und {{ end }} | ||||
| 										{{- $agent := GetAgent $authorID -}} | ||||
| 										{{- if and $agent (gt (len $agent.Names) 0) -}} | ||||
| 											<a href="/akteure/{{ $authorID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a> | ||||
| 										{{- end -}} | ||||
| 									{{- end -}} | ||||
| 								{{- end -}} | ||||
| 								{{- /* Display translators with (Übers.) suffix */ -}} | ||||
| 								{{- if ne $translatorPart "" -}} | ||||
| 									{{- if ne $authorPart "" }}, {{ end }} | ||||
| 									{{- range $i, $translatorID := (split $translatorPart " und ") -}} | ||||
| 										{{- if gt $i 0 }}, {{ end }} | ||||
| 										{{- $agent := GetAgent $translatorID -}} | ||||
| 										{{- if and $agent (gt (len $agent.Names) 0) -}} | ||||
| 											<a href="/akteure/{{ $translatorID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a> (Übers.) | ||||
| 										{{- end -}} | ||||
| 									{{- end -}} | ||||
| 								{{- end -}} | ||||
| 								{{- /* Display editors with (Hrsg.) suffix */ -}} | ||||
| 								{{- if ne $editorPart "" -}} | ||||
| 									{{- if or (ne $authorPart "") (ne $translatorPart "") }}, {{ end }} | ||||
| 									{{- range $i, $editorID := (split $editorPart " und ") -}} | ||||
| 										{{- if gt $i 0 }}, {{ end }} | ||||
| 										{{- $agent := GetAgent $editorID -}} | ||||
| 										{{- if and $agent (gt (len $agent.Names) 0) -}} | ||||
| 											<a href="/akteure/{{ $editorID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a> (Hrsg.) | ||||
| 										{{- end -}} | ||||
| 									{{- end -}} | ||||
| 								{{- end -}}: | ||||
| 								{{- /* Show citations separated by commas */ -}} | ||||
| 								{{ " " }}{{- range $pieceIndex, $p := $groupPieces -}} | ||||
| 									{{- range $issueIndex, $issue := $p.Item.IssueRefs -}} | ||||
|   | ||||
| @@ -1,426 +0,0 @@ | ||||
| {{- $piece := . -}} | ||||
| {{- $fortsPrefix := "" -}} | ||||
| {{- if $piece.IsContinuation -}} | ||||
| 	{{- $fortsPrefix = "<span class=\"italic text-gray-600\">(Forts.) </span>" -}} | ||||
| {{- end -}} | ||||
|  | ||||
|  | ||||
| <div class="entry-description leading-snug mb-1"> | ||||
| 	{{- $categoryFlags := GetCategoryFlags $piece.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 := "" -}} | ||||
| 	{{- $workTitleFull := "" -}} | ||||
| 	{{- $workAuthorName := "" -}} | ||||
| 	{{- $workAuthorID := "" -}} | ||||
| 	{{- 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 author */ -}} | ||||
| 		{{- 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 -}} | ||||
|  | ||||
| 	{{- /* Generate natural text descriptions */ -}} | ||||
|  | ||||
| 	{{- if $categoryFlags.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) -}} | ||||
| 					{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600" | ||||
| 						>{{ index $agent.Names 0 }}</a | ||||
| 					>, | ||||
| 					<span class="review-format" | ||||
| 						>Rezension von: | ||||
| 						{{ if $workAuthorName }} | ||||
| 							{{- if $workAuthorID -}} | ||||
| 								<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a> | ||||
| 							{{- else -}} | ||||
| 								{{ $workAuthorName }} | ||||
| 							{{- end -}}, | ||||
| 						{{ end }} | ||||
| 						{{ if $workTitle }} | ||||
| 							<em | ||||
| 								class="work-title" | ||||
| 								data-short-title="{{ $workTitle }}" | ||||
| 								{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 								>{{ $workTitle }}</em | ||||
| 							> | ||||
| 						{{ else if $title }} | ||||
| 							<em>{{ $title }}</em> | ||||
| 						{{ else }} | ||||
| 							[Werk unbekannt] | ||||
| 						{{ end }}</span | ||||
| 					>{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			{{ Safe $fortsPrefix }}<span class="review-format" | ||||
| 				>Rezension von: | ||||
| 				{{ if $workAuthorName }} | ||||
| 					{{- if $workAuthorID -}} | ||||
| 						<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a> | ||||
| 					{{- else -}} | ||||
| 						{{ $workAuthorName }} | ||||
| 					{{- end -}}, | ||||
| 				{{ end }} | ||||
| 				{{ if $workTitle }} | ||||
| 					<em | ||||
| 						class="work-title" | ||||
| 						data-short-title="{{ $workTitle }}" | ||||
| 						{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 						>{{ $workTitle }}</em | ||||
| 					> | ||||
| 				{{ else if $title }} | ||||
| 					<em>{{ $title }}</em> | ||||
| 				{{ else }} | ||||
| 					[Werk unbekannt] | ||||
| 				{{ end }}</span | ||||
| 			>{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Weltnachrichten -}} | ||||
| 		{{ Safe $fortsPrefix }}Politische Nachrichten aus aller Welt | ||||
| 	{{- else if $categoryFlags.EinkommendeFremde -}} | ||||
| 		{{- if $categoryFlags.Lokalnachrichten -}} | ||||
| 			Lokale Meldungen über einreisende Fremde | ||||
| 		{{- else if $categoryFlags.Nachruf -}} | ||||
| 			Nachruf und Einreiseliste | ||||
| 		{{- else -}} | ||||
| 			Einreiseliste | ||||
| 		{{- end -}}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Wechselkurse -}} | ||||
| 		Wechselkurse{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Buecher -}} | ||||
| 		Bücheranzeigen{{ if $title }}: <em>{{ $title }}</em>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Lokalanzeigen -}} | ||||
| 		{{ if $categoryFlags.Nachruf }} | ||||
| 			Todesanzeige | ||||
| 		{{ else }} | ||||
| 			Lokalanzeige | ||||
| 		{{ end }}{{ if $title }}: <em>{{ $title }}</em>{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Lokalnachrichten -}} | ||||
| 		{{ if $categoryFlags.Lotterie }} | ||||
| 			Lotterienachrichten | ||||
| 		{{ else if $categoryFlags.Nachruf }} | ||||
| 			Nachrufe | ||||
| 		{{ else if $categoryFlags.Theaterkritik }} | ||||
| 			Theaternachrichten | ||||
| 		{{ else if $categoryFlags.Panegyrik }} | ||||
| 			Festlichkeiten | ||||
| 		{{ else }} | ||||
| 			Lokalnachrichten | ||||
| 		{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- 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) -}} | ||||
| 					{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, | ||||
| 					{{ 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 }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 					{{- $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 }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Vorladung -}} | ||||
| 		Gerichtliche Vorladung{{ if $title }}: <em>{{ $title }}</em>{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- 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) -}} | ||||
| 					{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600" | ||||
| 						>{{ index $agent.Names 0 }}</a | ||||
| 					>, | ||||
| 					{{ 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 }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 					{{- $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 }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.GelehrteNachrichten -}} | ||||
| 		{{ Safe $fortsPrefix }}{{ if $categoryFlags.Theaterkritik }} | ||||
| 			Theaterkritik | ||||
| 		{{ else if $categoryFlags.Kommentar }} | ||||
| 			Gelehrter Kommentar | ||||
| 		{{ else }} | ||||
| 			Gelehrte Nachrichten | ||||
| 		{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- 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) -}} | ||||
| 					{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600" | ||||
| 						>{{ index $agent.Names 0 }}</a | ||||
| 					>, | ||||
| 					Theaterkritik{{ if $workTitle }} | ||||
| 						zu <em>{{ $workTitle }}</em>{{ if $workAuthorName }} | ||||
| 							von | ||||
| 							<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a> | ||||
| 						{{ end }} | ||||
| 					{{ else if $title }} | ||||
| 						zu <em>{{ $title }}</em> | ||||
| 					{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			{{ Safe $fortsPrefix }}Theaterkritik{{ if $workTitle }} | ||||
| 				zu <em>{{ $workTitle }}</em>{{ if $workAuthorName }} | ||||
| 					von <a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a> | ||||
| 				{{ end }} | ||||
| 			{{ else if $title }} | ||||
| 				zu <em>{{ $title }}</em> | ||||
| 			{{ end }}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Proklamation -}} | ||||
| 		{{ Safe $fortsPrefix }}Amtliche | ||||
| 		Proklamation{{ if $title }}: <em>{{ $title }}</em>{{ end }} | ||||
|  | ||||
| 	{{- 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 }}: <em>{{ $title }}</em>{{ end }} | ||||
|  | ||||
| 	{{- 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 | ||||
| 					<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a | ||||
| 					>{{- $authorFound = true -}}{{- break -}} | ||||
| 				{{- end -}} | ||||
|  | ||||
| 			{{- end -}} | ||||
|  | ||||
| 		{{- end -}}{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Desertionsliste -}} | ||||
| 		{{ Safe $fortsPrefix }}Desertionsliste{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Notenblatt -}} | ||||
| 		{{ Safe $fortsPrefix }}{{ if $categoryFlags.Nachtrag }}Ergänztes{{ end }}Notenblatt{{ if $title }} | ||||
| 			: <em>{{ $title }}</em> | ||||
| 		{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Vorlesungsverzeichnis -}} | ||||
| 		{{ Safe $fortsPrefix }}Vorlesungsverzeichnis{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Erzaehlung -}} | ||||
| 		{{- $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) -}} | ||||
| 					{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600" | ||||
| 						>{{ index $agent.Names 0 }}</a | ||||
| 					>, | ||||
| 					{{ if $categoryFlags.Uebersetzung }} | ||||
| 						Übersetzung einer Erzählung | ||||
| 					{{ else }} | ||||
| 						Erzählung | ||||
| 					{{ end }}{{ if $title }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			{{ Safe $fortsPrefix }}{{ if $categoryFlags.Uebersetzung }} | ||||
| 				Übersetzung einer Erzählung | ||||
| 			{{ else }} | ||||
| 				Erzählung | ||||
| 			{{ end }}{{ if $title }}: <em>„{{ $title }}"</em>{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Abbildung -}} | ||||
| 		{{ Safe $fortsPrefix }}{{ if $categoryFlags.Aufsatz }} | ||||
| 			Illustrierter Aufsatz | ||||
| 		{{ else }} | ||||
| 			Abbildung | ||||
| 		{{ end }} | ||||
| 		{{ if $title }}: <em>{{ $title }}</em>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Kriminalanzeige -}} | ||||
| 		{{ Safe $fortsPrefix }}Kriminalanzeige{{ if $place }} <span class="place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap">{{ $place }}</span>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Korrektur -}} | ||||
| 		{{ Safe $fortsPrefix }}Korrektur{{ if $title }}: <em>{{ $title }}</em>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Anzeige -}} | ||||
| 		{{ Safe $fortsPrefix }}{{ if $categoryFlags.Auszug }} | ||||
| 			{{ if $categoryFlags.Gedicht }}Gedichtauszug{{ else }}Textauszug{{ end }} | ||||
| 		{{ else }} | ||||
| 			Anzeige | ||||
| 		{{ end }} | ||||
| 		{{ if $title }}: <em>{{ $title }}</em>{{ end }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Auszug -}} | ||||
| 		{{ Safe $fortsPrefix }}{{ if $title }}<em>{{ $title }}</em>, {{ end }}{{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ if $workAuthorName }} | ||||
| 			<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}{{ if $workTitle }}<em | ||||
| 				class="work-title" | ||||
| 				data-short-title="{{ $workTitle }}" | ||||
| 				{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 				>{{ $workTitle }}</em>{{ else if $title }}<em>{{ $title }}</em>{{ else }}[Werk unbekannt]{{ 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) -}} | ||||
| 					{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600" | ||||
| 						>{{ index $agent.Names 0 }}</a | ||||
| 					>{{ if $title }}: <em>{{ $title }}</em>{{ end }}{{ if $workTitle }} | ||||
| 						{{ if $title }}, {{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ end }}{{ if $workAuthorName }} | ||||
| 							<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}<em | ||||
| 							class="work-title" | ||||
| 							data-short-title="{{ $workTitle }}" | ||||
| 							{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 							>{{ $workTitle }}</em> | ||||
| 					{{ end }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			{{ Safe $fortsPrefix }}{{ if $title }}<em>{{ $title }}</em>{{ end }}{{ if $workTitle }} | ||||
| 				{{ if $title }}, {{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ end }}{{ if $workAuthorName }} | ||||
| 					<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}<em | ||||
| 					class="work-title" | ||||
| 					data-short-title="{{ $workTitle }}" | ||||
| 					{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 					>{{ $workTitle }}</em> | ||||
| 			{{ else if not $title }} | ||||
| 				Beitrag ohne Titel | ||||
| 			{{ end }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- end -}} | ||||
| </div> | ||||
|  | ||||
| {{- if not $piece.IsContinuation -}} | ||||
| 	{{- range $annotation := $piece.AnnotationNote.Annotations -}} | ||||
| 		<div class="italic text-sm mt-0.5 text-slate-600"> | ||||
| 			{{ Safe $annotation.HTML }} | ||||
| 		</div> | ||||
| 	{{- end -}} | ||||
| {{- end -}} | ||||
| @@ -1,204 +0,0 @@ | ||||
| {{- $piece := .Piece -}} | ||||
| {{- $currentActorID := .CurrentActorID -}} | ||||
|  | ||||
| 	{{- $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" -}} | ||||
| 		{{- /* Collect all additional authors (not current actor) */ -}} | ||||
| 		{{- $additionalAuthors := slice -}} | ||||
| 		{{- $currentAuthorFound := 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 -}} | ||||
| 						{{- $additionalAuthors = append $additionalAuthors $agent -}} | ||||
| 					{{- else -}} | ||||
| 						{{- $currentAuthorFound = true -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 		{{- /* Display review with proper author attribution */ -}} | ||||
| 		{{- if $additionalAuthors -}} | ||||
| 			mit {{ range $i, $author := $additionalAuthors }}{{- if gt $i 0 }} und {{ end }}<a href="/akteure/{{ $author.ID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $author.Names 0 }}</a>{{ end }}, {{ $categoryName }} von: | ||||
| 		{{- else if $currentAuthorFound -}} | ||||
| 			{{ $categoryName }} von: | ||||
| 		{{- else -}} | ||||
| 			{{ $categoryName }} von: | ||||
| 		{{- end -}} | ||||
| 		{{ 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 }} | ||||
|  | ||||
| 	{{- else -}} | ||||
| 		{{- /* Collect all additional authors (not current actor) */ -}} | ||||
| 		{{- $additionalAuthors := slice -}} | ||||
| 		{{- $currentAuthorFound := 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 -}} | ||||
| 						{{- $additionalAuthors = append $additionalAuthors $agent -}} | ||||
| 					{{- else -}} | ||||
| 						{{- $currentAuthorFound = true -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 		{{- /* Display with proper author attribution */ -}} | ||||
| 		{{- if $additionalAuthors -}} | ||||
| 			mit {{ range $i, $author := $additionalAuthors }}{{- if gt $i 0 }} und {{ end }}<a href="/akteure/{{ $author.ID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $author.Names 0 }}</a>{{ end }}, {{ $categoryName }}{{ if $title }}: <em>{{ $title }}</em>{{ end }} | ||||
| 		{{- else if $currentAuthorFound -}} | ||||
| 			{{ $categoryName }}{{ if $title }}: <em>{{ $title }}</em>{{ end }} | ||||
| 		{{- else -}} | ||||
| 			{{ $categoryName }}{{ if $title }}: <em>{{ $title }}</em>{{ else if eq $categoryName "Beitrag" }} ohne Titel{{ end }} | ||||
| 		{{- end -}} | ||||
| 	{{- end -}} | ||||
|  | ||||
| @@ -1,203 +0,0 @@ | ||||
| {{- $piece := .Piece -}} | ||||
| {{- $currentActorID := .CurrentActorID -}} | ||||
|  | ||||
| 	{{- $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" -}} | ||||
| 		{{- /* Collect all additional authors (not current actor) */ -}} | ||||
| 		{{- $additionalAuthors := slice -}} | ||||
| 		{{- $currentAuthorFound := 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 -}} | ||||
| 						{{- $additionalAuthors = append $additionalAuthors $agent -}} | ||||
| 					{{- else -}} | ||||
| 						{{- $currentAuthorFound = true -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 		{{- /* Display review with colon instead of "mit" for place view */ -}} | ||||
| 		{{- if $additionalAuthors -}} | ||||
| 			{{ range $i, $author := $additionalAuthors }}{{- if gt $i 0 }} und {{ end }}<a href="/akteure/{{ $author.ID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $author.Names 0 }}</a>{{ end }}: {{ $categoryName }} von: | ||||
| 		{{- else if $currentAuthorFound -}} | ||||
| 			{{ $categoryName }} von: | ||||
| 		{{- else -}} | ||||
| 			{{ $categoryName }} von: | ||||
| 		{{- end -}} | ||||
| 		{{ 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 }} | ||||
|  | ||||
| 	{{- else -}} | ||||
| 		{{- /* Collect all additional authors (not current actor) */ -}} | ||||
| 		{{- $additionalAuthors := slice -}} | ||||
| 		{{- $currentAuthorFound := 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 -}} | ||||
| 						{{- $additionalAuthors = append $additionalAuthors $agent -}} | ||||
| 					{{- else -}} | ||||
| 						{{- $currentAuthorFound = true -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 		{{- /* Display with colon instead of "mit" for place view */ -}} | ||||
| 		{{- if $additionalAuthors -}} | ||||
| 			{{ range $i, $author := $additionalAuthors }}{{- if gt $i 0 }} und {{ end }}<a href="/akteure/{{ $author.ID }}" class="text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $author.Names 0 }}</a>{{ end }}: {{ $categoryName }}{{ if $title }}: <em>{{ $title }}</em>{{ end }} | ||||
| 		{{- else if $currentAuthorFound -}} | ||||
| 			{{ $categoryName }}{{ if $title }}: <em>{{ $title }}</em>{{ end }} | ||||
| 		{{- else -}} | ||||
| 			{{ $categoryName }}{{ if $title }}: <em>{{ $title }}</em>{{ else if eq $categoryName "Beitrag" }} ohne Titel{{ end }} | ||||
| 		{{- end -}} | ||||
| 	{{- end -}} | ||||
							
								
								
									
										615
									
								
								views/routes/components/_unified_piece_entry.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										615
									
								
								views/routes/components/_unified_piece_entry.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,615 @@ | ||||
| {{- /* | ||||
|     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 = "<span class=\"italic text-gray-600\">(Forts.) </span>" -}} | ||||
| {{- end -}} | ||||
|  | ||||
| <div class="entry-description leading-snug mb-1"> | ||||
| 	{{- $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 <a href=\"/ort/%s\"><span class=\"place-tag inline-block bg-slate-200 text-slate-700 text-xs px-2 py-0.5 rounded-md whitespace-nowrap\">%s</span></a>" $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 "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a>" $author.ID $author.Name) -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 				{{- range $translator := $translators -}} | ||||
| 					{{- if ne $translator.ID $currentActorID -}} | ||||
| 						{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a> (Übers.)" $translator.ID $translator.Name) -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 				{{- range $editor := $editors -}} | ||||
| 					{{- if ne $editor.ID $currentActorID -}} | ||||
| 						{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a> (Hrsg.)" $editor.ID $editor.Name) -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 				{{- range $index, $element := $authorElements -}} | ||||
| 					{{- if gt $index 0 }}, {{ end }}{{ Safe $element }} | ||||
| 				{{- end -}}{{ $colonPrefix }}Rezension von: | ||||
| 			{{- else if not $useColonFormat -}} | ||||
| 				{{ Safe $fortsPrefix }} | ||||
| 				{{- $authorElements := slice -}} | ||||
| 				{{- range $author := $authors -}} | ||||
| 					{{- if ne $author.ID $currentActorID -}} | ||||
| 						{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a>" $author.ID $author.Name) -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 				{{- range $translator := $translators -}} | ||||
| 					{{- if ne $translator.ID $currentActorID -}} | ||||
| 						{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a> (Übers.)" $translator.ID $translator.Name) -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 				{{- range $editor := $editors -}} | ||||
| 					{{- if ne $editor.ID $currentActorID -}} | ||||
| 						{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a> (Hrsg.)" $editor.ID $editor.Name) -}} | ||||
| 					{{- end -}} | ||||
| 				{{- end -}} | ||||
| 				{{- range $index, $element := $authorElements -}} | ||||
| 					{{- if gt $index 0 }}, {{ end }}{{ Safe $element }} | ||||
| 				{{- end -}}, | ||||
| 			{{- else -}} | ||||
| 				{{ Safe $fortsPrefix }}Rezension von: | ||||
| 			{{- end -}} | ||||
| 		{{- else -}} | ||||
| 			{{ Safe $fortsPrefix }}Rezension von: | ||||
| 		{{- end -}} | ||||
| 		<span class="review-format"> | ||||
| 			{{ 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 }} | ||||
| 					<a href="/akteure/{{ $author.ID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $author.Name }}</a> | ||||
| 				{{- end -}} | ||||
| 				{{- /* Display work translators */ -}} | ||||
| 				{{- if gt (len $workTranslators) 0 -}} | ||||
| 					{{- if gt (len $workAuthors) 0 }}, {{ end }} | ||||
| 					{{- range $index, $translator := $workTranslators -}} | ||||
| 						{{- if gt $index 0 }}, {{ end }} | ||||
| 						<a href="/akteure/{{ $translator.ID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $translator.Name }}</a> (Ü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 }} | ||||
| 						<a href="/akteure/{{ $editor.ID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $editor.Name }}</a> (Hrsg.) | ||||
| 					{{- end -}} | ||||
| 				{{- end -}}, | ||||
| 			{{ end }} | ||||
| 			{{ if $workTitle }} | ||||
| 				<em | ||||
| 					class="work-title" | ||||
| 					data-short-title="{{ $workTitle }}" | ||||
| 					{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 					>{{ $workTitle }}</em | ||||
| 				> | ||||
| 			{{ else if $title }} | ||||
| 				<em>{{ $title }}</em> | ||||
| 			{{ else }} | ||||
| 				[Werk unbekannt] | ||||
| 			{{ end }}</span | ||||
| 		>{{ 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 }}: <em>{{ $title }}</em>{{ end }}{{ Safe $placeTag }} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Lokalanzeigen -}} | ||||
| 		{{ Safe $fortsPrefix }}{{ if $categoryFlags.Nachruf }} | ||||
| 			Todesanzeige | ||||
| 		{{ else }} | ||||
| 			Lokalanzeige | ||||
| 		{{ end }}{{ if $title }}: <em>{{ $title }}</em>{{ 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 }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>{{ $colonPrefix }} | ||||
| 					{{- else if not $useColonFormat -}} | ||||
| 						{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, | ||||
| 					{{- 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 }}: <em>„{{ $title }}"</em>{{ 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 }}: <em>„{{ $title }}"</em>{{ end }}{{ Safe $placeTag }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Vorladung -}} | ||||
| 		{{ Safe $fortsPrefix }}Gerichtliche Vorladung{{ if $title }}: <em>{{ $title }}</em>{{ 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 }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>{{ $colonPrefix }} | ||||
| 					{{- else if not $useColonFormat -}} | ||||
| 						{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, | ||||
| 					{{- 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 }}: <em>„{{ $title }}"</em>{{ 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 }}: <em>„{{ $title }}"</em>{{ 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 }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>{{ $colonPrefix }} | ||||
| 					{{- else if not $useColonFormat -}} | ||||
| 						{{ Safe $fortsPrefix }}<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a>, | ||||
| 					{{- else -}} | ||||
| 						{{ Safe $fortsPrefix }} | ||||
| 					{{- end -}} | ||||
| 					Theaterkritik{{ if $workTitle }} | ||||
| 						zu <em>{{ $workTitle }}</em>{{ if $workAuthorName }} | ||||
| 							von | ||||
| 							<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a> | ||||
| 						{{ end }} | ||||
| 					{{ else if $title }} | ||||
| 						zu <em>{{ $title }}</em> | ||||
| 					{{ end }}{{ Safe $placeTag }} | ||||
| 					{{- $authorFound = true -}} | ||||
| 					{{- break -}} | ||||
| 				{{- end -}} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
| 		{{- if not $authorFound -}} | ||||
| 			{{ Safe $fortsPrefix }}Theaterkritik{{ if $workTitle }} | ||||
| 				zu <em>{{ $workTitle }}</em>{{ if $workAuthorName }} | ||||
| 					von <a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a> | ||||
| 				{{ end }} | ||||
| 			{{ else if $title }} | ||||
| 				zu <em>{{ $title }}</em> | ||||
| 			{{ end }}{{ Safe $placeTag }} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- else if $categoryFlags.Proklamation -}} | ||||
| 		{{ Safe $fortsPrefix }}Amtliche Proklamation{{ if $title }}: <em>{{ $title }}</em>{{ 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 }}: <em>{{ $title }}</em>{{ 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 | ||||
| 					<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a | ||||
| 					>{{- $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 -}} | ||||
| 					<a href="/akteure/{{ $agentref.Ref }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ index $agent.Names 0 }}</a> | ||||
| 					{{- $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 "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a>" $author.ID $author.Name) -}} | ||||
| 						{{- end -}} | ||||
| 					{{- end -}} | ||||
| 					{{- range $translator := $translators -}} | ||||
| 						{{- if ne $translator.ID $currentActorID -}} | ||||
| 							{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a> (Übers.)" $translator.ID $translator.Name) -}} | ||||
| 						{{- end -}} | ||||
| 					{{- end -}} | ||||
| 					{{- range $editor := $editors -}} | ||||
| 						{{- if ne $editor.ID $currentActorID -}} | ||||
| 							{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a> (Hrsg.)" $editor.ID $editor.Name) -}} | ||||
| 						{{- end -}} | ||||
| 					{{- end -}} | ||||
| 					{{- range $index, $element := $authorElements -}} | ||||
| 						{{- if gt $index 0 }}, {{ end }}{{ Safe $element }} | ||||
| 					{{- end -}}{{ $colonPrefix }} | ||||
| 				{{- else if not $useColonFormat -}} | ||||
| 					{{ Safe $fortsPrefix }} | ||||
| 					{{- $authorElements := slice -}} | ||||
| 					{{- range $author := $authors -}} | ||||
| 						{{- if ne $author.ID $currentActorID -}} | ||||
| 							{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a>" $author.ID $author.Name) -}} | ||||
| 						{{- end -}} | ||||
| 					{{- end -}} | ||||
| 					{{- range $translator := $translators -}} | ||||
| 						{{- if ne $translator.ID $currentActorID -}} | ||||
| 							{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a> (Übers.)" $translator.ID $translator.Name) -}} | ||||
| 						{{- end -}} | ||||
| 					{{- end -}} | ||||
| 					{{- range $editor := $editors -}} | ||||
| 						{{- if ne $editor.ID $currentActorID -}} | ||||
| 							{{- $authorElements = append $authorElements (printf "<a href=\"/akteure/%s\" class=\"author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600\">%s</a> (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 }}: <em>{{ $title }}</em>{{ end }}{{ if $workTitle }} | ||||
| 						{{ if $title }}, {{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ end }}{{ if $workAuthorName }} | ||||
| 							<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}<em | ||||
| 							class="work-title" | ||||
| 							data-short-title="{{ $workTitle }}" | ||||
| 							{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 							>{{ $workTitle }}</em> | ||||
| 						{{ end }} | ||||
| 					{{- else -}} | ||||
| 						{{- if $title }}<em>{{ $title }}</em>{{ end }}{{ if $workTitle }} | ||||
| 						{{ if $title }}, {{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ end }}{{ if $workAuthorName }} | ||||
| 							<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}<em | ||||
| 							class="work-title" | ||||
| 							data-short-title="{{ $workTitle }}" | ||||
| 							{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 							>{{ $workTitle }}</em> | ||||
| 						{{ end }} | ||||
| 					{{- end -}}{{ Safe $placeTag }} | ||||
| 				{{- else -}} | ||||
| 					{{ Safe $fortsPrefix }}{{ if $title }}<em>{{ $title }}</em>{{ end }}{{ if $workTitle }} | ||||
| 					{{ if $title }}, {{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ end }}{{ if $workAuthorName }} | ||||
| 						<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}<em | ||||
| 						class="work-title" | ||||
| 						data-short-title="{{ $workTitle }}" | ||||
| 						{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 						>{{ $workTitle }}</em> | ||||
| 					{{ end }}{{ Safe $placeTag }} | ||||
| 				{{- end -}} | ||||
| 			{{- else -}} | ||||
| 				{{ Safe $fortsPrefix }}{{ if $title }}<em>{{ $title }}</em>{{ end }}{{ if $workTitle }} | ||||
| 					{{ if $title }}, {{ if $categoryFlags.Uebersetzung }}Übersetzung aus:{{ else }}Auszug aus:{{ end }} {{ end }}{{ if $workAuthorName }} | ||||
| 						<a href="/akteure/{{ $workAuthorID }}" class="author-link text-slate-700 hover:text-slate-900 underline decoration-slate-400 hover:decoration-slate-600">{{ $workAuthorName }}</a>, {{ end }}<em | ||||
| 						class="work-title" | ||||
| 						data-short-title="{{ $workTitle }}" | ||||
| 						{{ if $workTitleFull }}data-full-title="{{ $workTitleFull }}"{{ end }} | ||||
| 						>{{ $workTitle }}</em> | ||||
| 				{{ else if not $title }} | ||||
| 					Beitrag ohne Titel | ||||
| 				{{ end }}{{ Safe $placeTag }} | ||||
| 			{{- end -}} | ||||
| 		{{- end -}} | ||||
|  | ||||
| 	{{- end -}} | ||||
| </div> | ||||
|  | ||||
| {{- if eq $displayMode "issue" -}} | ||||
| 	{{- /* Only show annotations for issue view and non-continuation pieces */ -}} | ||||
| 	{{- if not $isContinuation -}} | ||||
| 		{{- range $annotation := $piece.AnnotationNote.Annotations -}} | ||||
| 			<div class="italic text-sm mt-0.5 text-slate-600"> | ||||
| 				{{ Safe $annotation.HTML }} | ||||
| 			</div> | ||||
| 		{{- end -}} | ||||
| 	{{- end -}} | ||||
| {{- end -}} | ||||
| @@ -60,7 +60,7 @@ | ||||
| 							<div> | ||||
| 								<div class="pb-1 text-lg indent-4"> | ||||
| 									{{- /* Use first piece for display text with colon format for places */ -}} | ||||
| 									{{ template "_piece_summary_for_place" (dict "Piece" (index $groupedItems 0) "CurrentActorID" "") }} | ||||
| 									{{ template "_unified_piece_entry" (dict "Piece" (index $groupedItems 0) "CurrentActorID" "" "DisplayMode" "place" "ShowPlaceTags" false "UseColonFormat" true "ShowContinuation" false) }} | ||||
|  | ||||
| 									{{- /* Show all citations from all pieces in this group inline with commas */ -}} | ||||
| 									{{ " " }}{{- range $groupIndex, $groupItem := $groupedItems -}} | ||||
|   | ||||
| @@ -19,7 +19,7 @@ | ||||
| 					<!-- Actual piece content description (larger) --> | ||||
| 					<div class="mb-3"> | ||||
| 						<div class="text-base font-semibold text-slate-800 leading-snug"> | ||||
| 							{{ template "_inhaltsverzeichnis_eintrag" $firstPiece.PieceByIssue }} | ||||
| 							{{ template "_unified_piece_entry" (dict "Piece" $firstPiece.PieceByIssue "DisplayMode" "piece" "ShowPlaceTags" true "UseColonFormat" false "ShowContinuation" true) }} | ||||
| 						</div> | ||||
| 					</div> | ||||
| 				{{ end }} | ||||
| @@ -88,7 +88,7 @@ | ||||
| 										{{ range $otherPiece := $pageEntry.OtherPieces }} | ||||
| 											<div class="inhalts-entry py-1 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200" | ||||
| 												 data-page="{{ $pageEntry.PageNumber }}"> | ||||
| 												{{ template "_inhaltsverzeichnis_eintrag" $otherPiece.PieceByIssue }} | ||||
| 												{{ template "_unified_piece_entry" (dict "Piece" $otherPiece.PieceByIssue "DisplayMode" "piece" "ShowPlaceTags" true "UseColonFormat" false "ShowContinuation" true) }} | ||||
| 											</div> | ||||
| 										{{ end }} | ||||
| 									{{ else }} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens