{{ define "content" }}

<div class="container">  

  {{$options := `
  title: "Attività"
  buttonTitle: "Crea nuova attività"
  `}}
  
  {{template "read_all_header" dict  "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "activity")}}
  {{template "search_input"}}
    
  {{if not .}}
  {{template "display_no_elements"}}
  {{else}}
  <div class="list-group" id="myUL">
    {{range $activity := .Data}}
    <a class="list-group-item list-group-item-action" href={{$activity.ID|show "activity"}}>
      <span class="fa fa-business-time"></span>
      {{$activity|string}}
      <div class="text-right">
        {{$options := `noElements: "no docente"`}}
        {{template "small" dict "options" ($options | yaml) "data" $activity.Teacher}}
      </div>
    </a>
    {{end}}
    {{end}}
  </div>

</div>

{{ end }}
