package put import "github.com/tigorlazuardi/redmage/views" import "github.com/tigorlazuardi/redmage/views/components" type Data struct { Title string EditMode bool PostAction string NameInput NameInputData TypeInput TypeInputData ScheduleInput ScheduleInputData CountbackInput CountbackInputData } templ View(c *views.Context, data Data) { @components.Doctype() { @components.Head(c, components.HeadTitle(data.Title)) @components.Body(c) { @Content(c, data) @components.NotificationContainer() } } } templ Content(c *views.Context, data Data) {
@components.Container() {

{ data.Title }

if !data.EditMode { @NameInput(data.NameInput) } if !data.EditMode { @TypeInput(data.TypeInput) }
@ScheduleInput(data.ScheduleInput)
@CountbackInput(data.CountbackInput)
if !data.EditMode {
@FetchCheckbox()
}
}
}