{{- $content := index . "content" -}} {{- $entry := index . "entry" -}} {{- $csrf := index . "csrf_token" -}} {{- $contentTypes := index . "content_types" -}} {{- $musenalmTypes := index . "musenalm_types" -}} {{- $paginationValues := index . "pagination_values" -}} {{- $agents := index . "agents" -}} {{- $contentAgents := index . "content_agents" -}} {{- $agentRelations := index . "agent_relations" -}} {{- $overrideID := index . "content_id" -}} {{- $openEdit := index . "open_edit" -}} {{- $isNew := index . "is_new" -}} {{- $error := index . "error" -}} {{- $contentID := $content.Id -}} {{- if and $overrideID (ne $overrideID "") -}} {{- $contentID = $overrideID -}} {{- end -}} {{- $editContainerID := printf "content-%s-edit-container" $contentID -}}
{{- if $content.MusenalmType -}} {{- range $i, $t := $content.MusenalmType -}} {{- $t -}} {{- end -}} {{- end -}}
{{- if eq $content.EditState "Edited" -}}Erfasst{{- else if eq $content.EditState "Review" -}}Überprüfen{{- else if eq $content.EditState "ToDo" -}}Zu erledigen{{- else if eq $content.EditState "Seen" -}}Autopsiert{{- else -}}Unbekannt{{- end -}}
{{- if $content.Extent -}}
Seite
{{- $content.Extent -}}
{{- end -}} {{- if $content.TitleStmt -}}
Titel
{{- $content.TitleStmt -}}
{{- end -}} {{- if $content.IncipitStmt -}}
Incipit
{{ $content.IncipitStmt }}…
{{- end -}} {{- if $content.ResponsibilityStmt -}}
Autorangabe
{{- $content.ResponsibilityStmt -}}
{{- end -}} {{- if $contentAgents -}}
Personen
{{- range $_, $rel := $contentAgents -}} {{- $agent := index $agents $rel.Agent -}} {{- if $agent -}}
{{- $agent.Name -}} {{- if $agent.BiographicalData -}} ({{ $agent.BiographicalData }}) {{- end -}}
{{- end -}} {{- end -}}
{{- end -}} {{- if $content.Annotation -}} {{- $link := printf "%s%s" "/almanach/" $entry.MusenalmIDString -}}
Anmerkung
{{- Safe (LinksAnnotation (ReplaceSlashParen $content.Annotation) $link) -}}
{{- end -}}
{{- if $openEdit -}} {{- template "_content_edit_form" (Dict "content" $content "content_id" $contentID "entry" $entry "csrf_token" $csrf "content_types" $contentTypes "musenalm_types" $musenalmTypes "pagination_values" $paginationValues "agents" $agents "content_agents" $contentAgents "agent_relations" $agentRelations "error" $error ) -}} {{- end -}}