groups_show.html.tpl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {{ define "content" }}
  2. <div class="container">
  3. <nav aria-label="breadcrumb">
  4. <ol class="breadcrumb">
  5. <li class="breadcrumb-item"><a href="/groups?{{query "tpl_layout" "base" "tpl_content" "groups"}}">Gruppi</a></li>
  6. <li class="breadcrumb-item active"><a href="#">{{.Data.Name}}</a></li>
  7. </ol>
  8. </nav>
  9. <div class="karmen-info-header">
  10. <div class="row">
  11. <div class="col-md-8">
  12. <h1>{{.Data.Name}}</h1>
  13. </div>
  14. <div class="col-md-4">
  15. <div class="btn-group float-right" role="group">
  16. <a href="/groups/add/?{{query "tpl_layout" "base" "tpl_content" "groups_add_update"}}" class="btn btn-success">
  17. <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
  18. Crea
  19. </a>
  20. <a href="/groups/{{.Data.ID}}/update?{{query "tpl_layout" "base" "tpl_content" "groups_add_update" "update" "true"}}" class="btn btn-primary">
  21. <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
  22. Modifica
  23. </a>
  24. <button href="/groups/{{.Data.ID}}/delete"
  25. data-url="/groups/{{.Data.ID}}/delete"
  26. class="btn btn-danger karmen-ajax-delete">
  27. <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
  28. Elimina
  29. </button>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="row">
  35. <div class="col-md-12">
  36. <h2 class="karmen-relation-header">Docenti associati al gruppo</h2>
  37. {{if .Data.Teachers}}
  38. <div class="list-group" id="students_list_group">
  39. {{range $teacher := .Data.Teachers}}
  40. <a href="/teachers/{{$teacher.ID}}?{{query "tpl_layout" "base" "tpl_content" "teachers_show"}}" class="list-group-item list-group-item-action">
  41. <span class="fa fa-user"></span>
  42. {{$teacher.CompleteName}}
  43. {{end}}
  44. </a>
  45. </div>
  46. {{else}}
  47. <p>Al gruppo non è associato alcun docente. Clicca <a href="/groups/{{.Data.ID}}/update?{{query "tpl_layout" "base" "tpl_content" "groups_add_update"}}">qui</a> per modificare questo gruppo.</p>
  48. {{end}}
  49. </div>
  50. </div>
  51. </div>
  52. {{ end }}