transmet/templates/pages/categories.html

27 lines
630 B
HTML
Raw Normal View History

{{define "body"}}
<h2 class="form-categories-heading">Categories</h2>
{{template "flashes" .}}
<div class="row">
{{range $category := .categories}}
{{template "row-category" $category}}
{{end}}
</div>
{{end}}
{{define "row-category"}}
{{if .Parent.Valid }}
{{with .Depth}}
<div class="col-xs-{{.}} child-depth"></div>
<div class="col-xs-{{minus 12 .}} category-row">
{{end}}
{{else}}
<div class="col-xs-12 category-row">
{{end}}
{{.Name}}</div>
{{range $child := .Children}}
{{template "row-category" $child}}
{{end}}
{{end}}