33 lines
1.1 KiB
Cheetah
33 lines
1.1 KiB
Cheetah
{{ define "blocks" }}
|
|
{{ if .Fields }}<div class="group">{{ end }}
|
|
{{- range $key, $value := .Fields }}
|
|
{{- if eq $value.Parent.Type "array" }}
|
|
<div id="{{ $value.Name }}-{{ $key }}" data-type="array-item">
|
|
{{- template "value" $value }}
|
|
<div class="action delete" data-delete="{{ $value.Name }}-{{ $key }}">
|
|
<i class="material-icons" title="Close">close</i>
|
|
</div>
|
|
</div>
|
|
{{- else }}
|
|
<div class="block" id="block-{{ $value.Name }}" data-content="{{ $value.Name }}">
|
|
<label for="{{ $value.Name }}">{{ $value.Title }}</label>
|
|
{{ template "value" $value }}
|
|
<div class="action delete" data-delete="block-{{ $value.Name }}">
|
|
<i class="material-icons" title="Close">close</i>
|
|
</div>
|
|
</div>
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Fields }}</div>{{ end }}
|
|
|
|
{{- range $key, $value := .Arrays }}
|
|
{{- template "fielset" $value }}
|
|
{{- end }}
|
|
|
|
{{- range $key, $value := .Objects }}
|
|
{{- template "fielset" $value }}
|
|
{{- end }}
|
|
|
|
{{ end }}
|
|
|