mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-12-16 12:05:30 +00:00
Fixed some search things
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
<div class="text-base font-medium text-slate-700 bg-slate-100 px-2 py-1 rounded">
|
||||
<span class="pr-1">{{ printf "%.2s" (WeekdayName $date.Weekday) }}</span>
|
||||
{{ $date.Day }}. {{ $date.MonthNameShort }}. <b>{{ $date.Year }}</b>
|
||||
<b>{{ $date.Day }}. {{ $date.MonthNameShort }} {{ $date.Year }}</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,52 @@
|
||||
<div class="mb-2 break-inside-avoid max-w-[95ch]">
|
||||
{{- if ne (len $w.Item.Citation.InnerXML ) 0 -}}
|
||||
<div class="indent-6">
|
||||
{{- /* Check person's role in this work */ -}}
|
||||
{{- /* Get other associated persons for this work */ -}}
|
||||
{{- $otherAuthors := slice -}}
|
||||
{{- $otherTranslators := slice -}}
|
||||
{{- $otherEditors := slice -}}
|
||||
{{- range $workAgentRef := $w.Item.AgentRefs -}}
|
||||
{{- if ne $workAgentRef.Ref $a.ID -}}
|
||||
{{- if or (eq $workAgentRef.Category "") (eq $workAgentRef.Category "autor") -}}
|
||||
{{- $otherAuthors = append $otherAuthors $workAgentRef.Ref -}}
|
||||
{{- else if eq $workAgentRef.Category "übersetzer" -}}
|
||||
{{- $otherTranslators = append $otherTranslators $workAgentRef.Ref -}}
|
||||
{{- else if eq $workAgentRef.Category "herausgeber" -}}
|
||||
{{- $otherEditors = append $otherEditors $workAgentRef.Ref -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Display other associated persons before the work citation */ -}}
|
||||
{{- $hasAssociatedPersons := or (gt (len $otherAuthors) 0) (gt (len $otherTranslators) 0) (gt (len $otherEditors) 0) -}}
|
||||
{{- if $hasAssociatedPersons -}}
|
||||
{{ "mit " }}
|
||||
{{- range $i, $authorID := $otherAuthors -}}
|
||||
{{- if gt $i 0 }}, {{ 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 -}}
|
||||
{{- /* Display translators with (Übers.) */ -}}
|
||||
{{- range $i, $translatorID := $otherTranslators -}}
|
||||
{{- if or (gt (len $otherAuthors) 0) (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 -}}
|
||||
{{- /* Display editors with (Hrsg.) */ -}}
|
||||
{{- range $i, $editorID := $otherEditors -}}
|
||||
{{- if or (gt (len $otherAuthors) 0) (gt (len $otherTranslators) 0) (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 -}}
|
||||
|
||||
{{- /* Check current person's role in this work for display after citation */ -}}
|
||||
{{- $personRole := "" -}}
|
||||
{{- range $workAgentRef := $w.Item.AgentRefs -}}
|
||||
{{- if eq $workAgentRef.Ref $a.ID -}}
|
||||
@@ -216,4 +261,4 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="bg-white rounded p-4 shadow-sm border border-slate-200">
|
||||
<h3 class="font-bold text-lg text-slate-800 mb-3 flex items-center gap-2">
|
||||
<i class="ri-user-line"></i>
|
||||
Personen
|
||||
<u class="decoration underline-offset-3">Personen</u>
|
||||
{{ if $model.Agents.Items }}<span class="text-sm font-normal bg-slate-100 px-2 py-0.5 rounded">{{ len $model.Agents.Items }}</span>{{ end }}
|
||||
</h3>
|
||||
{{ if $model.Agents.Items }}
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="bg-white rounded p-4 shadow-sm border border-slate-200">
|
||||
<h3 class="font-bold text-lg text-slate-800 mb-3 flex items-center gap-2">
|
||||
<i class="ri-map-pin-line"></i>
|
||||
Orte
|
||||
<u class="decoration underline-offset-3">Orte</u>
|
||||
{{ if $model.Places.Items }}<span class="text-sm font-normal bg-slate-100 px-2 py-0.5 rounded">{{ len $model.Places.Items }}</span>{{ end }}
|
||||
</h3>
|
||||
{{ if $model.Places.Items }}
|
||||
@@ -69,7 +69,7 @@
|
||||
<div class="bg-white rounded p-4 shadow-sm border border-slate-200">
|
||||
<h3 class="font-bold text-lg text-slate-800 mb-3 flex items-center gap-2">
|
||||
<i class="ri-bookmark-line"></i>
|
||||
Kategorien
|
||||
<u class="decoration underline-offset-3">Kategorien</u>
|
||||
{{ if $model.Categories.Items }}<span class="text-sm font-normal bg-slate-100 px-2 py-0.5 rounded">{{ len $model.Categories.Items }}</span>{{ end }}
|
||||
</h3>
|
||||
{{ if $model.Categories.Items }}
|
||||
@@ -91,7 +91,7 @@
|
||||
<div class="bg-white rounded p-4 shadow-sm border border-slate-200">
|
||||
<h3 class="font-bold text-lg text-slate-800 mb-3 flex items-center gap-2">
|
||||
<i class="ri-calendar-line"></i>
|
||||
Ausgaben
|
||||
<u class="decoration underline-offset-3">Ausgaben</u>
|
||||
{{ if $model.Issues.Items }}<span class="text-sm font-normal bg-slate-100 px-2 py-0.5 rounded">{{ len $model.Issues.Items }}</span>{{ end }}
|
||||
</h3>
|
||||
{{ if $model.Issues.Items }}
|
||||
|
||||
Reference in New Issue
Block a user