16 lines
412 B
Plaintext
16 lines
412 B
Plaintext
{{ define "crudDisplay"}}
|
|
{{ if not (or .IsTable .IsDisplay .IsEdit) }}
|
|
<div class="error">Invalid state: No display mode selected</div>
|
|
{{ end }}
|
|
|
|
{{ if .IsTable}}
|
|
{{ template "table" .Table }}
|
|
{{ end }}
|
|
{{ if .IsDisplay }}
|
|
{{ template "itemDisplay" .ItemDisplay }}
|
|
{{ end }}
|
|
{{ if .IsEdit }}
|
|
{{ template "editItem" .EditItem }}
|
|
{{ end }}
|
|
{{end}}
|