students_show.html.tpl 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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>
  23. {{ end }}