mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
Some refinements; anonymous authors
This commit is contained in:
@@ -31,6 +31,20 @@ func GetAgents(kgpz *xmlmodels.Library) fiber.Handler {
|
||||
)
|
||||
}
|
||||
|
||||
// Handle special "anonym" route
|
||||
if a == "anonym" {
|
||||
anonymAgent := viewmodels.AnonymView(kgpz)
|
||||
return c.Render(
|
||||
"/akteure/",
|
||||
fiber.Map{"model": &viewmodels.AgentsListView{
|
||||
Search: "anonym",
|
||||
AvailableLetters: []string{},
|
||||
Agents: map[string]xmlmodels.Agent{"anonym": *anonymAgent},
|
||||
Sorted: []string{"anonym"},
|
||||
}},
|
||||
)
|
||||
}
|
||||
|
||||
// Handle normal letter/id lookup
|
||||
agents := viewmodels.AgentsView(a, kgpz)
|
||||
if len(agents.Agents) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user