Added history tab to nearly all editable objects

This commit is contained in:
2018-03-13 17:59:16 +01:00
parent b3257e78b6
commit 12de621214
12 changed files with 138 additions and 10 deletions

View File

@ -26,7 +26,7 @@ func Render(obj interface{}, title string, user *arn.User) string {
b.WriteString(`<div class="widget" data-api="` + endpoint + `">`)
// Title
b.WriteString(`<h1>`)
b.WriteString(`<h1 class="mountable">`)
b.WriteString(title)
b.WriteString(`</h1>`)
@ -84,6 +84,9 @@ func RenderField(b *bytes.Buffer, v *reflect.Value, field reflect.StructField, i
return
}
b.WriteString("<div class='mountable'>")
defer b.WriteString("</div>")
fieldValue := reflect.Indirect(v.FieldByName(field.Name))
fieldType := field.Type.String()