{{ define "content" }}

<div class="container">  

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

</div>

{{ end }}


