oef/templates/categories.html.tpl

34 lines
817 B
Smarty
Raw Permalink Normal View History

2019-12-09 08:27:46 +01:00
{{ define "content" }}
<div class="container">
{{$options := `
title: "Categories"
buttonTitle: "Crea nuovo Category"
`}}
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Category")}}
{{template "search_input"}}
{{if not .}}
{{template "display_no_elements"}}
{{else}}
<div class="list-group" id="myUL">
{{range $element := .Data}}
<a class="list-group-item list-group-item-action" href={{$element.ID|show "Category"}}>
<span class="fa fa-user"></span>
{{$element|string}}
<div class="text-right">
{{$options := `noElements: "no subelements"`}}
{{/*template "small" dict "options" ($options | yaml) "data" $element.SubElements*/}}
</div>
</a>
{{end}}
{{end}}
</div>
</div>
{{ end }}