{{ define "content" }}

<div class="container">  

  {{$options := `
  title: "Gruppi"
  buttonTitle: "Crea nuovo gruppo"
  `}}
  
  {{template "read_all_header" dict  "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Group")}}
  {{template "search_input"}}
    
  {{if not .}}
  {{template "display_no_elements"}}
  {{else}}
  <div class="list-group" id="myUL">
    {{range $group := .Data}}
    <a class="list-group-item list-group-item-action" href={{$group.ID|show "Group"}}>
      <span class="fa fa-users"></span>
      {{$group|string}}
      <div class="text-right">
        {{$options := `noElements: "nessun elemento"`}}
        {{template "small" dict "options" ($options | yaml) "data" $group.Teachers}}
      </div>
    </a>
    {{end}}
    {{end}}
  </div>

</div>

{{ end }}
