{{ define "content" }}
{{$options := ` title: "Docenti" buttonTitle: "Crea nuovo docente" `}} {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "teacher")}} {{template "search_input"}} {{if not .}} {{template "display_no_elements"}} {{else}}
{{range $teacher := .Data}} {{$teacher.Surname}} {{$teacher.Name}}
{{$options := `noElements: "no classi"`}} {{template "small" dict "options" ($options | yaml) "data" $teacher.Classes}} {{$options := `noElements: "no materie"`}} {{template "small" dict "options" ($options | yaml) "data" $teacher.Subjects}}
{{end}} {{end}}
{{ end }}