{{ define "content" }}

<div class="container">

  {{template "breadcrumb" toSlice "Studenti" (all "Student") (.Data|string) "current"}}
  {{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Student") "deletePath" (.Data.ID|delete "Student")}}

  <h2 class="karmen-relation-header">Informazioni generali</h2>
  {{if .Data.Class}}
  <p>Lo studente appartiene alla classe {{(.Data.Class.ID|show "Class")|anchor (.Data.Class|string)}}.</p>
  {{else}}
  <p>Questo studente non appartiene a nessuna classe. Clicca {{(.Data.ID|update "Student")|anchor "qui"}} per associare una classe allo studente.</p>
  {{end}}
  
  <div class="row">
    <div class="col-md-12">

      {{$options := `
      title: "Attività associate allo studente"
      model: "Activity"
      icon: "fa fa-business-time"
      `}}
      
      {{$noElements := "Nessuna attività associata allo studente."}}
      {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Activities "noElements" $noElements "small" (toSlice "Teacher")}}
    
    </div>
  </div>
  
</div>    

{{ end }}
