diff options
Diffstat (limited to 'examples/docker/admin/cmd/ponzu/templates')
10 files changed, 0 insertions, 79 deletions
diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-checkbox.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-checkbox.tmpl deleted file mode 100644 index 23713dc..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-checkbox.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -View: editor.Checkbox("{{ .Name }}", {{ .Initial }}, map[string]string{ - "label": "{{ .Name }}", -}, map[string]string{ - // "value": "Display Name", -}),
\ No newline at end of file diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-content.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-content.tmpl deleted file mode 100644 index 2d92b88..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-content.tmpl +++ /dev/null @@ -1,39 +0,0 @@ -package content - -import ( - "fmt" - - "github.com/ponzu-cms/ponzu/management/editor" - "github.com/ponzu-cms/ponzu/system/item" -) - -type {{ .Name }} struct { - item.Item - - {{ range .Fields }}{{ .Name }} {{ .TypeName }} `json:"{{ .JSONName }}"` - {{ end }} -} - -// MarshalEditor writes a buffer of html to edit a {{ .Name }} within the CMS -// and implements editor.Editable -func ({{ .Initial }} *{{ .Name }}) MarshalEditor() ([]byte, error) { - view, err := editor.Form({{ .Initial }}, - // Take note that the first argument to these Input-like functions - // is the string version of each {{ .Name }} field, and must follow - // this pattern for auto-decoding and auto-encoding reasons: - {{ range .Fields }}editor.Field{ - {{ .View }} - }, - {{ end }} - ) - - if err != nil { - return nil, fmt.Errorf("Failed to render {{ .Name }} editor view: %s", err.Error()) - } - - return view, nil -} - -func init() { - item.Types["{{ .Name }}"] = func() interface{} { return new({{ .Name }}) } -}
\ No newline at end of file diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-custom.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-custom.tmpl deleted file mode 100644 index 6079f8b..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-custom.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -View: []byte(` - <div class="input-field col s12"> - <label class="active">{{ .Name }}</label> - <!-- Add your custom editor field view here. --> - </div> - `),
\ No newline at end of file diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-file.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-file.tmpl deleted file mode 100644 index 7bcaa4c..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-file.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -View: editor.File("{{ .Name }}", {{ .Initial }}, map[string]string{ - "label": "{{ .Name }}", - "placeholder": "Upload the {{ .Name }} here", -}),
\ No newline at end of file diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-hidden.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-hidden.tmpl deleted file mode 100644 index 4b00456..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-hidden.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -View: editor.Input("{{ .Name }}", {{ .Initial }}, map[string]string{ - "type": "hidden", -}),
\ No newline at end of file diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-input.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-input.tmpl deleted file mode 100644 index 8bea12a..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-input.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -View: editor.Input("{{ .Name }}", {{ .Initial }}, map[string]string{ - "label": "{{ .Name }}", - "type": "text", - "placeholder": "Enter the {{ .Name }} here", -}),
\ No newline at end of file diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-richtext.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-richtext.tmpl deleted file mode 100644 index c7ec18c..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-richtext.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -View: editor.Richtext("{{ .Name }}", {{ .Initial }}, map[string]string{ - "label": "{{ .Name }}", - "placeholder": "Enter the {{ .Name }} here", -}),
\ No newline at end of file diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-select.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-select.tmpl deleted file mode 100644 index 509eb30..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-select.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -View: editor.Select("{{ .Name }}", {{ .Initial }}, map[string]string{ - "label": "{{ .Name }}", -}, map[string]string{ - // "value": "Display Name", -}),
\ No newline at end of file diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-tags.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-tags.tmpl deleted file mode 100644 index ca92c94..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-tags.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -View: editor.Tags("{{ .Name }}", {{ .Initial }}, map[string]string{ - "label": "{{ .Name }}", - "placeholder": "+{{ .Name }}", -}),
\ No newline at end of file diff --git a/examples/docker/admin/cmd/ponzu/templates/gen-textarea.tmpl b/examples/docker/admin/cmd/ponzu/templates/gen-textarea.tmpl deleted file mode 100644 index af3dad8..0000000 --- a/examples/docker/admin/cmd/ponzu/templates/gen-textarea.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -View: editor.Textarea("{{ .Name }}", {{ .Initial }}, map[string]string{ - "label": "{{ .Name }}", - "placeholder": "Enter the {{ .Name }} here", -}),
\ No newline at end of file |