consolidated page data

This commit is contained in:
Simon Martens
2026-01-14 16:30:03 +01:00
parent f716eb5547
commit ca2df2da8a
40 changed files with 863 additions and 1597 deletions

View File

@@ -18,30 +18,42 @@ func (i *Image) Title() string {
return i.GetString(TITLE_FIELD)
}
func (i *Image) SetTitle(title string) {
i.Set(TITLE_FIELD, title)
}
func (i *Image) Description() string {
return i.GetString(DESCRIPTION_FIELD)
}
func (i *Image) SetDescription(description string) {
i.Set(DESCRIPTION_FIELD, description)
}
func (i *Image) Preview() string {
return i.GetString(PREVIEW_FIELD)
}
func (i *Image) SetPreview(preview string) {
i.Set(PREVIEW_FIELD, preview)
}
func (i *Image) ImageFile() string {
func (i *Image) Image() string {
return i.GetString(IMAGE_FIELD)
}
func (i *Image) SetImageFile(image string) {
i.Set(IMAGE_FIELD, image)
func (i *Image) PreviewPath() string {
preview := i.Preview()
if preview == "" {
return ""
}
return "/api/files/" + IMAGES_TABLE + "/" + i.Id + "/" + preview
}
func (i *Image) ImagePath() string {
image := i.Image()
if image == "" {
return ""
}
return "/api/files/" + IMAGES_TABLE + "/" + i.Id + "/" + image
}
func (i *Image) BildPath() string {
return i.ImagePath()
}
func (i *Image) VorschauPath() string {
return i.PreviewPath()
}
func (i *Image) Beschreibung() string {
return i.Description()
}