{{ define "content" }}
{{$options := ` title: "Dipartimenti" buttonTitle: "Crea nuovo dipartimento" `}} {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "department")}} {{template "search_input"}} {{if not .}} {{template "display_no_elements"}} {{else}}
{{range $department := .Data}} {{$department.Name}}
{{$options := `noElements: "no coordinatore"`}} {{template "small" dict "options" ($options | yaml) "data" $department.Coordinator}} {{$options := `noElements: "no materie"`}} {{template "small" dict "options" ($options | yaml) "data" $department.Subjects}}
{{end}} {{end}}
{{ end }}