departments_show.html.tpl 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. <h2 class="karmen-relation-header">Informazioni</h2>
  6. {{if .Data.Coordinator}}
  7. <p>Il coordinatore di questo dipartimento è {{(.Data.Coordinator.ID|show "Teacher")|anchor (.Data.Coordinator|string)}}.</p>
  8. {{else}}
  9. <p>Il dipartimento non ha coordinatore. Clicca {{(.Data.ID|update "Department")|anchor "qui"}} per aggiungere un coordinatore.</p>
  10. {{end}}
  11. <div class="row">
  12. <div class="col-md-12">
  13. {{$options := `
  14. title: "Materie afferenti al dipartimento"
  15. model: "Subject"
  16. icon: "fa fa-book"
  17. `}}
  18. {{$noElements := "Nessuna materia associata al dipartimento."}}
  19. {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Subjects "noElements" $noElements}}
  20. </div>
  21. </div>
  22. <div class="row">
  23. <div class="col-md-12">
  24. {{$options := `
  25. title: "Docenti"
  26. model: "Teacher"
  27. icon: "fa fa-users"
  28. `}}
  29. {{$noElements := "Nessun docente associato al dipartimento."}}
  30. {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Teachers "noElements" $noElements}}
  31. </div>
  32. </div>
  33. </div>
  34. {{ end }}