groups.html.tpl 814 B

1234567891011121314151617181920212223242526272829303132
  1. {{ define "content" }}
  2. <div class="container">
  3. {{$options := `
  4. title: "Gruppi"
  5. buttonTitle: "Crea nuovo gruppo"
  6. `}}
  7. {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Group")}}
  8. {{template "search_input"}}
  9. {{if not .}}
  10. {{template "display_no_elements"}}
  11. {{else}}
  12. <div class="list-group" id="myUL">
  13. {{range $group := .Data}}
  14. <a class="list-group-item list-group-item-action" href={{$group.ID|show "Group"}}>
  15. <span class="fa fa-users"></span>
  16. {{$group|string}}
  17. <div class="text-right">
  18. {{$options := `noElements: "nessun elemento"`}}
  19. {{template "small" dict "options" ($options | yaml) "data" $group.Teachers}}
  20. </div>
  21. </a>
  22. {{end}}
  23. {{end}}
  24. </div>
  25. </div>
  26. {{ end }}