{{ define "content" }}

<div class="container">

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

  <h2 class="karmen-relation-header">Informazioni</h2>
  {{if .Data.Coordinator}}
  <p>Il coordinatore di questo dipartimento è {{(.Data.Coordinator.ID|show "Teacher")|anchor (.Data.Coordinator|string)}}.</p>
  {{else}}
  <p>Il dipartimento non ha coordinatore. Clicca {{(.Data.ID|update "Department")|anchor "qui"}} per aggiungere un coordinatore.</p>
  {{end}}
  
  <div class="row">
    <div class="col-md-12">

      {{$options := `
      title: "Materie afferenti al dipartimento"
      model: "Subject"
      icon: "fa fa-book"
      `}}
      
      {{$noElements := "Nessuna materia associata al dipartimento."}}
      {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Subjects "noElements" $noElements}}
    
    </div>
  </div>
  
  <div class="row">
    <div class="col-md-12">

      {{$options := `
      title: "Docenti"
      model: "Teacher"
      icon: "fa fa-users"
      `}}
      
      {{$noElements := "Nessun docente associato al dipartimento."}}
      {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Teachers "noElements" $noElements}}

    </div>
    
  </div>

  
</div>    

{{ end }}
