departments_show.html.tpl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {{ define "content" }}
  2. <div class="container">
  3. {{template "breadcrumb" toSlice "Dipartimenti" (all "Department") (.Data|string) "current"}}
  4. {{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Department") "deletePath" (.Data.ID|delete "Department")}}
  5. {{if .Data.Coordinator}}
  6. <p>Il coordinatore di questo dipartimento è {{(.Data.Coordinator.ID|show "Teacher")|anchor (.Data.Coordinator|string)}}.</p>
  7. {{else}}
  8. <p>Il dipartimento non ha coordinatore. Clicca {{(.Data.ID|update "Department")|anchor "qui"}} per aggiungere un coordinatore.</p>
  9. {{end}}
  10. <div class="row">
  11. <div class="col-md-12">
  12. {{$options := `
  13. title: "Materie afferenti al dipartimento"
  14. model: "Subject"
  15. icon: "fa fa-book"
  16. `}}
  17. {{$noElements := "Nessuna materia associata al dipartimento."}}
  18. {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Subjects "noElements" $noElements}}
  19. </div>
  20. </div>
  21. <div class="row">
  22. <div class="col-md-12">
  23. {{$options := `
  24. title: "Docenti"
  25. model: "Teacher"
  26. icon: "fa fa-users"
  27. `}}
  28. {{$noElements := "Nessun docente associato al dipartimento."}}
  29. {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Teachers "noElements" $noElements}}
  30. </div>
  31. </div>
  32. </div>
  33. {{ end }}