Some refinements; anonymous authors

This commit is contained in:
Simon Martens
2025-09-22 21:03:27 +02:00
parent f8d7b92be0
commit 9268402ebf
16 changed files with 177 additions and 428 deletions

View File

@@ -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 {