{{ define "content" }}

<div class="container">  

  {{$options := `
  title: "Classi"
  buttonTitle: "Crea nuova classe"
  `}}
  
  {{template "read_all_header" dict  "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "class")}}
  {{template "search_input"}}
    
  {{if not .}}
  {{template "display_no_elements"}}
  {{else}}
  <div class="list-group" id="myUL">
    {{range $class := .Data}}
    <a class="list-group-item list-group-item-action" href={{$class.ID|show "class"}}>
      <span class="fa fa-user"></span>
      {{$class.Name}}
      <div class="text-right">
        {{$options := `noElements: "no docenti"`}}
        {{template "small" dict "options" ($options | yaml) "data" $class.Teachers}}
      </div>
    </a>
    {{end}}
    {{end}}
  </div>

</div>

{{ end }}

