mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-28 16:45:32 +00:00
Added akteure endpoint
This commit is contained in:
@@ -72,3 +72,7 @@ func (p Person) String() string {
|
|||||||
// Copilot: Please format and return all fields of the struct
|
// Copilot: Please format and return all fields of the struct
|
||||||
return fmt.Sprintf("Person{KGPZID: %v, URL: %v, DateOfDeath: %v, PlaceOfDeath: %v, BiographicalOrHistoricalInformation: %v, PreferredName: %v, GndIdentifier: %v, Wikipedia: %v, Depiction: %v, ProfessionOrOccupation: %v, PreferredNameEntityForThePerson: %v, DateOfBirth: %v, PlaceOfBirth: %v, VariantNameEntityForThePerson: %v, VariantName: %v, SameAs: %v}", p.KGPZID, p.URL, p.DateOfDeath, p.PlaceOfDeath, p.BiographicalOrHistoricalInformation, p.PreferredName, p.GndIdentifier, p.Wikipedia, p.Depiction, p.ProfessionOrOccupation, p.PreferredNameEntityForThePerson, p.DateOfBirth, p.PlaceOfBirth, p.VariantNameEntityForThePerson, p.VariantName, p.SameAs)
|
return fmt.Sprintf("Person{KGPZID: %v, URL: %v, DateOfDeath: %v, PlaceOfDeath: %v, BiographicalOrHistoricalInformation: %v, PreferredName: %v, GndIdentifier: %v, Wikipedia: %v, Depiction: %v, ProfessionOrOccupation: %v, PreferredNameEntityForThePerson: %v, DateOfBirth: %v, PlaceOfBirth: %v, VariantNameEntityForThePerson: %v, VariantName: %v, SameAs: %v}", p.KGPZID, p.URL, p.DateOfDeath, p.PlaceOfDeath, p.BiographicalOrHistoricalInformation, p.PreferredName, p.GndIdentifier, p.Wikipedia, p.Depiction, p.ProfessionOrOccupation, p.PreferredNameEntityForThePerson, p.DateOfBirth, p.PlaceOfBirth, p.VariantNameEntityForThePerson, p.VariantName, p.SameAs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p Person) Name() string {
|
||||||
|
return p.PreferredName
|
||||||
|
}
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ func AgentsView(letterorid string, lib *xmlprovider.Library) *AgentsListView {
|
|||||||
if ref, ok := w.ReferencesAgent(letterorid); ok {
|
if ref, ok := w.ReferencesAgent(letterorid); ok {
|
||||||
if entry, ok := res.Agents[ref.Ref]; ok {
|
if entry, ok := res.Agents[ref.Ref]; ok {
|
||||||
entry.Works = append(entry.Works, WorkByAgent{Work: w, Reference: *ref})
|
entry.Works = append(entry.Works, WorkByAgent{Work: w, Reference: *ref})
|
||||||
|
res.Agents[ref.Ref] = entry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,6 +73,7 @@ func AgentsView(letterorid string, lib *xmlprovider.Library) *AgentsListView {
|
|||||||
if ref, ok := p.ReferencesAgent(letterorid); ok {
|
if ref, ok := p.ReferencesAgent(letterorid); ok {
|
||||||
if entry, ok := res.Agents[ref.Ref]; ok {
|
if entry, ok := res.Agents[ref.Ref]; ok {
|
||||||
entry.Pieces = append(entry.Pieces, PieceByAgent{Piece: p, Reference: *ref})
|
entry.Pieces = append(entry.Pieces, PieceByAgent{Piece: p, Reference: *ref})
|
||||||
|
res.Agents[ref.Ref] = entry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
views/assets/GND.png
Normal file
BIN
views/assets/GND.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div>Übersicht nach</div>
|
<div>Übersicht nach</div>
|
||||||
<a href="/">Jahrgängen</a>
|
<a href="/">Jahrgängen</a>
|
||||||
<a href="/akteure/">Personen</a>
|
<a href="/akteure/a">Personen</a>
|
||||||
<a href="/kategorie/">Betragsarten</a>
|
<a href="/kategorie/">Betragsarten</a>
|
||||||
<a href="/ort/">Orten</a>
|
<a href="/ort/">Orten</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
BIN
views/public/GND.png
Normal file
BIN
views/public/GND.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
@@ -22,37 +22,70 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ range $_, $id := .model.Sorted }}
|
{{ range $_, $id := .model.Sorted }}
|
||||||
<div class="pb-4">
|
{{ $a := index $.model.Agents $id }}
|
||||||
<a href="/akteure/{{ $id }}">
|
{{ if and $a (ne (len $a.Names) 0) }}
|
||||||
{{ $a := index $.model.Agents $id }}
|
<div class="pb-4">
|
||||||
{{ index $a.Names 0 }}
|
{{ index $a.Names 0 }}
|
||||||
</a>
|
<div>
|
||||||
<div>
|
{{ $gnd := GetGND $a.GND }}
|
||||||
{{ $gnd := GetGND $a.GND }}
|
{{ if (ne $gnd nil) }}
|
||||||
{{ if and (ne $gnd nil) (ne $gnd.DateOfBirth nil) }}
|
{{- if ne (len $gnd.DateOfBirth) 0 -}}
|
||||||
{{- if ne (len $gnd.DateOfBirth) 0 -}}
|
<i class="ri-asterisk text-xs relative bottom-0.5"></i>
|
||||||
<i class="ri-asterisk text-xs relative bottom-0.5"></i>
|
{{- HRDateShort (index $gnd.DateOfBirth 0) -}}
|
||||||
{{- HRDateShort (index $gnd.DateOfBirth 0) -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- if ne (len $gnd.DateOfDeath) 0 }}
|
||||||
{{- if ne (len $gnd.DateOfDeath) 0 }}
|
 <i class="ri-cross-fill text-xs relative bottom-0.5"></i
|
||||||
 <i class="ri-cross-fill text-xs relative bottom-0.5"></i
|
> {{ HRDateShort (index $gnd.DateOfDeath 0) }}
|
||||||
> {{ HRDateShort (index $gnd.DateOfDeath 0) }}
|
{{ end }}
|
||||||
|
{{- if ne (len $gnd.ProfessionOrOccupation) 0 -}}
|
||||||
|
<div>
|
||||||
|
{{- (index $gnd.ProfessionOrOccupation 0).Label -}}
|
||||||
|
{{- if gt (len $gnd.ProfessionOrOccupation) 1 -}}
|
||||||
|
,
|
||||||
|
{{ (index $gnd.ProfessionOrOccupation 1).Label -}}
|
||||||
|
{{ end -}}
|
||||||
|
{{- if gt (len $gnd.ProfessionOrOccupation) 2 -}}
|
||||||
|
,
|
||||||
|
{{ (index $gnd.ProfessionOrOccupation 2).Label -}}
|
||||||
|
{{ end -}}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- if ne (len $gnd.ProfessionOrOccupation) 0 -}}
|
<div class="flex gap-x-2 flex-row">
|
||||||
<div>
|
<a href="/akteure/{{ $id }}" class="!no-underline"><i class="ri-links-line"></i></a>
|
||||||
{{- (index $gnd.ProfessionOrOccupation 0).Label -}}
|
{{- if ne $gnd nil -}}
|
||||||
{{- if gt (len $gnd.ProfessionOrOccupation) 1 -}}
|
<a href="{{ $a.GND }}" target="_blank">GND →</a>
|
||||||
,
|
{{- if ne (len $gnd.Wikipedia) 0 -}}
|
||||||
{{ (index $gnd.ProfessionOrOccupation 1).Label -}}
|
<a href="{{ (index $gnd.Wikipedia 0).Label }}" target="_blank">WIKI →</a>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{- if gt (len $gnd.ProfessionOrOccupation) 2 -}}
|
{{ end }}
|
||||||
,
|
|
||||||
{{ (index $gnd.ProfessionOrOccupation 2).Label -}}
|
</div>
|
||||||
{{ end -}}
|
</div>
|
||||||
</div>
|
{{- if ne (len $a.Works) 0 -}}
|
||||||
{{ end }}
|
<div>
|
||||||
|
{{ range $_, $w := $a.Works }}
|
||||||
|
{{- if ne (len $w.Citation.InnerXML ) 0 -}}
|
||||||
|
<div>
|
||||||
|
{{- $w.Citation.InnerXML -}}
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- if ne (len $a.Pieces) 0 -}}
|
||||||
|
<div>
|
||||||
|
{{ range $_, $p := $a.Pieces }}
|
||||||
|
{{- range $_, $i := $p.IssueRefs -}}
|
||||||
|
<div>
|
||||||
|
<a href="/{{ $i.When }}/{{ $i.Nr }}">{{ $i.Nr }}/{{ $i.When }}</a>
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user