students_show.html.tpl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {{ define "content" }}
  2. <div class="container">
  3. {{template "breadcrumb" toSlice "Studenti" (all "Student") (.Data|string) "current"}}
  4. {{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Student") "deletePath" (.Data.ID|delete "Student")}}
  5. <h2 class="karmen-relation-header">Informazioni generali</h2>
  6. {{if .Data.Class}}
  7. <p>Lo studente appartiene alla classe {{(.Data.Class.ID|show "Class")|anchor (.Data.Class|string)}}.</p>
  8. {{else}}
  9. <p>Questo studente non appartiene a nessuna classe. Clicca {{(.Data.ID|update "Student")|anchor "qui"}} per associare una classe allo studente.</p>
  10. {{end}}
  11. <div class="row">
  12. <div class="col-md-12">
  13. {{$options := `
  14. title: "Attività associate allo studente"
  15. model: "Activity"
  16. icon: "fa fa-business-time"
  17. `}}
  18. {{$noElements := "Nessuna attività associata allo studente."}}
  19. {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Activities "noElements" $noElements "small" (toSlice "Teacher")}}
  20. </div>
  21. </div>
  22. <div class="row">
  23. <div class="col-md-12">
  24. {{$options := `
  25. title: "Operatori associati allo studente"
  26. model: "Operator"
  27. icon: "fa fa-user"
  28. `}}
  29. {{$noElements := "Nessun operatore associato allo studente."}}
  30. {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Operators "noElements" $noElements}}
  31. </div>
  32. </div>
  33. </div>
  34. {{ end }}