mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 09:15:33 +00:00
Single person page + reihen list
This commit is contained in:
@@ -48,7 +48,7 @@ func (p *AlmanachPage) Setup(router *router.Router[*core.RequestEvent], app core
|
||||
}
|
||||
|
||||
data["srelations"] = srelations
|
||||
data["series"] = s
|
||||
data["series"] = series
|
||||
|
||||
places, err := dbmodels.PlacesForEntry(app, entry)
|
||||
if err != nil {
|
||||
@@ -80,12 +80,27 @@ func (p *AlmanachPage) Setup(router *router.Router[*core.RequestEvent], app core
|
||||
}
|
||||
data["agents"] = agents
|
||||
|
||||
err = p.getAbbr(app, data)
|
||||
if err != nil {
|
||||
return engine.Response404(e, err, data)
|
||||
}
|
||||
|
||||
return p.Get(e, engine, data)
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *AlmanachPage) getAbbr(app core.App, data map[string]interface{}) error {
|
||||
abbrs, err := pagemodels.GetAbks(app)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
data["abbrs"] = abbrs
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *AlmanachPage) Get(request *core.RequestEvent, engine *templating.Engine, data map[string]interface{}) error {
|
||||
return engine.Response200(request, TEMPLATE_ALMANACH, data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user