From 7bf2234daf6086504836d25d13b27b37e6f12b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Sun, 2 Apr 2023 13:33:33 +0200 Subject: [PATCH] Add tmp. page layout buttons --- server/compose/types/page_layout.go | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/server/compose/types/page_layout.go b/server/compose/types/page_layout.go index ac24f198f..9c1ee2245 100644 --- a/server/compose/types/page_layout.go +++ b/server/compose/types/page_layout.go @@ -51,13 +51,28 @@ type ( } PageLayoutButton struct { - Label string `json:"label"` - Enabled bool `json:"enabled"` + Enabled bool `json:"enabled"` + + // Warning: value of this field is now handled via resource-translation facility + // struct field is kept for the convenience for now since it allows us + // easy encoding/decoding of the outgoing/incoming values + Label string `json:"label"` + } + + PageLayoutButtonConfig struct { + New PageLayoutButton `json:"new"` + Edit PageLayoutButton `json:"edit"` + Submit PageLayoutButton `json:"submit"` + Delete PageLayoutButton `json:"delete"` + Clone PageLayoutButton `json:"clone"` + Back PageLayoutButton `json:"back"` } PageLayoutConfig struct { Visibility PageLayoutVisibility `json:"visibility"` - Actions []PageLayoutAction `json:"actions"` + + Buttons *PageLayoutButtonConfig `json:"buttons"` + Actions []PageLayoutAction `json:"actions"` } PageLayoutVisibility struct {