mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 17:25:32 +00:00
Allerhand Kleinigkeiten; Einzelansichten Reihen u Personen; Bandansicht
This commit is contained in:
@@ -1,25 +1,54 @@
|
||||
{{/* .result:
|
||||
type AgentResult struct {
|
||||
Agent *dbmodels.Agent
|
||||
|
||||
BResult []*dbmodels.Series // Sorted
|
||||
Entries map[string]*dbmodels.Entry // KEY: Entry ID
|
||||
EntriesSeries map[string][]*dbmodels.REntriesSeries // KEY: Series ID
|
||||
EntriesAgents map[string][]*dbmodels.REntriesAgents // KEY: Entry ID
|
||||
|
||||
CResult []*dbmodels.Entry /// Sorted
|
||||
Contents map[string][]*dbmodels.Content // KEY: entry ID
|
||||
ContentsAgents map[string][]*dbmodels.RContentsAgents // KEY: Content ID
|
||||
}
|
||||
*/}}
|
||||
|
||||
{{ $model := . }}
|
||||
|
||||
|
||||
<div class="container-normal font-serif">
|
||||
{{ if $model.a.CorporateBody }}
|
||||
<div class="notifier font-sans">
|
||||
<div id="breadcrumbs">
|
||||
<div>
|
||||
<div>
|
||||
Personen und Körperschaften <i class="ri-arrow-right-wide-line"></i> Einzelansicht
|
||||
<i class="ri-arrow-right-wide-line"></i> <b>{{ $model.result.Agent.Name }}</b>
|
||||
</div>
|
||||
<div class="backbutton">
|
||||
<a href="/personen/" class="no-underline">
|
||||
<i class="ri-arrow-left-long-line"></i> Alle Personen & Körperschaften
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-normal font-serif mt-12">
|
||||
{{ if $model.result.Agent.CorporateBody }}
|
||||
<div class="font-sans">
|
||||
<i class="ri-team-line"></i>
|
||||
<span class="filtercategory">Verlag, Druckerei oder Vertrieb</span>
|
||||
<span class="filtercategory">Körperschaft</span>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="notifier font-sans">
|
||||
<div class="font-sans">
|
||||
<i class="ri-user-line"></i>
|
||||
<span class="filtercategory">Person</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
<h1 class="text-3xl font-bold">{{ $model.a.Name }}</h1>
|
||||
<h1 class="text-3xl font-bold">{{ $model.result.Agent.Name }}</h1>
|
||||
<div>
|
||||
<span class="">
|
||||
{{ $model.a.BiographicalData }}
|
||||
{{ $model.result.Agent.BiographicalData }}
|
||||
</span>
|
||||
<span class="">
|
||||
{{- $arr := $model.a.ProfessionArray -}}
|
||||
{{- $arr := $model.result.Agent.ProfessionArray -}}
|
||||
{{- if $arr -}}
|
||||
{{- range $i, $p := $arr -}}
|
||||
<div
|
||||
@@ -32,10 +61,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ if .entries }}
|
||||
{{- if .result.BResult -}}
|
||||
<div class="container-normal flex flex-col font-serif mt-7 gap-y-6">
|
||||
<h2>Bände nach Reihentiteln</h2>
|
||||
{{ range $id, $r := .series }}
|
||||
<h2 class="font-bold">
|
||||
<i class="ri-information-2-line"></i>
|
||||
{{ if eq $model.result.LenEntries 1 }}
|
||||
Ein Band
|
||||
{{- else }}
|
||||
{{- $model.result.LenEntries }}
|
||||
Bände
|
||||
{{- end }}
|
||||
in
|
||||
{{- if eq $model.result.LenSeries 1 }}
|
||||
einer Reihe
|
||||
{{- else }}
|
||||
{{ $model.result.LenSeries }} Reihen
|
||||
{{- end }}
|
||||
gefunden:
|
||||
</h2>
|
||||
{{ range $id, $r := .result.BResult }}
|
||||
<div class="grow-0 max-w-[48rem]">
|
||||
<div>
|
||||
<span class="font-bold">{{ $r.Title }}</span>
|
||||
@@ -46,14 +90,18 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="">
|
||||
{{- $bds := index $model.relations $r.Id -}}
|
||||
{{ template "reiherelations" (Arr $r $bds $model.entries true $model.relations) }}
|
||||
{{- $bds := index $model.result.EntriesSeries $r.Id -}}
|
||||
{{ template "personreiherelations" (Arr $r $bds $model.result.Entries true
|
||||
$model.result.EntriesAgents)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!--
|
||||
{{ if .contents }}
|
||||
<h2>Inhalte</h2>
|
||||
{{ range $id, $c := .contents }}
|
||||
@@ -65,3 +113,4 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
-->
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
{{ $reihe := index . 0 }}
|
||||
{{ $rels := index . 1 }}
|
||||
{{ $entries := index . 2 }}
|
||||
{{ $shownos := index . 3 }}
|
||||
|
||||
{{- if $rels -}}
|
||||
<div class="reiherelations flex flex-col text-base font-sans w-full pt-1 -ml-3">
|
||||
{{- range $_, $rel := $rels -}}
|
||||
{{- $bd := index $entries $rel.Entry -}}
|
||||
|
||||
{{- if $bd -}}
|
||||
<div class="flex flex-row odd:bg-zinc-100 px-3 py-0.5 justify-between w-full">
|
||||
<a href="/almanach/{{ $bd.MusenalmID }}" class="no-underline">
|
||||
<div class="">
|
||||
{{- if $bd.PreferredTitle -}}
|
||||
{{ $bd.PreferredTitle }}
|
||||
{{- else if ne $bd.Year 0 -}}
|
||||
{{- $bd.Year -}}
|
||||
{{- else -}}
|
||||
[o.J.]
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- if not (eq $rel.Type "Bevorzugter Reihentitel") -}}
|
||||
<div class="text-xs whitespace-nowrap">
|
||||
{{- if eq $rel.Type "Früherer Reihentitel" -}}
|
||||
Titelauflage aus einer anderen Reihe
|
||||
{{- else if eq $rel.Type "Späterer Reihentitel" -}}
|
||||
Titelauflage
|
||||
{{- else if eq $rel.Type "In anderer Sprache" -}}
|
||||
{{- if Contains $bd.Language "ger" -}}
|
||||
In deutscher Sprache
|
||||
{{- else -}}
|
||||
In französischer Sprache
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ $rel.Type }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</a>
|
||||
<div class="whitespace-nowrap align-top">
|
||||
Alm
|
||||
{{ $bd.MusenalmID }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,4 @@
|
||||
<title>
|
||||
{{ .site.title }} –
|
||||
{{ if .result -}}{{ .result.Agent.Name }}{{ else -}}Einzelpersonenansicht{{- end -}}
|
||||
</title>
|
||||
|
||||
70
views/routes/person/personreiherelations.gohtml
Normal file
70
views/routes/person/personreiherelations.gohtml
Normal file
@@ -0,0 +1,70 @@
|
||||
{{ $reihe := index . 0 }}
|
||||
{{ $rels := index . 1 }}
|
||||
{{ $entries := index . 2 }}
|
||||
{{ $shownos := index . 3 }}
|
||||
{{ $relations := index . 4 }}
|
||||
|
||||
{{- if $rels -}}
|
||||
<div class="reiherelations flex flex-col text-base font-sans w-full pt-1 -ml-3">
|
||||
{{- range $_, $rel := $rels -}}
|
||||
{{- $bd := index $entries $rel.Entry -}}
|
||||
{{- $arels := index $relations $rel.Entry -}}
|
||||
|
||||
{{- if $bd -}}
|
||||
<div class="flex flex-row odd:bg-zinc-100 pr-3 py-0.5 w-full items-start">
|
||||
{{- if $arels -}}
|
||||
<div class="min-w-32">
|
||||
{{- range $i, $arel := $arels -}}
|
||||
<div
|
||||
class="inline font-bold text-sm font-sans bg-slate-200 pl-2 pr-3 py-0.5
|
||||
rounded-r-full mr-1.5 ">
|
||||
{{- $arel.Type -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
<div>
|
||||
<a
|
||||
href="/almanach/{{ $bd.MusenalmID }}"
|
||||
class="no-underline {{ if eq
|
||||
$bd.EditState "Edited"
|
||||
-}}
|
||||
font-bold
|
||||
{{- end -}}">
|
||||
{{- if $bd.PreferredTitle -}}
|
||||
{{ $bd.PreferredTitle }}
|
||||
{{- else if ne $bd.Year 0 -}}
|
||||
{{- $bd.Year -}}
|
||||
{{- else -}}
|
||||
[o.J.]
|
||||
{{- end -}}
|
||||
{{- if not (eq $rel.Type "Bevorzugter Reihentitel") -}}
|
||||
<div class="text-xs whitespace-nowrap">
|
||||
{{- if eq $rel.Type "Früherer Reihentitel" -}}
|
||||
Titelauflage aus einer anderen Reihe
|
||||
{{- else if eq $rel.Type "Späterer Reihentitel" -}}
|
||||
Titelauflage
|
||||
{{- else if eq $rel.Type "In anderer Sprache" -}}
|
||||
{{- if Contains $bd.Language "ger" -}}
|
||||
In deutscher Sprache
|
||||
{{- else -}}
|
||||
In französischer Sprache
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ $rel.Type }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="whitespace-nowrap align-top grow text-right">
|
||||
Alm
|
||||
{{ $bd.MusenalmID }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
</div>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user