subjects_show.html.tpl 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. {{ define "content" }}
  2. <div class="container">
  3. {{template "breadcrumb" toSlice "Materie" (all "Subject") (.Data|string) "current"}}
  4. {{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Subject") "deletePath" (.Data.ID|delete "Subject")}}
  5. <h2 class="karmen-relation-header">Informazioni generali</h2>
  6. {{if .Data.Department}}
  7. <p>Questa materia afferisce al dipartimento di {{(.Data.Department.ID|show "Department")|anchor (.Data.Department|string)}}.</p>
  8. {{else}}
  9. <p>Questa materia non afferisce a nessun dipartimento. Clicca {{(.Data.ID|update "Subject")|anchor "qui"}} per associare un dipartimento alla materia.</p>
  10. {{end}}
  11. <div class="row">
  12. <div class="col-md-12">
  13. {{$options := `
  14. title: "Docenti della materia"
  15. model: "Teacher"
  16. icon: "fa fa-user"
  17. `}}
  18. {{$noElements := "Nessun docente associato alla materia."}}
  19. {{template "relation_list" dict "options" ($options|yaml) "data" .Data.Teachers "noElements" $noElements}}
  20. </div>
  21. </div>
  22. </div>
  23. {{ end }}